File size: 8,646 Bytes
bdeda06
80410e0
bdeda06
 
 
 
 
 
 
 
 
 
 
 
 
 
80410e0
bdeda06
 
 
d132805
bdeda06
 
 
 
 
80410e0
 
bdeda06
 
 
 
 
ce0fdd0
 
 
 
 
 
bdeda06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ce0fdd0
 
 
 
bdeda06
 
 
 
ce0fdd0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bdeda06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8918edb
 
 
 
 
 
 
 
bdeda06
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
---
license: apache-2.0
library_name: diffusers
tags:
  - text-to-image
  - image-to-image
  - image-editing
  - diffusers
  - lora
  - peft
  - reinforcement-learning
  - rubric-policy-optimization
  - auto-rubric
base_model:
  - black-forest-labs/FLUX.1-dev
  - Qwen/Qwen-Image-Edit
---

# ARR-RPO

[Project Page](https://openenvision.github.io/AutoRubric-as-Reward/) | [Code](https://github.com/OpenEnvision/AutoRubric-as-Reward) | [Paper](https://arxiv.org/abs/2605.08354v1) | [Model Weights](https://huggingface.co/OpenEnvisionLab/Auto-Rubric-as-Reward/)

## Model Description

ARR-RPO provides two LoRA adapters trained with **Auto-Rubric as Reward (ARR)** and **Rubric Policy Optimization (RPO)** for visual generation:

- **`ARR-FLUX.1-dev/`**: a LoRA adapter for FLUX.1-dev text-to-image generation.
- **`ARR-Qwen-Image-Edit/`**: a LoRA adapter for Qwen-Image-Edit instruction-guided image editing.

ARR-RPO uses a frozen VLM judge conditioned on explicit auto-generated rubrics. During RPO training, two candidate outputs are sampled for the same prompt or edit instruction, the ARR judge selects the preferred output, and the preferred/dispreferred candidates receive binary rewards. The goal is to improve prompt faithfulness, visual quality, compositional alignment, and edit fidelity without training a separate scalar reward model.

## Model Details


| Adapter               | Base model                     | Task          | LoRA rank | LoRA alpha | Framework        |
| --------------------- | ------------------------------ | ------------- | --------- | ---------- | ---------------- |
| `ARR-FLUX.1-dev`      | `black-forest-labs/FLUX.1-dev` | Text-to-image | 16        | 32         | Diffusers + PEFT |
| `ARR-Qwen-Image-Edit` | `Qwen/Qwen-Image-Edit`         | Image editing | 32        | 64         | Diffusers + PEFT |


### Adapter Files

```text
ARR-RPO/
  ARR-FLUX.1-dev/
    adapter_config.json
    adapter_model.safetensors
  ARR-Qwen-Image-Edit/
    adapter_config.json
    adapter_model.safetensors
```

### FLUX Adapter Targets

The FLUX LoRA adapter is configured for `FluxTransformer2DModel` and targets attention and feed-forward modules, including:

```text
attn.to_q, attn.to_k, attn.to_v, attn.to_out.0,
attn.add_q_proj, attn.add_k_proj, attn.add_v_proj, attn.to_add_out,
ff.net.0.proj, ff.net.2, ff_context.net.0.proj, ff_context.net.2
```

### Qwen-Image-Edit Adapter Targets

The Qwen-Image-Edit LoRA adapter is configured for `QwenImageTransformer2DModel` and targets attention projection modules, including:

```text
attn.to_q, attn.to_k, attn.to_v, attn.to_out.0,
attn.add_q_proj, attn.add_k_proj, attn.add_v_proj, attn.to_add_out
```

## Intended Use

These adapters are intended for research and development on:

- improving text-to-image generation with rubric-guided preference rewards;
- improving instruction-guided image editing while preserving source-image content;
- studying Auto-Rubric as an interpretable alternative to scalar reward models;
- reproducing and extending ARR-RPO experiments.

They are not intended for safety-critical, medical, legal, or identity-sensitive decision-making. Generated or edited images should be reviewed before use in downstream products.

## How ARR-RPO Works

ARR-RPO separates reward construction into explicit criteria and binary preference decisions:

```text
visual preference examples
  -> auto-generated rubrics
  -> verified and structured rubric set
  -> frozen VLM judge
  -> pairwise preference decision
  -> RPO binary reward
```

For pairwise RPO, the preferred candidate receives `+1.0` and the dispreferred candidate receives `-0.1`.

## Using The Models

Install a recent Diffusers/PEFT environment that supports the corresponding base model.

### FLUX.1-dev LoRA

```python
import torch
from diffusers import FluxPipeline

base_model = "black-forest-labs/FLUX.1-dev"
adapter_repo = "OpenEnvisionLab/ARR-RPO"

pipe = FluxPipeline.from_pretrained(
    base_model,
    torch_dtype=torch.bfloat16,
)
pipe.load_lora_weights(
    adapter_repo,
    subfolder="ARR-FLUX.1-dev",
)
pipe.to("cuda")

image = pipe(
    "A cinematic portrait of a ceramic robot chef in a warm kitchen.",
    guidance_scale=3.5,
    num_inference_steps=30,
).images[0]
image.save("arr_flux_example.png")
```

### Qwen-Image-Edit LoRA

```python
import torch
from PIL import Image
from diffusers import QwenImageEditPipeline

base_model = "Qwen/Qwen-Image-Edit"
adapter_repo = "OpenEnvisionLab/ARR-RPO"

pipe = QwenImageEditPipeline.from_pretrained(
    base_model,
    torch_dtype=torch.bfloat16,
)
pipe.load_lora_weights(
    adapter_repo,
    subfolder="ARR-Qwen-Image-Edit",
)
pipe.to("cuda")

source = Image.open("source.png").convert("RGB")
image = pipe(
    image=source,
    prompt="Replace the sky with a sunset while preserving the building.",
    num_inference_steps=30,
).images[0]
image.save("arr_qwen_edit_example.png")
```

If your Diffusers version uses a different Qwen-Image-Edit pipeline class or call signature, keep the same adapter subfolder and follow the base model's official loading example.

## Qualitative Examples

Qualitative examples for both released adapters are provided in the project materials. If you want to host rendered images directly in this repository, upload them with Hugging Face Xet storage rather than regular git binary tracking.

## Training Details

ARR-RPO was trained with LoRA and pairwise online preference optimization.


| Hyperparameter                 | FLUX.1-dev          | Qwen-Image-Edit     |
| ------------------------------ | ------------------- | ------------------- |
| Training method                | RPO with ARR reward | RPO with ARR reward |
| Candidates per prompt          | 2                   | 2                   |
| Positive reward                | `1.0`               | `1.0`               |
| Negative reward                | `0.1`               | `0.1`               |
| Learning rate                  | `5e-5`              | `1e-5`              |
| PPO clip range                 | `0.2`               | `0.2`               |
| KL coefficient                 | `0.01`              | `0.02`              |
| Sampling steps during training | 8                   | 10                  |
| Optimizer                      | AdamW               | AdamW               |
| Gradient clipping              | `1.0`               | `1.0`               |
| LoRA rank                      | 16                  | 32                  |


The reward judge is a frozen VLM conditioned on auto-generated visual rubrics. No trainable scalar reward model is required.

## Evaluation Summary

ARR-RPO is designed to improve alignment with multi-dimensional visual preferences. In the associated experiments, ARR-RPO improves over the corresponding unaligned base models on text-to-image and image-editing benchmarks, with gains attributed to explicit rubric-conditioned reward signals rather than opaque scalar regression.

Recommended evaluation axes include:

- text-to-image prompt adherence and compositional correctness;
- image-edit instruction fulfillment;
- source-image preservation for editing;
- artifact control and visual coherence;
- pairwise human or VLM preference accuracy;
- position-bias checks by swapping candidate order.

## Limitations

- These are LoRA adapters and require the corresponding base model weights.
- Output quality still depends on the base model, prompt quality, scheduler, seed, and inference settings.
- The ARR reward signal depends on the chosen VLM judge and rubric quality.
- Image editing may still alter unrelated source-image regions, especially under ambiguous instructions.
- The model card does not guarantee safety filtering; users should apply appropriate content and policy filters for deployment.

## License

The model card metadata declares `apache-2.0`. Users must also comply with the licenses and terms of the base models:

- `black-forest-labs/FLUX.1-dev`
- `Qwen/Qwen-Image-Edit`

## Citation

If you use these adapters, please cite the ARR-RPO project:

```bibtex
@misc{tian2026autorubricrewardimplicitpreferences,
      title={Auto-Rubric as Reward: From Implicit Preferences to Explicit Multimodal Generative Criteria}, 
      author={Juanxi Tian and Fengyuan Liu and Jiaming Han and Yilei Jiang and Yongliang Wu and Yesheng Liu and Haodong Li and Furong Xu and Wanhua Li},
      year={2026},
      eprint={2605.08354},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2605.08354}, 
}
```

## Contact

For questions, issues, or updates, please use the project repository or Hugging Face community tab.