[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72581":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":16,"starSnapshotCount":16,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},72581,"ICEdit","River-Zhang\u002FICEdit","River-Zhang","[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! ","https:\u002F\u002Friver-zhang.github.io\u002FICEdit-gh-pages\u002F",null,"Python",2096,113,17,23,0,3,59.97,"Other",false,"main",true,[24,25,26,27,28,29,30,31,32],"diffusion","diffusion-models","diffusion-transformer","dit","editing-image","gpt4o","gpt4oimage","image-editing","in-context","2026-06-12 04:01:06","\u003Cdiv align=\"center\">\n\n\u003Ch1>In-Context Edit: Enabling Instructional Image Editing with In-Context Generation in Large Scale Diffusion Transformer\u003C\u002Fh1>\n\n\u003Cdiv>\n    \u003Ca href=\"https:\u002F\u002Friver-zhang.github.io\u002Fzechuanzhang\u002F\u002F\" target=\"_blank\">Zechuan Zhang\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Fhorizonwind2004.github.io\u002F\" target=\"_blank\">Ji Xie\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Fyulu.net.cn\u002F\" target=\"_blank\">Yu Lu\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Fz-x-yang.github.io\u002F\" target=\"_blank\">Zongxin Yang\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Fscholar.google.com\u002Fcitations?user=RMSuNFwAAAAJ&hl=zh-CN&oi=ao\" target=\"_blank\">Yi Yang✉\u003C\u002Fa>&emsp;\n\u003C\u002Fdiv>\n\u003Cdiv>\n    ReLER, CCAI, Zhejiang University; Harvard University\n\u003C\u002Fdiv>\n\u003Cdiv>\n     \u003Csup>✉\u003C\u002Fsup>Corresponding Author\n\u003C\u002Fdiv>\n\u003Cdiv>\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.20690\" target=\"_blank\">Arxiv\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FRiverZ\u002FICEdit\" target=\"_blank\">Huggingface Demo 🤗\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fsanaka87\u002FICEdit-MoE-LoRA\u002Ftree\u002Fmain\" target=\"_blank\">Model 🤗\u003C\u002Fa>&emsp;\n    \u003Ca href=\"https:\u002F\u002Friver-zhang.github.io\u002FICEdit-gh-pages\u002F\" target=\"_blank\">Project Page\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n\n\u003Cdiv style=\"width: 80%; margin:auto;\">\n    \u003Cimg style=\"width:100%; display: block; margin: auto;\" src=\"docs\u002Fimages\u002Fteaser.png\">\n    \u003Cp style=\"text-align: left;\">\u003Cstrong>Image Editing is worth a single LoRA!\u003C\u002Fstrong> We present In-Context Edit, a novel approach that achieves state-of-the-art instruction-based editing \u003Cb>using just 0.5% of the training data and 1% of the parameters required by prior SOTA methods\u003C\u002Fb>. 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.\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n:open_book: For more visual results, go checkout our \u003Ca href=\"https:\u002F\u002Friver-zhang.github.io\u002FICEdit-gh-pages\u002F\" target=\"_blank\">project page\u003C\u002Fa>\n\n\n\u003Cdiv align=\"left\">\n\n\n# 🎆 News \n- **[2025\u002F9\u002F19]** 🔥 We have open-sourced our [MoE version ICEdit and ckpt](#for-the-usage-of-moe-lora-version). Have a try!🚀\n- **[2025\u002F9\u002F18]** 🌟 ICEdit has been accepted by NeurIPS 2025!🎉 See you in San Diego!\n- **[2025\u002F8\u002F21]** 🌟 We have released an [Ascend (Huawei NPU)-powered version of ICEdit](https:\u002F\u002Fgithub.com\u002F2018liuzhiyuan\u002FICEdit-on-Ascend-NPU). Now you can run ICEdit on Ascend NPU! Many thanks to [Zhiyuan](https:\u002F\u002Fgithub.com\u002F2018liuzhiyuan)！\n- **[2025\u002F5\u002F16]** 🌟 Many thanks to [gluttony-10 (十字鱼)](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fpull\u002F47#issue-3067039788) for adapting Gradio demo with [GGUF quantization](#inference-in-gradio-demo), further reducing memory usage to **10GB**.\n- **[2025\u002F5\u002F14]** 🔥 With the help of the [official comfy-org](https:\u002F\u002Fwww.comfy.org\u002Fzh-cn\u002F), we have integrated our ComfyUI nodes into [Comfy Registry](https:\u002F\u002Fregistry.comfy.org\u002Fnodes\u002FICEdit)! \n- **[2025\u002F5\u002F13]** 🔥 We have released the [training code](.\u002Ftrain\u002F)! Train your own editing LoRAs now!\n- **[2025\u002F5\u002F11]** 🌟 Great thanks to [gluttony-10 (十字鱼)](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F23#issue-3050804566) for making a [windows gradio demo](#inference-in-gradio-demo-on-windows) to use our project on Windows!\n- **[2025\u002F5\u002F8]** 🔥 We have released our **[official ComfyUI workflow](#official-comfyui-workflow)**! 🚀 Check the repository and have a try!\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Click to expand\u002Fcollapse news\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n- **[2025\u002F5\u002F8]** 🔥 We have added LoRA scale slider in the gradio demo. You can try to discover more interesting demo with different scale! \n\u003Cdiv align=\"center\">\n\u003Cimg src=\"docs\u002Fimages\u002Flora_scale.png\" width=\"70%\" style=\"display: block; margin: auto;\">\n\u003Cdiv align=\"left\">\n\n- **[2025\u002F5\u002F7]** 🌟 We update some notes when using the ComfyUI workflow to avoid unsatisfactory results! \n- **[2025\u002F5\u002F6]** 🔥 ICEdit currently ranks **2nd** on the overall\u002Fweekly trending list of [Hugging Face space](https:\u002F\u002Fhuggingface.co\u002Fspaces). Thank you all for your support and love!🤗\n- **[2025\u002F5\u002F5]** 🌟 Heartfelt thanks to [Datou](https:\u002F\u002Fx.com\u002FDatou) for creating a fantastic [ComfyUI workflow](https:\u002F\u002Fopenart.ai\u002Fworkflows\u002Fdatou\u002Ficedit-moe-lora-flux-fill\u002FQFmaWNKsQo3P5liYz4RB) on OpenArt! 🚀 Have a try!\n- **[2025\u002F5\u002F2]** 🌟 Heartfelt thanks to [judian17](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F1#issuecomment-2846568411) for crafting an amazing [ComfyUI-nunchaku demo](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F1#issuecomment-2846568411)! Only **4GB VRAM GPU** is enough to run with ComfyUI-nunchaku!🚀 Dive in and give it a spin!\n- **[2025\u002F4\u002F30]** 🔥 We release the [Huggingface Demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FRiverZ\u002FICEdit) 🤗! Have a try!\n- **[2025\u002F4\u002F30]** 🔥 We release the [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.20690) on arXiv!\n- **[2025\u002F4\u002F29]** We release the [project page](https:\u002F\u002Friver-zhang.github.io\u002FICEdit-gh-pages\u002F) and demo video! Codes will be made available in next week~ Happy Labor Day!\n\n\u003C\u002Fdetails>\n\n# 🎈 Tutorial on Bilibili or Youtube\n\n### 👑 Feel free to share your results in this [Gallery](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fdiscussions\u002F21)!\n- **[2025\u002F5\u002F15]** 🌟 We find that [啦啦啦的小黄瓜](https:\u002F\u002Fspace.bilibili.com\u002F219572544) has made a detailed [bilibili tutorial](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1tSEqzJE7q\u002F?share_source=copy_web&vd_source=8fcb933ee576af56337afc41509fa095) introducing our model! What a great video!\n- **[2025\u002F5\u002F14]** 🌟 We find that [Nenly同学](https:\u002F\u002Fspace.bilibili.com\u002F1814756990) has made a fantastic [bilibili tutorial](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1bNEvzrEn1\u002F?share_source=copy_web&vd_source=8fcb933ee576af56337afc41509fa095) on how to use our repository! Great thanks to him!\n- **[2025\u002F5\u002F10]** 🌟 Great thanks to [月下Hugo](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1JZVRzuE12\u002F?share_source=copy_web&vd_source=8fcb933ee576af56337afc41509fa095) for making a [Chinese tutorial](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1JZVRzuE12\u002F?share_source=copy_web&vd_source=8fcb933ee576af56337afc41509fa095) on how to use our official workflow!\n- **[2025\u002F5\u002F7]** 🌟 Heartfelt thanks to [T8star](https:\u002F\u002Fx.com\u002FT8star_Aix) for making a [tutorial](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=s6GMKL-Jjos) and [ComfyUI workflow](https:\u002F\u002Fwww.runninghub.cn\u002Fpost\u002F1920075398585974786\u002F?utm_source=kol01-RH099) on how to **increase the editing success to 100%**!🚀 Have a try!\n- **[2025\u002F5\u002F3]** 🌟 Heartfelt thanks to [softicelee2](https:\u002F\u002Fgithub.com\u002Fsofticelee2) for making a [Youtube video](https:\u002F\u002Fyoutu.be\u002FrRMc5DE4qMo) on how to use our model!\n# 📖 Table of Contents\n\n- [🎆 News](#-news)\n- [🎈 Tutorial on Bilibili or Youtube](#-tutorial-on-bilibili-or-youtube)\n    - [👑 Feel free to share your results in this Gallery!](#-feel-free-to-share-your-results-in-this-gallery)\n- [📖 Table of Contents](#-table-of-contents)\n    - [📢 Attention All: Incorrect ComfyUI Workflow Usage Alert!](#-attention-all-incorrect-comfyui-workflow-usage-alert)\n- [💼 Installation](#-installation)\n  - [Conda environment setup](#conda-environment-setup)\n  - [Download pretrained weights](#download-pretrained-weights)\n  - [Inference in bash (w\u002Fo VLM Inference-time Scaling)](#inference-in-bash-wo-vlm-inference-time-scaling)\n      - [For the usage of MoE-LoRA version](#for-the-usage-of-moe-lora-version)\n  - [Inference in Gradio Demo](#inference-in-gradio-demo)\n  - [💼 Windows one-click package](#-windows-one-click-package)\n- [🔧 Training](#-training)\n- [🎨ComfyUI Workflow](#comfyui-workflow)\n    - [Official ComfyUI-workflow](#official-comfyui-workflow)\n    - [ComfyUI-workflow for increased editing success rate](#comfyui-workflow-for-increased-editing-success-rate)\n    - [ComfyUI-nunchaku](#comfyui-nunchaku)\n    - [ComfyUI-workflow](#comfyui-workflow-1)\n- [⚠️ Tips](#️-tips)\n    - [If you encounter such a failure case, please **try again with a different seed**!](#if-you-encounter-such-a-failure-case-please-try-again-with-a-different-seed)\n    - [⚠️ Clarification](#️-clarification)\n- [💪 To Do List](#-to-do-list)\n- [💪 Comparison with Commercial Models](#-comparison-with-commercial-models)\n- [🌟 Star History](#-star-history)\n- [Bibtex](#bibtex)\n\n\n\n### 📢 Attention All: Incorrect ComfyUI Workflow Usage Alert!\n- ### We have released our **[official ComfyUI workflow](#official-comfyui-workflow)** for proper usage! Check our repository and have a try!\n- 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.)\n- The width of the input image must resize to **512** (no restriction to height).\n- Please **[use the Normal LoRA](https:\u002F\u002Fhuggingface.co\u002FRiverZ\u002Fnormal-lora\u002Ftree\u002Fmain)** not the MoE-LoRA, because the MoE-LoRA cannot be correctly loaded with ComfyUI lora loader.\n- 🔥💐🎆 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.\n\n\n\n# 💼 Installation\n\n## Conda environment setup\n\n```bash\nconda create -n icedit python=3.10\nconda activate icedit\npip install -r requirements.txt\npip install -U huggingface_hub\n```\n\n## Download pretrained weights\n\nIf you can connect to Huggingface, you don't need to download the weights. Otherwise, you need to download the weights to local.\n\n- [Flux.1-fill-dev](https:\u002F\u002Fhuggingface.co\u002Fblack-forest-labs\u002Fflux.1-fill-dev).\n- [ICEdit-normal-LoRA](https:\u002F\u002Fhuggingface.co\u002FRiverZ\u002Fnormal-lora\u002Ftree\u002Fmain).\n- [ICEdit-MoE-LoRA](https:\u002F\u002Fhuggingface.co\u002Fsanaka87\u002FICEdit-MoE-LoRA\u002Ftree\u002Fmain)\n\n~~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 email the author.~~\n\n## Inference in bash (w\u002Fo VLM Inference-time Scaling)\n\nNow you can have a try!\n\n> Our model can **only edit images with a width of 512 pixels** (there is no restriction on the height). If you pass in an image with a width other than 512 pixels, the model will automatically resize it to 512 pixels.\n\n> If you found the model failed to generate the expected results, please try to change the `--seed` parameter. Inference-time Scaling with VLM can help much to improve the results.\n\n```bash\npython scripts\u002Finference.py --image assets\u002Fgirl.png \\\n                            --instruction \"Make her hair dark green and her clothes checked.\" \\\n                            --seed 304897401 \\\n```\n\nEditing a 512×768 image requires 35 GB of GPU memory. If you need to run on a system with 24 GB of GPU memory (for example, an NVIDIA RTX3090), you can add the `--enable-model-cpu-offload` parameter.\n\n```bash\npython scripts\u002Finference.py --image assets\u002Fgirl.png \\\n                            --instruction \"Make her hair dark green and her clothes checked.\" \\\n                            --enable-model-cpu-offload\n```\n\nIf you have downloaded the pretrained weights locally, please pass the parameters during inference, as in: \n\n```bash\npython scripts\u002Finference.py --image assets\u002Fgirl.png \\\n                            --instruction \"Make her hair dark green and her clothes checked.\" \\\n                            --flux-path \u002Fpath\u002Fto\u002Fflux.1-fill-dev \\\n                            --lora-path \u002Fpath\u002Fto\u002FICEdit-normal-LoRA\n```\n\n#### For the usage of MoE-LoRA version\n```bash\npython scripts\u002Finference_moe.py --image assets\u002Fgirl.png \\\n                            --instruction \"Make her hair dark green and her clothes checked.\" \\\n                            --seed 42 \\\n```\n\n```bash\npython scripts\u002Finference_moe.py --image assets\u002Fgirl.png \\\n                            --instruction \"Make her hair dark green and her clothes checked.\" \\\n                            --enable-model-cpu-offload\n```\n\n```bash\npython scripts\u002Finference_moe.py --image assets\u002Fgirl.png \\\n                            --instruction \"Make her hair dark green and her clothes checked.\" \\\n                            --flux-path \u002Fpath\u002Fto\u002Fflux.1-fill-dev \\\n                            --lora-path \u002Fpath\u002Fto\u002FICEdit-MoE-LoRA\n```\n\n## Inference in Gradio Demo\n\nWe provide a gradio demo for you to edit images in a more user-friendly way. You can run the following command to start the demo.\n\n```bash\npython scripts\u002Fgradio_demo.py --port 7860\n\n\n\n## for MoE version\npython scripts\u002Fgradio_demo_moe.py --port 7860\n\n```\n\nLike the inference script, if you want to run the demo on a system with 24 GB of GPU memory, you can add the `--enable-model-cpu-offload` parameter. And if you have downloaded the pretrained weights locally, please pass the parameters during inference, as in:\n\n```bash\npython scripts\u002Fgradio_demo.py --port 7860 \\\n                              --flux-path \u002Fpath\u002Fto\u002Fflux.1-fill-dev (optional) \\\n                              --lora-path \u002Fpath\u002Fto\u002FICEdit-normal-LoRA (optional) \\\n                              --enable-model-cpu-offload (optional) \\\n\n## for MoE version\npython scripts\u002Fgradio_demo_moe.py --port 7860 \\\n                              --flux-path \u002Fpath\u002Fto\u002Fflux.1-fill-dev (optional) \\\n                              --lora-path \u002Fpath\u002Fto\u002FICEdit-normal-LoRA (optional) \\\n                              --enable-model-cpu-offload (optional) \\\n```\n\nOr if you want to run the demo on a system with 10 GB of GPU memory, you can download the gguf models from [FLUX.1-Fill-dev-gguf](https:\u002F\u002Fhuggingface.co\u002FYarvixPA\u002FFLUX.1-Fill-dev-gguf), [t5-v1_1-xxl-encoder-gguf](https:\u002F\u002Fhuggingface.co\u002Fcity96\u002Ft5-v1_1-xxl-encoder-gguf) and pass the parameters during inference, as in:\n\n```bash\npython scripts\u002Fgradio_demo.py --port 7861 \\\n                              --flux-path models\u002Fflux.1-fill-dev \\\n                              --lora-path models\u002FICEdit-normal-LoRA \\\n                              --transformer models\u002Fflux1-fill-dev-Q4_0.gguf \\\n                              --text_encoder_2 models\u002Ft5-v1_1-xxl-encoder-Q8_0.gguf \\\n                              --enable-model-cpu-offload \\\n```\n\nThen you can open the link in your browser to edit images.\n\n\u003Cdiv align=\"center\">\n\u003Cdiv style=\"width: 80%; text-align: left; margin:auto;\">\n    \u003Cimg style=\"width:100%\" src=\"docs\u002Fimages\u002Fgradio.png\">\n    \u003Cp style=\"text-align: left;\">Gradio Demo: just input the instruction and wait for the result!\u003C\u002Fb>.\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\u003Cdiv align=\"left\">\n\nHere is also a Chinese tutorial [Youtube video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=rRMc5DE4qMo) on how to install and use ICEdit, created by [softicelee2](https:\u002F\u002Fgithub.com\u002Fsofticelee2). It's definitely worth a watch!\n\n## 💼 Windows one-click package\n\nGreat thanks to [gluttony-10](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F23#issue-3050804566), a famous [Bilibili Up](https:\u002F\u002Fspace.bilibili.com\u002F893892)! He made a tutorial ([Youtube](https:\u002F\u002Fyoutu.be\u002FC-OpWlJi424) and [Bilibili](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1oT5uzzEbs)) on how to install our project on windows and a one-click package for Windows! **Just unzip it and it's ready to use**. It has undergone quantization processing. It only takes up 14GB of space and supports graphics cards of the 50 series.\n\nDownload link: [Google Drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F16j3wQvWjuzCRKnVolszLmhCtc_yOCqcx?usp=sharing) or [Baidu Wangpan](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1oT5uzzEbs\u002F?vd_source=2a911c0bc75f6d9b9d056bf0e7410d45)(refer to the comment section of the video)\n\u003Cimg src=\"docs\u002Fimages\u002Fwindows_install.png\" width=\"80%\" style=\"display: block; margin: auto;\">\n\n\n# 🔧 Training\n\nFound more details in here: [Training Code](.\u002Ftrain\u002F)\n\n\n# 🎨ComfyUI Workflow\n\n\n### Official ComfyUI-workflow\nWe have released our **official ComfyUI workflow** in this repository for correct usage of our model! **We have embedded the prompt \"A diptych with two side-by-side images of the same scene ... but\" into our nodes** and you just need to input the edit instructions such as \"make the girl wear pink sunglasses\". We also add a high resolution refinement module for better image quality! The total VRAM consumption is about 14GB. Use this [workflow](https:\u002F\u002Fgithub.com\u002Fhayd-zju\u002FICEdit-ComfyUI-official) and the [ICEdit-normal-lora](https:\u002F\u002Fhuggingface.co\u002FRiverZ\u002Fnormal-lora\u002Ftree\u002Fmain) to fulfill your creative ideas!\n\nWe have specially created [a repository for the workflow](https:\u002F\u002Fgithub.com\u002Fhayd-zju\u002FICEdit-ComfyUI-official) and you can **install it directly in ComfyUI**. Just open the manager tab and click **'Install via Git URL'**, copy the following URL and you are able to use it. For more details please refer to this [issue](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F22#issuecomment-2864977880)\n\n**URL:** [https:\u002F\u002Fgithub.com\u002Fhayd-zju\u002FICEdit-ComfyUI-official](https:\u002F\u002Fgithub.com\u002Fhayd-zju\u002FICEdit-ComfyUI-official)\n\n \u003Cimg src=\"docs\u002Fimages\u002Fworkflow_tutorial.png\" width=\"80%\" style=\"display: block; margin: auto;\">\n \u003Cimg src=\"docs\u002Fimages\u002Fofficial_workflow.png\" width=\"80%\" style=\"display: block; margin: auto;\">\n\n Great thanks to [月下Hugo](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1JZVRzuE12\u002F?share_source=copy_web&vd_source=8fcb933ee576af56337afc41509fa095) for making a [Chinese tutorial](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1JZVRzuE12\u002F?share_source=copy_web&vd_source=8fcb933ee576af56337afc41509fa095) on how to use our official workflow!\n\n### ComfyUI-workflow for increased editing success rate\nThanks to [T8star](https:\u002F\u002Fx.com\u002FT8star_Aix)! He made a tutorial ([Youtube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=s6GMKL-Jjos) and [bilibili](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV11HVhz1Eky\u002F?spm_id_from=333.40164.top_right_bar_window_dynamic.content.click&vd_source=2a911c0bc75f6d9b9d056bf0e7410d45)) and a creative workflow ([OpenArt](https:\u002F\u002Fopenart.ai\u002Fworkflows\u002Ft8star\u002Ficedit100v1\u002FHN4EZ2Cej98ZX8CC1RK5) and [RunningHub](https:\u002F\u002Fwww.runninghub.cn\u002Fpost\u002F1920075398585974786\u002F?utm_source=kol01-RH099)) that could increase the editing success rate greatly (about 100%)! Have a try with it!\n\n\u003Cimg src=\"docs\u002Fimages\u002Fworkflow_t8.png\" width=\"80%\" style=\"display: block; margin: auto;\">\n\n\n### ComfyUI-nunchaku\n\nWe extend our heartfelt thanks to @[judian17](https:\u002F\u002Fgithub.com\u002Fjudian17) for crafting a ComfyUI [workflow](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F1#issuecomment-2846568411) that facilitates seamless usage of our model. Explore this excellent [workflow](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F1#issuecomment-2846568411) to effortlessly run our model within ComfyUI. Only **4GB VRAM GPU** is enough to run with ComfyUI-nunchaku! \n\nThis workflow incorporates high-definition refinement, yielding remarkably good results. Moreover, integrating this LoRA with Redux enables outfit changes to a certain degree. Once again, a huge thank you to @[judian17](https:\u002F\u002Fgithub.com\u002Fjudian17) for his innovative contributions! \n\n![comfyui image](docs\u002Fimages\u002Fcomfyuiexample.png)\n\n\n### ComfyUI-workflow\n\nThanks to [Datou](https:\u002F\u002Fx.com\u002FDatou), a workflow of ICEdit in ComfyUI can also be downloaded [here](https:\u002F\u002Fopenart.ai\u002Fworkflows\u002Fdatou\u002Ficedit-moe-lora-flux-fill\u002FQFmaWNKsQo3P5liYz4RB). Try it with the [normal lora ckpt](https:\u002F\u002Fhuggingface.co\u002FRiverZ\u002Fnormal-lora\u002Ftree\u002Fmain).\n\n\u003Cimg src=\"docs\u002Fimages\u002Fworkflow.png\" width=\"80%\" style=\"display: block; margin: auto;\">\n\n\n\n\n\n\n# ⚠️ Tips\n\n### If you encounter such a failure case, please **try again with a different seed**!\n\n- Our base model, FLUX, does not inherently support a wide range of styles, so a large portion of our dataset involves style transfer. As a result, the model **may sometimes inexplicably change your artistic style**.\n\n- Our training dataset is **mostly targeted at realistic images**. For non-realistic images, such as **anime** or **blurry pictures**, the success rate of the editing **drop and could potentially affect the final image quality**.\n\n- While the success rates for adding objects, modifying color attributes, applying style transfer, and changing backgrounds are high, the success rate for object removal is relatively lower due to the low quality of the removal dataset we use.\n\nThe current model is the one used in the experiments in the paper, trained with only 4 A800 GPUs (total `batch_size` = 2 x 2 x 4 = 16). In the future, we will enhance the dataset, and do scale-up, finally release a more powerful model.\n\n### ⚠️ Clarification\n\nWe've noticed numerous web pages related to ICEdit, including [https:\u002F\u002Ficedit.net\u002F](https:\u002F\u002Ficedit.net\u002F), [https:\u002F\u002Ficedit.org\u002F](https:\u002F\u002Ficedit.org\u002F). Kudos to those who built these pages!\n\nHowever, we'd like to emphasize two important points:\n- **No Commercial Use**: Our project **cannot** be used for commercial purposes. Please check the [LICENSE](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fblob\u002Fmain\u002FLICENSE) for details.\n- **Official Page**: The official project page is [https:\u002F\u002Friver-zhang.github.io\u002FICEdit-gh-pages\u002F](https:\u002F\u002Friver-zhang.github.io\u002FICEdit-gh-pages\u002F).\n\n\n\n\n\n# 💪 To Do List\n\n- [x] Inference Code\n- [ ] Inference-time Scaling with VLM\n- [x] Pretrained Weights\n- [x] More Inference Demos\n- [x] Gradio demo\n- [x] Comfy UI demo (by @[judian17](https:\u002F\u002Fgithub.com\u002FRiver-Zhang\u002FICEdit\u002Fissues\u002F1#issuecomment-2846568411), compatible with [nunchaku](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FComfyUI-nunchaku), support high-res refinement and FLUX Redux. Only 4GB VRAM GPU is enough to run!)\n- [x] Comfy UI demo with normal lora (by @[Datou](https:\u002F\u002Fopenart.ai\u002Fworkflows\u002Fdatou\u002Ficedit-moe-lora-flux-fill\u002FQFmaWNKsQo3P5liYz4RB) in openart)\n- [x] Official ComfyUI workflow\n- [x] Training Code\n- [ ] LoRA for higher image resolution (768, 1024)\n\n\n\n# 💪 Comparison with Commercial Models\n\n\u003Cdiv align=\"center\">\n\u003Cdiv style=\"width: 80%; text-align: left; margin:auto;\">\n    \u003Cimg style=\"width:100%\" src=\"docs\u002Fimages\u002Fgpt4o_comparison.png\">\n    \u003Cp style=\"text-align: left;\">Compared with commercial models such as Gemini and GPT-4o, our methods are comparable to and even superior to these commercial models in terms of character ID preservation and instruction following. \u003Cb>We are more open-source than them, with lower costs, faster speed (it takes about 9 seconds to process one image), and powerful performance\u003C\u002Fb>.\u003C\u002Fp>\n\u003C\u002Fdiv>\n\n\n\u003Cdiv align=\"left\">\n\n\n# 🌟 Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=River-Zhang\u002FICEdit&type=Date)](https:\u002F\u002Fwww.star-history.com\u002F#River-Zhang\u002FICEdit&Date)\n\n# Bibtex\nIf this work is helpful for your research, please consider citing the following BibTeX entry.\n\n```\n@article{zhang2025context,\n  title={In-context edit: Enabling instructional image editing with in-context generation in large scale diffusion transformer},\n  author={Zhang, Zechuan and Xie, Ji and Lu, Yu and Yang, Zongxin and Yang, Yi},\n  journal={arXiv preprint arXiv:2504.20690},\n  year={2025}\n}\n\n@inproceedings{zhang2025icedit,\n  title     = {In-Context Edit: Enabling Instructional Image Editing with In-Context Generation in Large-Scale Diffusion Transformers},\n  author    = {Zhang, Zechuan and Xie, Ji and Lu, Yu and Yang, Zongxin and Yang, Yi},\n  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},\n  year      = {2025},\n  note      = {arXiv:2504.20690}\n}\n\n```\n","ICEdit是一个基于大规模扩散变换器的图像编辑工具，通过上下文生成实现指令驱动的图像编辑。项目的核心功能是使用极少的训练数据（仅0.1%）和参数量即可达到出色的编辑效果，支持多轮次高精度编辑以及单次多样化视觉效果显著的编辑任务。技术上，ICEdit引入了MoE（Mixture of Experts）版本并开放了相关模型权重文件，使得在4GB显存条件下也能运行。该工具非常适合需要高效、低成本且高质量图像编辑的应用场景，如创意设计、内容创作等。",2,"2026-06-11 03:42:39","high_star"]