CoolFace
Modelpublic

TIGER-Lab/EditReward-Qwen2.5-VL-7B

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
5likes340downloads
Model Card

<p align="center" width="100%"> <img src="https://github.com/TIGER-AI-Lab/EditReward/raw/main/assets/logo.png" width="50%"> </p>

<div align="center">

EditReward: A Human-Aligned Reward Model for Instruction-Guided Image Editing

![Project Website](https://tiger-ai-lab.github.io/EditReward/) ![arXiv](https://arxiv.org/abs/2509.26346) ![Paper](https://huggingface.co/papers/2509.26346) ![Model](https://huggingface.co/collections/TIGER-Lab/editreward-68ddf026ef9eb1510458abc6) ![Dataset](https://huggingface.co/datasets/TIGER-Lab/EditReward-Data) ![Benchmark](https://huggingface.co/datasets/TIGER-Lab/EditReward-Bench) </div>

This repository contains the official implementation of the paper EditReward: A Human-Aligned Reward Model for Instruction-Guided Image Editing.

๐Ÿ“– Introduction

We introduce EditReward, a human-aligned reward model powered by a high-quality dataset for instruction-guided image editing. EditReward is trained with EditReward-Data, a large-scale, high-fidelity preference dataset comprising over 200K manually annotated preference pairs. This dataset covers diverse edits produced by seven state-of-the-art models across twelve distinct sources, ensuring high alignment with human judgment.

EditReward demonstrates superior alignment with human preferences in instruction-guided image editing tasks, achieving state-of-the-art human correlation on established benchmarks like GenAI-Bench, AURORA-Bench, ImagenHub, and our new EditReward-Bench.

<p align="center"> <img src="https://raw.githubusercontent.com/TIGER-AI-Lab/EditReward/refs/heads/main/assets/pipeline.png" alt="Teaser" width="900"/> </p>

๐Ÿš€ Quick Start

To use the EditReward model for inference, follow these steps. For more details including installation and training, please refer to the GitHub Repository.

๐Ÿ’ป Installation

bash
git clone https://github.com/TIGER-AI-Lab/EditReward.git
cd EditReward

conda create -n edit_reward python=3.10 -y
conda activate edit_reward
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
pip install datasets pillow openai -U megfile sentencepiece deepspeed fire omegaconf matplotlib peft trl==0.8.6 tensorboard scipy transformers==4.56.1 accelerate
# Recommend: Install flash-attn
pip install https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.2.post1/flash_attn-2.7.2.post1+cu12torch2.5cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

๐Ÿš€ Usage

python
import os
import sys
# Add project root to Python path (optional, for local development)
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import torch
from EditReward import EditRewardInferencer

# ------------------------------------------------------------------------------
# Example script for evaluating edited images with EditReward
# ------------------------------------------------------------------------------

# Path to model checkpoint (update to your own local or HF path)
CHECKPOINT_PATH = "your/local/path/to/checkpoint"
CONFIG_PATH = "config/EditReward-MiMo-VL-7B-SFT-2508.yaml"

# Initialize reward model
inferencer = EditRewardInferencer(
    config_path=CONFIG_PATH,
    checkpoint_path=CHECKPOINT_PATH,
    device="cuda",        # or "cpu"
    reward_dim="overall_detail",    # choose reward dimension if applicable
    rm_head_type="ranknet_multi_head"
)

# Example input data -----------------------------------------------------------
# image_src = [
#     "../assets/examples/source_img_1.png",
#     "../assets/examples/source_img_1.png",
# ]

# image_paths = [
#     "../assets/examples/target_img_1.png",
#     "../assets/examples/target_img_2.png",
# ]
image_src = [
    "your/local/path/to/source_image_1.jpg",
    "your/local/path/to/source_image_2.jpg",
]

image_paths = [
    "your/local/path/to/edited_image_1.jpg",
    "your/local/path/to/edited_image_2.jpg",
]

# example instruction: "Add a green bowl on the branch"
# prompts = [
#     "Add a green bowl on the branch",
#     "Add a green bowl on the branch"
# ]
prompts = [
    "your first editing instruction",
    "your second editing instruction"
]

# ------------------------------------------------------------------------------
# Main evaluation modes
# ------------------------------------------------------------------------------
if __name__ == "__main__":
    mode = "pairwise_inference"  # or "single_inference"

    if mode == "pairwise_inference":
        # ----------------------------------------------------------
        # Pairwise comparison: compares two edited images side-by-side
        # ----------------------------------------------------------
        with torch.no_grad():
          rewards = inferencer.reward(
              prompts=prompts,
              image_src=image_src,
              image_paths=image_paths
          )
        scores = [reward[0].item() for reward in rewards]
        print(f"[Pairwise Inference] Image scores: {scores}")

    elif mode == "single_inference":
        # ----------------------------------------------------------
        # Single image scoring: evaluates one edited image at a time
        # ----------------------------------------------------------
        with torch.no_grad():
          rewards = inferencer.reward(
              prompts=[prompts[0]],
              image_src=[image_src[0]],
              image_paths=[image_paths[0]]
          )
        print(f"[Single Inference] Image 1 score: {[reward[0].item() for reward in rewards]}")
        
        with torch.no_grad():
          rewards = inferencer.reward(
              prompts=[prompts[0]],
              image_src=[image_src[0]],
              image_paths=[image_paths[1]]
          )
        print(f"[Single Inference] Image 2 score: {[reward[0].item() for reward in rewards]}")

๐Ÿ“Š Benchmark

EditReward achieves superior alignment with human preferences in instruction-guided image editing tasks. The following tables show its performance against other models on various benchmarks.

<details open> <summary> Experimental Results: Alignment with Humans </summary>

MethodGenAI-BenchAURORA-BenchImagenHubEditReward-Bench (Overall)
Random25.9033.43--13.84
Human-to-Human----41.84--
*Proprietary Models*
GPT-4o53.5450.8138.2128.31
GPT-559.6147.27<u>40.85</u>37.81
Gemini-2.0-Flash53.3244.3123.6933.47
Gemini-2.5-Flash57.0147.6341.62<u>38.02</u>
*Open-Source VLMs*
Qwen2.5-VL-3B-Inst42.7630.69-2.5426.86
Qwen2.5-VL-7B-Inst40.4838.6218.5929.75
Qwen2.5-VL-32B-Inst39.2837.0626.8728.72
MiMo-VL-7B-SFT-250857.8930.4322.1431.19
ADIEE59.9655.5634.50--
*Reward Models (Ours)*
EditReward (on Qwen2.5-VL-7B)<u>63.97</u><u>59.50</u>36.1836.78
EditReward (on MiMo-VL-7B)65.7263.6235.2038.42

</details>


<details open> <summary> EditReward-Bench Results </summary>

MethodEditReward-Bench (K=2)EditReward-Bench (K=3)EditReward-Bench (K=4)EditReward-Bench (Overall)
Random25.8111.331.3513.84
Human-to-Human--------
*Proprietary Models*
GPT-4o45.6927.337.3128.31
GPT-5<u>57.53</u>38.51<u>12.84</u>37.81
Gemini-2.0-Flash52.4333.3313.5133.47
Gemini-2.5-Flash58.61<u>39.86</u>12.16<u>38.02</u>
*Open-Source VLMs*
Qwen2.5-VL-3B-Inst51.0720.272.7126.86
Qwen2.5-VL-7B-Inst52.6924.673.3829.75
Qwen2.5-VL-32B-Inst50.5425.274.0528.72
MiMo-VL-7B-SFT-250849.4630.419.4631.19
ADIEE--------
*Reward Models (Ours)*
EditReward (on Qwen2.5-VL-7B)56.9936.0010.8136.78
EditReward (on MiMo-VL-7B)56.4542.6711.4938.42

</details>


๐Ÿ“š Citation

Please kindly cite our paper if you use our code, data, models or results:

bibtex
@article{wu2025editreward,
  title={EditReward: A Human-Aligned Reward Model for Instruction-Guided Image Editing},
  author={Wu, Keming and Jiang, Sicong and Ku, Max and Nie, Ping and Liu, Minghao and Chen, Wenhu},
  journal={arXiv preprint arXiv:2509.26346},
  year={2025}
}

๐Ÿ™ Acknowledgements

We would like to thank the HPSv3, VideoAlign and GenAI-Bench codebase for providing valuable references.


โญ Star History

![Star History Chart](https://star-history.com/#TIGER-AI-Lab/EditReward&Date)

๐Ÿ’ฌ Support

For questions and support:

  • โ€”Issues: GitHub Issues
  • โ€”Email: wukeming0608@gmail.com & wenhuchen@uwaterloo.ca