THUDM / ImageReward

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: May 22 2023
text-to-image

Introduction of ImageReward

Model Details of ImageReward

ImageReward

Github Repo • 🐦 Twitter • 📃 Paper

ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation

ImageReward is the first general-purpose text-to-image human preference RM which is trained on in total 137k pairs of expert comparisons, based on text prompts and corresponding model outputs from DiffusionDB. We demonstrate that ImageReward outperforms existing text-image scoring methods, such as CLIP, Aesthetic, and BLIP, in terms of understanding human preference in text-to-image synthesis through extensive analysis and experiments.

ImageReward

Quick Start
Install Dependency

We have integrated the whole repository to a single python package image-reward . Following the commands below to prepare the environment:

# Clone the ImageReward repository (containing data for testing)
git clone https://github.com/THUDM/ImageReward.git
cd ImageReward

# Install the integrated package `image-reward`
pip install image-reward
Example Use

We provide example images in the assets/images directory of this repo. The example prompt is:

a painting of an ocean with clouds and birds, day time, low depth field effect

Use the following code to get the human preference scores from ImageReward:

import os
import torch
import ImageReward as reward

if __name__ == "__main__":
    prompt = "a painting of an ocean with clouds and birds, day time, low depth field effect"
    img_prefix = "assets/images"
    generations = [f"{pic_id}.webp" for pic_id in range(1, 5)]
    img_list = [os.path.join(img_prefix, img) for img in generations]
    model = reward.load("ImageReward-v1.0")
    with torch.no_grad():
        ranking, rewards = model.inference_rank(prompt, img_list)
        # Print the result
        print("\nPreference predictions:\n")
        print(f"ranking = {ranking}")
        print(f"rewards = {rewards}")
        for index in range(len(img_list)):
            score = model.score(prompt, img_list[index])
            print(f"{generations[index]:>16s}: {score:.2f}")

The output should be like as follow (the exact numbers may be slightly different depending on the compute device):

Preference predictions:

ranking = [1, 2, 3, 4]
rewards = [[0.5811622738838196], [0.2745276093482971], [-1.4131819009780884], [-2.029569625854492]]
          1.webp: 0.58
          2.webp: 0.27
          3.webp: -1.41
          4.webp: -2.03
Citation
@misc{xu2023imagereward,
      title={ImageReward: Learning and Evaluating Human Preferences for Text-to-Image Generation}, 
      author={Jiazheng Xu and Xiao Liu and Yuchen Wu and Yuxuan Tong and Qinkai Li and Ming Ding and Jie Tang and Yuxiao Dong},
      year={2023},
      eprint={2304.05977},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Runs of THUDM ImageReward on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About ImageReward huggingface.co Model

More ImageReward license Visit here:

https://choosealicense.com/licenses/apache-2.0

ImageReward huggingface.co

ImageReward huggingface.co is an AI model on huggingface.co that provides ImageReward's model effect (), which can be used instantly with this THUDM ImageReward model. huggingface.co supports a free trial of the ImageReward model, and also provides paid use of the ImageReward. Support call ImageReward model through api, including Node.js, Python, http.

ImageReward huggingface.co Url

https://huggingface.co/THUDM/ImageReward

THUDM ImageReward online free

ImageReward huggingface.co is an online trial and call api platform, which integrates ImageReward's modeling effects, including api services, and provides a free online trial of ImageReward, you can try ImageReward online for free by clicking the link below.

THUDM ImageReward online free url in huggingface.co:

https://huggingface.co/THUDM/ImageReward

ImageReward install

ImageReward is an open source model from GitHub that offers a free installation service, and any user can find ImageReward on GitHub to install. At the same time, huggingface.co provides the effect of ImageReward install, users can directly use ImageReward installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ImageReward install url in huggingface.co:

https://huggingface.co/THUDM/ImageReward

Url of ImageReward

ImageReward huggingface.co Url

Provider of ImageReward huggingface.co

THUDM
ORGANIZATIONS

Other API from THUDM

huggingface.co

Total runs: 659.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 05 2024
huggingface.co

Total runs: 611.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 243.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 11 2025
huggingface.co

Total runs: 95.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 13 2025
huggingface.co

Total runs: 69.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 28.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 03 2025
huggingface.co

Total runs: 23.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 15.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 14 2025
huggingface.co

Total runs: 6.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 19 2023
huggingface.co

Total runs: 6.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2024
huggingface.co

Total runs: 4.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 22 2025
huggingface.co

Total runs: 3.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 2.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 993
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 928
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 853
Run Growth: 0
Growth Rate: 0.00%
Updated:January 27 2025
huggingface.co

Total runs: 607
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 299
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 188
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 167
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 119
Run Growth: 0
Growth Rate: 0.00%
Updated:December 10 2024
huggingface.co

Total runs: 75
Run Growth: 0
Growth Rate: 0.00%
Updated:November 20 2023
huggingface.co

Total runs: 62
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 28
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 25
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 14
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:July 22 2024