Diffusers
nielsr HF Staff commited on
Commit
db66bf6
·
verified ·
1 Parent(s): a2337aa

Improve model card for EditScore: Add comprehensive details and usage

Browse files

This PR updates the model card to accurately reflect the **EditScore** model, which is a state-of-the-art reward model for instruction-guided image editing, as presented in the paper "[EditScore: Unlocking Online RL for Image Editing via High-Fidelity Reward Modeling](https://huggingface.co/papers/2509.23909)".

Key changes include:
- **Updated Metadata**: Added `pipeline_tag: image-to-image`, `library_name: transformers` (due to the use of a Transformers-compatible backbone model like Qwen-VL-2.5), and relevant `tags` (`reward-model`, `image-editing`) to enhance discoverability and proper integration with the Hugging Face ecosystem.
- **Comprehensive Content**: Replaced the previous `OmniGen2`-focused content with detailed information about `EditScore`, including its abstract, key highlights, links to the paper, project page, and GitHub repository, a clear Python usage example, and citation information, all sourced from the official `EditScore` GitHub repository.
- **Visuals**: Incorporated relevant images from the `EditScore` repository to illustrate its capabilities and benchmark results.

This update ensures the model card accurately describes `EditScore` and provides users with essential information for its understanding and use.

Files changed (1) hide show
  1. README.md +99 -198
README.md CHANGED
@@ -1,89 +1,82 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
3
  ---
4
 
5
  <p align="center">
6
- <img src="assets/brand.png" width="65%">
7
  </p>
8
 
 
 
9
  <p align="center">
10
- <a href="https://vectorspacelab.github.io/OmniGen2"><img src="https://img.shields.io/badge/Project%20Page-OmniGen2-yellow" alt="project page"></a>
11
- <a href="https://arxiv.org/abs/2506.18871"><img src="https://img.shields.io/badge/arXiv%20paper-2506.18871-b31b1b.svg" alt="arxiv"></a>
12
- <a href="https://github.com/VectorSpaceLab/OmniGen2?tab=readme-ov-file#-gradio-demo"><img src="https://img.shields.io/badge/Online%20Demo-🤗-blue" alt="demo"></a>
13
- <a href="https://huggingface.co/spaces/OmniGen2/OmniGen2"><img src="https://img.shields.io/badge/HF%20Spaces-🤗-lightblue" alt="demo"></a>
14
- <a href="https://huggingface.co/OmniGen2/OmniGen2"><img src="https://img.shields.io/badge/Model-🤗-yellow" alt="model"></a>
15
- <a href="https://huggingface.co/datasets/OmniGen2/OmniContext"><img src="https://img.shields.io/badge/Benchmark-🤗-yellow" alt="model"></a>
16
- <a href="https://huggingface.co/datasets/OmniGen2/X2I2"><img src="https://img.shields.io/badge/Dataset-🤗-yellow" alt="model"></a>
17
  </p>
18
 
19
  <h4 align="center">
20
  <p>
21
  <a href=#-news>News</a> |
22
  <a href=#-quick-start>Quick Start</a> |
23
- <a href=#-usage-tips>Usage Tips</a> |
24
- <a href=#-limitations-and-suggestions>Limitations</a> |
25
- <a href=#-gradio-demo>Online Demos</a> |
26
  <a href=#%EF%B8%8F-citing-us>Citation</a>
27
  <p>
28
  </h4>
29
 
 
 
 
 
 
 
 
 
 
30
  ## 🔥 News
31
- - **2025-09-30**: Introducing **EditScore** a family of state-of-the-art open-source reward models (7B–72B) for instruction-guided image editing.
32
- - **Model Release**: As part of this, We release **OmniGen2-EditScore7B**, unlocking online RL For Image Editing via high-fidelity EditScore. LoRA weights are now available on [Hugging Face](https://huggingface.co/OmniGen2/OmniGen2-EditScore7B) and [ModelScope](https://www.modelscope.cn/models/OmniGen2/OmniGen2-EditScore7B).
33
- - **Benchmark**: We are also launching **EditReward-Bench** to provide a systematic way to evaluate and compare reward models.
34
- - Check out the [project repository](https://github.com/VectorSpaceLab/EditScore) to get started!
35
- - 2025-07-23: Users can access OmniGen2 through [web app](https://genai.baai.ac.cn/).
36
- - 2025-07-05: Training datasets [X2I2](https://huggingface.co/datasets/OmniGen2/X2I2) are available.
37
- - 2025-07-03: OmniGen2 now supports [TeaCache](https://github.com/ali-vilab/TeaCache) and [TaylorSeer](https://github.com/Shenyi-Z/TaylorSeer) for faster inference, see [Usage Tips](#-usage-tips) for details. Thanks @legitnull for great [TeaCache-PR](https://github.com/VectorSpaceLab/OmniGen2/pull/52) and [TaylorSeer-PR](https://github.com/VectorSpaceLab/OmniGen2/pull/76).
38
- - 2025-07-01: OmniGen2 is supported by [ComfyUI official](https://comfyanonymous.github.io/ComfyUI_examples/omnigen), thanks !!
39
- - 2025-06-30: Training code is available, see [fine-tuning](docs/FINETUNE.md) for details.
40
- - 2025-06-28: We release [OmniContext](https://huggingface.co/datasets/OmniGen2/OmniContext) benchmark. The evaluation codes are in [omnicontext](https://github.com/VectorSpaceLab/OmniGen2/tree/main/omnicontext).
41
- - 2025-06-24: [Technical Report](https://arxiv.org/abs/2506.18871) is available.
42
- - 2025-06-23: We’ve updated our code and HF model—OmniGen2 now runs *without* `flash-attn`. Users can still install it for optimal performance.
43
- - 2025-06-20: Updated [resource requirements](#-resources-requirement), adding CPU offload support for devices with limited VRAM.
44
- - 2025-06-16: [Gradio](https://github.com/VectorSpaceLab/OmniGen2?tab=readme-ov-file#-gradio-demo) and [Jupyter](https://github.com/VectorSpaceLab/OmniGen2/blob/main/example.ipynb) is available. Online Gradio Demo: [Demo1](https://9c4426d27c3b9ecbed.gradio.live); [Chat-Demo1](https://0351497834a4d7226c.gradio.live); see more demo links in [gradio section](https://github.com/VectorSpaceLab/OmniGen2?tab=readme-ov-file#-gradio-demo)
45
- - 2025-06-16: We release **OmniGen2**, a multimodal generation model, model weights can be accessed in [huggingface](https://huggingface.co/OmniGen2/OmniGen2) and [modelscope](https://www.modelscope.cn/models/OmniGen2/OmniGen2).
46
-
47
-
48
- ## Introduction
49
- **OmniGen2** is a powerful and efficient generative model. Unlike OmniGen v1, OmniGen2 features two distinct decoding pathways for text and image modalities, utilizing unshared parameters and a decoupled image tokenizer. OmniGen2 has competitive performance across four primary capabilities:
50
-
51
- - **Visual Understanding**: Inherits the robust ability to interpret and analyze image content from its Qwen-VL-2.5 foundation.
52
- - **Text-to-Image Generation**: Creates high-fidelity and aesthetically pleasing images from textual prompts.
53
- - **Instruction-guided Image Editing**: Executes complex, instruction-based image modifications with high precision, achieving state-of-the-art performance among open-source models.
54
- - **In-context Generation**: A versatile capability to process and flexibly combine diverse inputs—including humans, reference objects, and scenes—to produce novel and coherent visual outputs.
55
-
56
- **We will release the training code and dataset. Stay tuned!**
57
-
58
- Some good cases of OmniGen2:
59
- <p align="center">
60
- <img src="assets/teaser.jpg" width="95%">
61
- <br>
62
- <em>Demonstrations.</em>
63
- </p>
64
 
65
  <p align="center">
66
- <img src="assets/examples_edit.png" width="95%">
67
  <br>
68
- <em> Good demonstrations of OmniGen2's image editing capabilities.</em>
69
  </p>
70
 
 
 
 
 
 
 
 
71
  <p align="center">
72
- <img src="assets/examples_subject.png" width="95%">
73
  <br>
74
- <em> Good demonstrations of OmniGen2's in-context generation capabilities.</em>
75
  </p>
76
 
77
 
78
-
79
  ## 📌 TODO
80
- - [x] Technical report.
81
- - [x] Support CPU offload and improve inference efficiency.
82
- - [x] In-context generation benchmark: **OmniContext**.
83
- - [ ] Integration of diffusers.
84
- - [x] Training datasets.
85
- - [ ] Training data construction pipeline.
86
- - [ ] ComfyUI Demo (**commuity support will be greatly appreciated!**).
87
 
88
  ## 🚀 Quick Start
89
 
@@ -93,180 +86,88 @@ Some good cases of OmniGen2:
93
 
94
  ```bash
95
  # 1. Clone the repo
96
- git clone git@github.com:VectorSpaceLab/OmniGen2.git
97
- cd OmniGen2
98
 
99
  # 2. (Optional) Create a clean Python environment
100
- conda create -n omnigen2 python=3.11
101
- conda activate omnigen2
102
 
103
  # 3. Install dependencies
104
  # 3.1 Install PyTorch (choose correct CUDA version)
105
- pip install torch==2.6.0 torchvision --extra-index-url https://download.pytorch.org/whl/cu124
106
 
107
  # 3.2 Install other required packages
108
  pip install -r requirements.txt
109
 
110
- # Note: Version 2.7.4.post1 is specified for compatibility with CUDA 12.4.
111
- # Feel free to use a newer version if you use CUDA 12.6 or they fixed this compatibility issue.
112
- # OmniGen2 runs even without flash-attn, though we recommend install it for best performance.
113
- pip install flash-attn==2.7.4.post1 --no-build-isolation
114
  ```
115
 
116
  #### 🌏 For users in Mainland China
117
 
118
  ```bash
119
  # Install PyTorch from a domestic mirror
120
- pip install torch==2.6.0 torchvision --index-url https://mirror.sjtu.edu.cn/pytorch-wheels/cu124
121
 
122
  # Install other dependencies from Tsinghua mirror
123
  pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
124
 
125
- # Note: Version 2.7.4.post1 is specified for compatibility with CUDA 12.4.
126
- # Feel free to use a newer version if you use CUDA 12.6 or they fixed this compatibility issue.
127
- # OmniGen2 runs even without flash-attn, though we recommend install it for best performance.
128
- pip install flash-attn==2.7.4.post1 --no-build-isolation -i https://pypi.tuna.tsinghua.edu.cn/simple
129
  ```
130
 
131
  ---
132
 
133
- ### �� Run Examples
134
-
135
- ```bash
136
- # Visual Understanding
137
- bash example_understanding.sh
138
-
139
- # Text-to-image generation
140
- bash example_t2i.sh
141
-
142
- # Instruction-guided image editing
143
- bash example_edit.sh
144
-
145
- # In-context generation
146
- bash example_in_context_generation.sh
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  ```
148
 
149
  ---
150
 
151
- ### 🌐 Gradio Demo
152
-
153
- * **Online Demo**: [HF Spaces](https://huggingface.co/spaces/OmniGen2/OmniGen2). Beyond Hugging Face Spaces, we are *temporarily* allocating additional GPU resources to ensure smooth access to the online demos. If you notice a long queue for a particular link, please try other links:
154
-
155
- [Demo1](https://9c4426d27c3b9ecbed.gradio.live), [Demo2](https://06574c5e62d815f799.gradio.live), [Demo3](https://e0a82fd380d2ff17ac.gradio.live), [Demo4](https://d9c4410ee48ce35051.gradio.live)
156
-
157
- [Chat-Demo1](https://0351497834a4d7226c.gradio.live), [Chat-Demo2](https://032160099388d1d10c.gradio.live), [Chat-Demo3](https://cf9f2797e92cfa2767.gradio.live), [Chat-Demo4](https://b87b82fd14215affc2.gradio.live)
158
-
159
- * **Web Application**: You can also try the self-hosted OmniGen2 web application by visiting [this link](https://genai.baai.ac.cn/) or scanning the QR code below:
160
- <p align="center">
161
- <img src="assets/qr-code.PNG" width="30%">
162
- <br>
163
- <em> OmniGen2 web.</em>
164
- </p>
165
-
166
-
167
- <!-- [Available on Hugging Face Spaces 🚀](https://huggingface.co/spaces/Shitao/OmniGen2) -->
168
-
169
- * **Run Locally**:
170
- ```bash
171
- # for only generating image
172
- pip install gradio
173
- python app.py
174
- # Optional: Share demo with public link (You need to be able to access huggingface)
175
- python app.py --share
176
-
177
- # for generating image or text
178
- pip install gradio
179
- python app_chat.py
180
- ```
181
-
182
- ## 💡 Usage Tips
183
- To achieve optimal results with OmniGen2, you can adjust the following key hyperparameters based on your specific use case.
184
- - `text_guidance_scale`: Controls how strictly the output adheres to the text prompt (Classifier-Free Guidance).
185
- - `image_guidance_scale`: This controls how much the final image should resemble the input reference image.
186
- - **The Trade-off**: A higher value makes the output more faithful to the reference image's structure and style, but it might ignore parts of your text prompt. A lower value (~1.5) gives the text prompt more influence.
187
- - **Tip**: For image editing task, we recommend to set it between 1.2 and 2.0; for in-context generateion task, a higher image_guidance_scale will maintian more details in input images, and we recommend to set it between 2.5 and 3.0.
188
- - `max_pixels`: Automatically resizes images when their total pixel count (width × height) exceeds this limit, while maintaining its aspect ratio. This helps manage performance and memory usage.
189
- - **Tip**: Default value is 1024*1024. You can reduce this value if you encounter memory issues.
190
- - `max_input_image_side_length`: Maximum side length for input images.
191
- - `negative_prompt`: Tell the model what you don't want to see in the image.
192
- - **Example**: blurry, low quality, text, watermark
193
- - **Tip**: For the best results, try experimenting with different negative prompts. If you're not sure, just use the default negative prompt.
194
- - `enable_model_cpu_offload`: **Reduces VRAM usage by nearly 50% with a negligible impact on speed**.
195
- - This is achieved by offloading the model weights to CPU RAM when they are not in use.
196
- - See: [Model Offloading](https://huggingface.co/docs/diffusers/optimization/memory#model-offloading)
197
- - `enable_sequential_cpu_offload`: Minimizes VRAM usage to less than 3GB, but at the cost of significantly slower performance.
198
- - This works by offloading the model in submodules and loading them onto the GPU sequentially as needed.
199
- - See: [CPU Offloading](https://huggingface.co/docs/diffusers/optimization/memory#cpu-offloading)
200
- - `cfg_range_start`, `cfg_range_end`: Define the timestep range where CFG is applied. Per this [paper](https://arxiv.org/abs/2404.07724), reducing `cfg_range_end` can significantly decrease inference time with a negligible impact on quality.
201
- - `scheduler`: Choose between `[euler, dpmsolver++]`. Default is `euler`. For potentially better performance with fewer steps, try `dpmsolver++`.
202
- - `num_inference_step`: Number of discretization steps for the ODE solver. Default is `50`.
203
- - `enable_teacache`: Whether or not enable [teacache](https://github.com/ali-vilab/TeaCache) for faster inference.
204
- - `teacache_rel_l1_thresh`: The threshold for accumulated L1 distance for the timestep embedding-modulated noisy input. It serves as an indicator of whether to cache the model output. You can modify the `teacache_rel_l1_thresh` parameter to achieve your desired trade-off between latency and visual quality. The default value of 0.05 provides approximately a **30% speedup** compared to the baseline. Increasing this value can further reduce latency, but may result in some loss of detail.
205
- - `enable_taylorseer`: Whether or not enable [taylorseer](https://github.com/Shenyi-Z/TaylorSeer) for faster inference. When enabled, inference speed can improve by up to **2X**, with negligible quality loss compared to the baseline.
206
-
207
- **Some suggestions for improving generation quality:**
208
- 1. Use High-Quality Images
209
- - Provide clear images, preferably with a resolution **greater than 512×512 pixels**.
210
- - Small or blurry inputs will result in low-quality outputs.
211
- 2. Be Specific with Instructions
212
- - Clearly describe both **what to change** and **how you want it changed**.
213
-
214
- 3. Prioritize English
215
- The model currently performs best with **English** prompts.
216
-
217
- 4. Change instructions to enhance subject consistency.
218
- When the generated image does not align well with the input image, you can try the following methods to improve subject consistency:
219
- - **Use images with larger size, as well as images in which people occupy a larger proportion of the frame.**
220
- - **Increase the Image Guidance Scale**, for example to 3.0. The trade-off may be slight overexposure or a greasy look in the image.
221
- - **When using a single input image**, you can try to use the following prompt template: "she/he ..., maintaining her/his facial features, hairstyle, and other attributes."
222
- - **Increase the parameter--Number of images per prompt** to generate more outputs, giving you a better chance to find one with stronger subject consistency and a more satisfactory result.
223
- - **Longer prompts generally yield better results than shorter ones.** More detailed descriptions of the scene and character interactions can provide additional benefits.
224
-
225
- 5. For in-context edit (edit based multiple images), we recommend using the following prompt format: "Edit the first image: add/replace (the [object] with) the [object] from the second image. [descripton for your target image]."
226
- For example: "Edit the first image: add the man from the second image. The man is talking with a woman in the kitchen". The descition for your target image should be as detailed as possible.
227
-
228
- ## 🎨 Fine-tune
229
- See [fine-tuning](docs/FINETUNE.md) for details.
230
-
231
- ## ❌ Limitations and Suggestions
232
- The current model sometimes does not follow instructions. You can increase the "Number of images per prompt" to generate multiple images at once, so you can choose the result you are satisfied with, or try different prompts. In our own experience, being as detailed as possible tends to work better.
233
-
234
- The current model cannot decide the output image size by itself; the default size is 1024×1024. You need to set a specific size if you require a different one. When you input an image, we will set the output size to match the input image (this works best for editing tasks). If you want to modify just one image out of several, you should also set the output size to match the image you want to edit; otherwise, it may lead to low-quality outputs.
235
-
236
- The in-context generation capability sometimes produces objects that differ from the original ones. Some suggested improvements are: increasing `image_guidance_scale` (it is recommended to set it to 3) can help alleviate this issue; using high-resolution images, increasing the size of the input image, and ensuring that the object to be used occupies a larger proportion of the image; and modifying the prompt. However, there is still a gap compared to GPT-4o.
237
-
238
- Compared to OmniGen 1.0, although OmniGen 2 has made some improvements, many issues still remain. It may take multiple attempts to achieve a satisfactory result.
239
-
240
-
241
- ## 💻 Resources Requirement
242
- OmniGen2 natively requires an **NVIDIA RTX 3090** or an equivalent GPU with approximately **17GB of VRAM**. For devices with less VRAM, you can enable **CPU Offload** to run the model.
243
-
244
- **Performance Tip**: To improve inference speed, consider decreasing the `cfg_range_end` parameter. Within a reasonable range, this has a negligible impact on output quality.
245
-
246
- The following table details the inference performance of OmniGen2 on an **A800 GPU**:
247
- <p align="center">
248
- <img src="assets/efficiency.png" width="95%">
249
- <br>
250
- <em>Inference Efficiency of OmniGen2.</em>
251
- </p>
252
 
253
- ## 🤝 Community Efforts
254
- We’re honored and grateful for the support from the open source community. Here are some unofficial implementations contributed by the community(**Currently, we have not confirmed whether there are no bugs. Please try to use the our official demo as much as possible.**):
255
- - ComfyUI:
256
- - [ComfyUI Official](https://comfyanonymous.github.io/ComfyUI_examples/omnigen/)
257
- - [https://github.com/Yuan-ManX/ComfyUI-OmniGen2](https://github.com/Yuan-ManX/ComfyUI-OmniGen2)
258
- - [https://github.com/neverbiasu/ComfyUI-OmniGen2](https://github.com/neverbiasu/ComfyUI-OmniGen2)
259
- - Quantization:
260
- - [DFloat11, a lossless compression using 11 bits](https://github.com/LeanModels/OmniGen2-DFloat11)
261
 
262
  ## ❤️ Citing Us
263
  If you find this repository or our work useful, please consider giving a star ⭐ and citation 🦖, which would be greatly appreciated:
264
 
265
  ```bibtex
266
- @article{wu2025omnigen2,
267
- title={OmniGen2: Exploration to Advanced Multimodal Generation},
268
- author={Chenyuan Wu and Pengfei Zheng and Ruiran Yan and Shitao Xiao and Xin Luo and Yueze Wang and Wanli Li and Xiyan Jiang and Yexin Liu and Junjie Zhou and Ze Liu and Ziyi Xia and Chaofan Li and Haoge Deng and Jiahao Wang and Kun Luo and Bo Zhang and Defu Lian and Xinlong Wang and Zhongyuan Wang and Tiejun Huang and Zheng Liu},
269
- journal={arXiv preprint arXiv:2506.18871},
270
  year={2025}
271
  }
272
- ```
 
1
  ---
2
  license: apache-2.0
3
+ pipeline_tag: image-to-image
4
+ library_name: transformers
5
+ tags:
6
+ - reward-model
7
+ - image-editing
8
  ---
9
 
10
  <p align="center">
11
+ <img src="assets/logo.png" width="65%">
12
  </p>
13
 
14
+ This repository contains **EditScore**, a series of state-of-the-art open-source reward models (7B–72B) designed to evaluate and enhance instruction-guided image editing. This model is presented in the paper [EditScore: Unlocking Online RL for Image Editing via High-Fidelity Reward Modeling](https://huggingface.co/papers/2509.23909).
15
+
16
  <p align="center">
17
+ <a href="https://vectorspacelab.github.io/EditScore"><img src="https://img.shields.io/badge/Project%20Page-EditScore-yellow" alt="project page"></a>
18
+ <a href="https://huggingface.co/papers/2509.23909"><img src="https://img.shields.io/badge/HuggingFace%20Paper-2509.23909-b31b1b.svg" alt="HuggingFace paper"></a>
19
+ <a href="https://arxiv.org/abs/2509.23909"><img src="https://img.shields.io/badge/arXiv%20paper-2509.23909-b31b1b.svg" alt="arxiv"></a>
20
+ <a href="https://github.com/VectorSpaceLab/EditScore"><img src="https://img.shields.io/badge/GitHub%20Repo-EditScore-blue.svg?logo=github&" alt="github repo"></a>
21
+ <a href="https://huggingface.co/collections/EditScore/editscore-68d8e27ee676981221db3cfe"><img src="https://img.shields.io/badge/EditScore-🤗-yellow" alt="model collection"></a>
22
+ <a href="https://huggingface.co/datasets/EditScore/EditReward-Bench"><img src="https://img.shields.io/badge/EditReward--Bench-🤗-yellow" alt="dataset"></a>
 
23
  </p>
24
 
25
  <h4 align="center">
26
  <p>
27
  <a href=#-news>News</a> |
28
  <a href=#-quick-start>Quick Start</a> |
29
+ <a href=#-benchmark-your-image-editing-reward-model>Benchmark Usage</a> |
 
 
30
  <a href=#%EF%B8%8F-citing-us>Citation</a>
31
  <p>
32
  </h4>
33
 
34
+ ## Abstract
35
+ Instruction-guided image editing has achieved remarkable progress, yet current models still face challenges with complex instructions and often require multiple samples to produce a desired result. Reinforcement Learning (RL) offers a promising solution, but its adoption in image editing has been severely hindered by the lack of a high-fidelity, efficient reward signal. In this work, we present a comprehensive methodology to overcome this barrier, centered on the development of a state-of-the-art, specialized reward model. We first introduce EditReward-Bench, a comprehensive benchmark to systematically evaluate reward models on editing quality. Building on this benchmark, we develop EditScore, a series of reward models (7B-72B) for evaluating the quality of instruction-guided image editing. Through meticulous data curation and filtering, EditScore effectively matches the performance of learning proprietary VLMs. Furthermore, coupled with an effective self-ensemble strategy tailored for the generative nature of EditScore, our largest variant even surpasses GPT-5 in the benchmark. We then demonstrate that a high-fidelity reward model is the key to unlocking online RL for image editing. Our experiments show that, while even the largest open-source VLMs fail to provide an effective learning signal, EditScore enables efficient and robust policy optimization. Applying our framework to a strong base model, OmniGen2, results in a final model that shows a substantial and consistent performance uplift. Overall, this work provides the first systematic path from benchmarking to reward modeling to RL training in image editing, showing that a high-fidelity, domain-specialized reward model is the key to unlocking the full potential of RL in this domain.
36
+
37
+ ## ✨ Highlights
38
+ - **State-of-the-Art Performance**: Effectively matches the performance of leading proprietary VLMs. With a self-ensembling strategy, **our largest model surpasses even GPT-5** on our comprehensive benchmark, **EditReward-Bench**.
39
+ - **A Reliable Evaluation Standard**: We introduce **EditReward-Bench**, the first public benchmark specifically designed for evaluating reward models in image editing, featuring 13 subtasks, 11 state-of-the-art editing models (*including proprietary models*) and expert human annotations.
40
+ - **Simple and Easy-to-Use**: Get an accurate quality score for your image edits with just a few lines of code.
41
+ - **Versatile Applications**: Ready to use as a best-in-class reranker to improve editing outputs, or as a high-fidelity reward signal for **stable and effective Reinforcement Learning (RL) fine-tuning**.
42
+
43
  ## 🔥 News
44
+ - **2025-09-30**: We release **OmniGen2-EditScore7B**, unlocking online RL For Image Editing via high-fidelity EditScore. LoRA weights are available at [Hugging Face](https://huggingface.co/OmniGen2/OmniGen2-EditScore7B) and [ModelScope](https://www.modelscope.cn/models/OmniGen2/OmniGen2-EditScore7B).
45
+ - **2025-09-30**: We are excited to release **EditScore** and **EditReward-Bench**! Model weights and the benchmark dataset are now publicly available. You can access them on Hugging Face: [Models Collection](https://huggingface.co/collections/EditScore/editscore-68d8e27ee676981221db3cfe) and [Benchmark Dataset](https://huggingface.co/datasets/EditScore/EditReward-Bench), and on ModelScope: [Models Collection](https://www.modelscope.cn/collections/EditScore-8b0d53aa945d4e) and [Benchmark Dataset](https://www.modelscope.cn/datasets/EditScore/EditReward-Bench).
46
+
47
+ ## 📖 Introduction
48
+ While Reinforcement Learning (RL) holds immense potential for this domain, its progress has been severely hindered by the absence of a high-fidelity, efficient reward signal.
49
+
50
+ To overcome this barrier, we provide a systematic, two-part solution:
51
+
52
+ - **A Rigorous Evaluation Standard**: We first introduce **EditReward-Bench**, a new public benchmark for the direct and reliable evaluation of reward models. It features 13 diverse subtasks and expert human annotations, establishing a gold standard for measuring reward signal quality.
53
+
54
+ - **A Powerful & Versatile Tool**: Guided by our benchmark, we developed the **EditScore** model series. Through meticulous data curation and an effective self-ensembling strategy, EditScore sets a new state of the art for open-source reward models, even surpassing the accuracy of leading proprietary VLMs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  <p align="center">
57
+ <img src="assets/table_reward_model_results.png" width="95%">
58
  <br>
59
+ <em>Benchmark results on EditReward-Bench.</em>
60
  </p>
61
 
62
+ We demonstrate the practical utility of EditScore through two key applications:
63
+
64
+ - **As a State-of-the-Art Reranker**: Use EditScore to perform Best-of-*N* selection and instantly improve the output quality of diverse editing models.
65
+ - **As a High-Fidelity Reward for RL**: Use EditScore as a robust reward signal to fine-tune models via RL, enabling stable training and unlocking significant performance gains where general-purpose VLMs fail.
66
+
67
+ This repository releases both the **EditScore** models and the **EditReward-Bench** dataset to facilitate future research in reward modeling, policy optimization, and AI-driven model improvement.
68
+
69
  <p align="center">
70
+ <img src="assets/figure_edit_results.png" width="95%">
71
  <br>
72
+ <em>EditScore as a superior reward signal for image editing.</em>
73
  </p>
74
 
75
 
 
76
  ## 📌 TODO
77
+ We are actively working on improving EditScore and expanding its capabilities. Here's what's next:
78
+ - [ ] Release RL training code applying EditScore to OmniGen2.
79
+ - [ ] Provide Best-of-N inference scripts for OmniGen2, Flux-dev-Kontext, and Qwen-Image-Edit.
 
 
 
 
80
 
81
  ## 🚀 Quick Start
82
 
 
86
 
87
  ```bash
88
  # 1. Clone the repo
89
+ git clone git@github.com:VectorSpaceLab/EditScore.git
90
+ cd EditScore
91
 
92
  # 2. (Optional) Create a clean Python environment
93
+ conda create -n editscore python=3.12
94
+ conda activate editscore
95
 
96
  # 3. Install dependencies
97
  # 3.1 Install PyTorch (choose correct CUDA version)
98
+ pip install torch==2.7.1 torchvision --extra-index-url https://download.pytorch.org/whl/cu126
99
 
100
  # 3.2 Install other required packages
101
  pip install -r requirements.txt
102
 
103
+ # EditScore runs even without vllm, though we recommend install it for best performance.
104
+ pip install vllm
 
 
105
  ```
106
 
107
  #### 🌏 For users in Mainland China
108
 
109
  ```bash
110
  # Install PyTorch from a domestic mirror
111
+ pip install torch==2.7.1 torchvision --index-url https://mirror.sjtu.edu.cn/pytorch-wheels/cu126
112
 
113
  # Install other dependencies from Tsinghua mirror
114
  pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
115
 
116
+ # EditScore runs even without vllm, though we recommend install it for best performance.
117
+ pip install vllm -i https://pypi.tuna.tsinghua.edu.cn/simple
 
 
118
  ```
119
 
120
  ---
121
 
122
+ ### 🧪 Usage Example
123
+ Using EditScore is straightforward. The model will be automatically downloaded from the Hugging Face Hub on its first run.
124
+ ```python
125
+ from PIL import Image
126
+ from editscore import EditScore
127
+
128
+ # Load the EditScore model. It will be downloaded automatically.
129
+ # Replace with the specific model version you want to use.
130
+ model_path = "Qwen/Qwen2.5-VL-7B-Instruct"
131
+ lora_path = "EditScore/EditScore-7B"
132
+
133
+ scorer = EditScore(
134
+ backbone="qwen25vl", # set to "qwen25vl_vllm" for faster inference
135
+ model_name_or_path=model_path,
136
+ enable_lora=True,
137
+ lora_path=lora_path,
138
+ score_range=25,
139
+ num_pass=1, # Increase for better performance via self-ensembling
140
+ )
141
+
142
+ input_image = Image.open("example_images/input.png")
143
+ output_image = Image.open("example_images/output.png")
144
+ instruction = "Adjust the background to a glass wall."
145
+
146
+ result = scorer.evaluate([input_image, output_image], instruction)
147
+ print(f"Edit Score: {result['final_score']}")
148
+ # Expected output: A dictionary containing the final score and other details.
149
  ```
150
 
151
  ---
152
 
153
+ ## 📊 Benchmark Your Image-Editing Reward Model
154
+ We provide an evaluation script to benchmark reward models on **EditReward-Bench**. To evaluate your own custom reward model, simply create a scorer class with a similar interface and update the script.
155
+ ```bash
156
+ # This script will evaluate the default EditScore model on the benchmark
157
+ bash evaluate.sh
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
+ # Or speed up inference with VLLM
160
+ bash evaluate_vllm.sh
161
+ ```
 
 
 
 
 
162
 
163
  ## ❤️ Citing Us
164
  If you find this repository or our work useful, please consider giving a star ⭐ and citation 🦖, which would be greatly appreciated:
165
 
166
  ```bibtex
167
+ @article{luo2025editscore,
168
+ title={EditScore: Unlocking Online RL for Image Editing via High-Fidelity Reward Modeling},
169
+ author={Xin Luo and Jiahao Wang and Chenyuan Wu and Shitao Xiao and Xiyan Jiang and Defu Lian and Jiajun Zhang and Dong Liu and Zheng Liu},
170
+ journal={arXiv preprint arXiv:2509.23909},
171
  year={2025}
172
  }
173
+ ```