NagaSaiAbhinay commited on
Commit
faf7391
·
verified ·
1 Parent(s): c14c1cf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -3
README.md CHANGED
@@ -11,11 +11,34 @@ port of [cyclereward](https://github.com/hjbahng/cyclereward)
11
 
12
  There are three variants of the CycleReward model:
13
  1. CycleReward-Combo (This model)
14
- 2. [CycleReward-I2T]()
15
- 3. [CycleReward-T2I]()
16
 
17
 
18
  This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
19
  - Code: https://github.com/Abhinay1997/imscore, cyclereward branch
20
  - Paper: [2506.02095](https://arxiv.org/pdf/2506.02095)
21
- - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  There are three variants of the CycleReward model:
13
  1. CycleReward-Combo (This model)
14
+ 2. [CycleReward-I2T](https://huggingface.co/NagaSaiAbhinay/CycleReward-I2T)
15
+ 3. [CycleReward-T2I](https://huggingface.co/NagaSaiAbhinay/CycleReward-T2I)
16
 
17
 
18
  This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
19
  - Code: https://github.com/Abhinay1997/imscore, cyclereward branch
20
  - Paper: [2506.02095](https://arxiv.org/pdf/2506.02095)
21
+ - Docs: [More Information Needed]
22
+
23
+ To use this model:
24
+ - install imscore from my fork
25
+ ```bash
26
+ pip install git+https://github.com/Abhinay1997/imscore@cyclereward
27
+ ```
28
+ - use the model as follows
29
+ ```python
30
+ from imscore.cyclereward.model import CycleReward
31
+ available_models = ["NagaSaiAbhinay/CycleReward-Combo" "NagaSaiAbhinay/CycleReward-T2I", "NagaSaiAbhinay/CycleReward-I2T"]
32
+ model_id = available_models[0]
33
+ model = CycleReward.from_pretrained(model_id)
34
+
35
+ prompts = "a photo of a cat"
36
+ pixels = Image.open("cat.jpg")
37
+ pixels = np.array(pixels)
38
+ pixels = rearrange(torch.tensor(pixels), "h w c -> 1 c h w") / 255.0
39
+
40
+ # prompts and pixels should have the same batch dimension
41
+ # pixels should be in the range [0, 1]
42
+ # score == logits
43
+ score = model.score(pixels, prompts) # full differentiable reward)
44
+ ```