carolineec/CycleReward-T2I

Model

0

stars

4

commits

1

repos using this model

1

linked in READMEs

Jun 16, 2025

updated

CycleReward-T2I
model_hub_mixin
pytorch_model_hub_mixin
safetensors

README

Model Card for CycleReward-T2I

Project page | Paper | Code

Reward model for image-text alignment trained on text-to-image comparison pairs from CyclePrefDB-T2I datasets.

This model has been pushed to the Hub using the PytorchModelHubMixin integration.

Loading the model

Download the model.py, med_config.json files and blip folder from this repository. You can load the pretrained model using the code below:

import torch
from PIL import Image
from model import CycleReward

device='cuda'
model = CycleReward.from_pretrained("carolineec/CycleReward-T2I")
model.to(device)
model.eval()

preprocess = model.preprocess
image_path = "cat.jpg"
caption = "a photo of a cat"
image = preprocess(Image.open(image_path)).unsqueeze(0).to(device)
print('prepared data')

score = model.score(image, caption) 
print('my score:', score.item())

Citation

@article{bahng2025cyclereward,
title={Cycle Consistency as Reward: Learning Image-Text Alignment without Human Preferences},
author= {Bahng, Hyojin and Chan, Caroline and Durand, Fredo and Isola, Phillip},
journal={arXiv preprint arXiv:2506.02095},
year={2025}
}

Contributors

carolineec

4 commits

carolineec/CycleReward-T2I

Model

0

stars

4

commits

1

repos using this model

1

linked in READMEs

Jun 16, 2025

updated

CycleReward-T2I
model_hub_mixin
pytorch_model_hub_mixin
safetensors

README

Model Card for CycleReward-T2I

Project page | Paper | Code

Reward model for image-text alignment trained on text-to-image comparison pairs from CyclePrefDB-T2I datasets.

This model has been pushed to the Hub using the PytorchModelHubMixin integration.

Loading the model

Download the model.py, med_config.json files and blip folder from this repository. You can load the pretrained model using the code below:

import torch
from PIL import Image
from model import CycleReward

device='cuda'
model = CycleReward.from_pretrained("carolineec/CycleReward-T2I")
model.to(device)
model.eval()

preprocess = model.preprocess
image_path = "cat.jpg"
caption = "a photo of a cat"
image = preprocess(Image.open(image_path)).unsqueeze(0).to(device)
print('prepared data')

score = model.score(image, caption) 
print('my score:', score.item())

Citation

@article{bahng2025cyclereward,
title={Cycle Consistency as Reward: Learning Image-Text Alignment without Human Preferences},
author= {Bahng, Hyojin and Chan, Caroline and Durand, Fredo and Isola, Phillip},
journal={arXiv preprint arXiv:2506.02095},
year={2025}
}

Contributors

carolineec

4 commits