Edit-R1: Reinforce Image Editing with Diffusion Negative-Aware Finetuning and MLLM Implicit Feedback
[2025/10/19]: We release Edit-R1, which employs DiffusionNFT and a training-free reward model derived from pretrained MLLMs to fine-tune diffusion models for image editing. UniWorld-Qwen-Image-Edit-2509 and UniWorld-FLUX.1-Kontext-Dev are open-sourced.
Start the reward server:
python reward_server/reward_server.py
If you want to check the status of the reward server, you can test it by running:
python reward_server/test_reward_server.py
Directory structure:
- dataset-dir
- images/
- YOUR_IMAGE_DATA
- ...
- train_metadata.jsonl
- test_metadata.jsonl
train_metadata.jsonl
and test_metadata.jsonl
format:
{"prompt": "PROMPT", "image": "IMAGE_RELATIVE_PATH", "requirement": "TASK_REQUIREMENT"}
...
See config/qwen_image_edit_nft.py
and config/kontext_nft.py
for available configurations.
export REWARD_SERVER=[YOUR_REWARD_SERVICE_IP_ADDR]:12341
torchrun --nproc_per_node=8 \
scripts/train_nft_qwen_image_edit.py --config config/qwen_image_edit_nft.py:config_name
And you can also refer to the example scripts in examples/
.
For reproducibility, we provide the reproduction scripts in reproduction/
.
See Reproduction Details for more details.
- DiffusionNFT: Huge thanks for their elegant codebase 🤩!
- Flow-GRPO
- ImgEdit
- UniWorld-V1
See LICENSE for details. The FLUX weights fall under the FLUX.1 [dev] Non-Commercial License.
@article{li2025uniworldv2,
title={Uniworld-V2: Reinforce Image Editing with Diffusion Negative-aware Finetuning and MLLM Implicit Feedback},
author={Li, Zongjian and Liu, Zheyuan and Zhang, Qihui and Lin, Bin and Yuan, Shenghai and Yan, Zhiyuan and Ye, Yang and Yu, Wangbo and Niu, Yuwei and Yuan, Li},
journal={arXiv preprint arXiv:2506.03147},
year={2025}
}
@article{lin2025uniworld,
title={Uniworld: High-resolution semantic encoders for unified visual understanding and generation},
author={Lin, Bin and Li, Zongjian and Cheng, Xinhua and Niu, Yuwei and Ye, Yang and He, Xianyi and Yuan, Shenghai and Yu, Wangbo and Wang, Shaodong and Ge, Yunyang and others},
journal={arXiv preprint arXiv:2506.03147},
year={2025}
}
@article{ye2025imgedit,
title={Imgedit: A unified image editing dataset and benchmark},
author={Ye, Yang and He, Xianyi and Li, Zongjian and Lin, Bin and Yuan, Shenghai and Yan, Zhiyuan and Hou, Bohan and Yuan, Li},
journal={arXiv preprint arXiv:2505.20275},
year={2025}
}