SkillAgentSearch skills...

ICEdit

[NeurIPS 2025] Image editing is worth a single LoRA! 0.1% training data for fantastic image editing! Surpasses GPT-4o in ID persistence~ MoE ckpt released! Only 4GB VRAM is enough to run!

Install / Use

/learn @River-Zhang/ICEdit

README

<div align="center"> <h1>In-Context Edit: Enabling Instructional Image Editing with In-Context Generation in Large Scale Diffusion Transformer</h1> <div> <a href="https://river-zhang.github.io/zechuanzhang//" target="_blank">Zechuan Zhang</a>&emsp; <a href="https://horizonwind2004.github.io/" target="_blank">Ji Xie</a>&emsp; <a href="https://yulu.net.cn/" target="_blank">Yu Lu</a>&emsp; <a href="https://z-x-yang.github.io/" target="_blank">Zongxin Yang</a>&emsp; <a href="https://scholar.google.com/citations?user=RMSuNFwAAAAJ&hl=zh-CN&oi=ao" target="_blank">Yi Yang✉</a>&emsp; </div> <div> ReLER, CCAI, Zhejiang University; Harvard University </div> <div> <sup>✉</sup>Corresponding Author </div> <div> <a href="https://arxiv.org/abs/2504.20690" target="_blank">Arxiv</a>&emsp; <a href="https://huggingface.co/spaces/RiverZ/ICEdit" target="_blank">Huggingface Demo 🤗</a>&emsp; <a href="https://huggingface.co/sanaka87/ICEdit-MoE-LoRA/tree/main" target="_blank">Model 🤗</a>&emsp; <a href="https://river-zhang.github.io/ICEdit-gh-pages/" target="_blank">Project Page</a> </div> <div style="width: 80%; margin:auto;"> <img style="width:100%; display: block; margin: auto;" src="docs/images/teaser.png"> <p style="text-align: left;"><strong>Image Editing is worth a single LoRA!</strong> We present In-Context Edit, a novel approach that achieves state-of-the-art instruction-based editing <b>using just 0.5% of the training data and 1% of the parameters required by prior SOTA methods</b>. The first row illustrates a series of multi-turn edits, executed with high precision, while the second and third rows highlight diverse, visually impressive single-turn editing results from our method.</p> </div>

:open_book: For more visual results, go checkout our <a href="https://river-zhang.github.io/ICEdit-gh-pages/" target="_blank">project page</a>

<div align="left">

🎆 News

<details> <summary><strong>Click to expand/collapse news</strong></summary>
  • [2025/5/8] 🔥 We have added LoRA scale slider in the gradio demo. You can try to discover more interesting demo with different scale!
<div align="center"> <img src="docs/images/lora_scale.png" width="70%" style="display: block; margin: auto;"> <div align="left">
  • [2025/5/7] 🌟 We update some notes when using the ComfyUI workflow to avoid unsatisfactory results!
  • [2025/5/6] 🔥 ICEdit currently ranks 2nd on the overall/weekly trending list of Hugging Face space. Thank you all for your support and love!🤗
  • [2025/5/5] 🌟 Heartfelt thanks to Datou for creating a fantastic ComfyUI workflow on OpenArt! 🚀 Have a try!
  • [2025/5/2] 🌟 Heartfelt thanks to judian17 for crafting an amazing ComfyUI-nunchaku demo! Only 4GB VRAM GPU is enough to run with ComfyUI-nunchaku!🚀 Dive in and give it a spin!
  • [2025/4/30] 🔥 We release the Huggingface Demo 🤗! Have a try!
  • [2025/4/30] 🔥 We release the paper on arXiv!
  • [2025/4/29] We release the project page and demo video! Codes will be made available in next week~ Happy Labor Day!
</details>

🎈 Tutorial on Bilibili or Youtube

👑 Feel free to share your results in this Gallery!

📖 Table of Contents

📢 Attention All: Incorrect ComfyUI Workflow Usage Alert!

  • We have released our official ComfyUI workflow for proper usage! Check our repository and have a try!

  • You need to add the fixed pre-prompt "A diptych with two side-by-side images of the same scene. On the right, the scene is exactly the same as on the left but {instruction}" before inputing the edit instructions, otherwise you may get bad results! (This is mentioned in the paper!, The code for the Hugging Face gradio demo already embeds this prompt. So, you can simply input the editing instructions without additional setup.)
  • The width of the input image must resize to 512 (no restriction to height).
  • Please use the Normal LoRA not the MoE-LoRA, because the MoE-LoRA cannot be correctly loaded with ComfyUI lora loader.
  • 🔥💐🎆 Welcome to share your creative workflows (such as combining Redux, ACE, etc.) in the Issues section and showcase the results! We will include references so that more people can see your creativity.

💼 Installation

Conda environment setup

conda create -n icedit python=3.10
conda activate icedit
pip install -r requirements.txt
pip install -U huggingface_hub

Download pretrained weights

If you can connect to Huggingface, you don't need to download the weights. Otherwise, you need to download the weights to local.

~~Note: Due to some cooperation permission issues, we have to withdraw the weights and codes of moe-lora temporarily. What is released currently is just the ordinary lora, but it still has powerful performance. If you urgently need the moe lora weights of the original text, please

Related Skills

View on GitHub
GitHub Stars2.1k
CategoryDevelopment
Updated3d ago
Forks115

Languages

Python

Security Score

85/100

Audited on Mar 29, 2026

No findings