nicolas-dufour commited on
Commit
02d7ec4
·
verified ·
1 Parent(s): 09e1ff6

Upload main weights

Browse files
Files changed (4) hide show
  1. README.md +154 -0
  2. config.json +82 -0
  3. model.safetensors +3 -0
  4. uncond_embedding.npy +3 -0
README.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: miro-t2i
4
+ tags:
5
+ - text-to-image
6
+ - diffusion
7
+ - flow-matching
8
+ - miro
9
+ - reward-conditioning
10
+ pipeline_tag: text-to-image
11
+ ---
12
+
13
+ # MIRO (main)
14
+
15
+ **Main MIRO checkpoint.** Trained jointly on all seven reward signals (CLIP, aesthetic, ImageReward, PickScore, HPSv2, VQAScore, SciScore) with a 50/50 mix of original and synthetic captions.
16
+
17
+ This checkpoint accompanies the paper
18
+ **MIRO: MultI-Reward cOnditioned pretraining improves T2I quality and efficiency**
19
+ (Dufour, Degeorge, Ghosh, Kalogeiton, Picard — ICML 2026).
20
+
21
+ | | |
22
+ |---|---|
23
+ | **Paper** | <https://arxiv.org/abs/2510.25897> |
24
+ | **Project page** | <https://nicolas-dufour.github.io/miro/> |
25
+ | **Code** | <https://github.com/nicolas-dufour/miro> |
26
+ | **Parameters** | 360.4M |
27
+ | **Resolution** | 256×256 (SDXL VAE latent space) |
28
+ | **Architecture** | RIN flow-matching backbone, FLAN-T5-XL text conditioning |
29
+ | **Training data** | CC12M + LAION Aesthetics 6.0 |
30
+ | **Reward signals** | `clip_score`, `aesthetic_score`, `image_reward_score`, `pick_a_score_score`, `hpsv2_score`, `vqa_score`, `sciscore_score` |
31
+
32
+ ## Usage
33
+
34
+ ```python
35
+ import torch
36
+ from miro import MiroPipeline
37
+
38
+ pipe = MiroPipeline.from_pretrained("nicolas-dufour/miro")
39
+ pipe = pipe.to("cuda", torch.float16)
40
+
41
+ image = pipe(
42
+ "a corgi astronaut on Mars",
43
+ num_inference_steps=50,
44
+ guidance_scale=7.0,
45
+ )[0]
46
+ image.save("out.png")
47
+ ```
48
+
49
+ ### Reward conditioning
50
+
51
+ MIRO conditions the flow model on a vector of reward targets in addition to the
52
+ text prompt. By default every reward is requested at its maximum (`1.0`); you
53
+ can override individual axes to bias generation toward a particular trade-off:
54
+
55
+ ```python
56
+ image = pipe(
57
+ "a chest x-ray showing pneumonia",
58
+ reward_targets={
59
+ "clip_score": 1.0, # strict prompt alignment
60
+ "aesthetic_score": 0.3, # de-prioritise prettiness
61
+ "sciscore_score": 1.0, # prioritise scientific accuracy
62
+ # any reward not listed defaults to 1.0
63
+ },
64
+ negative_reward_targets={
65
+ # zeros by default; what to push the unconditional branch toward
66
+ },
67
+ guidance_scale=7.0,
68
+ )[0]
69
+ ```
70
+
71
+ The seven reward dimensions are:
72
+
73
+ | Reward | Normalised range | What it measures |
74
+ |---|---|---|
75
+ | `clip_score` | ~[0, 1] | CLIP text–image alignment |
76
+ | `aesthetic_score` | ~[0, 1] | LAION aesthetic-quality predictor |
77
+ | `image_reward_score` | ~[0, 1] | ImageReward (general preference model) |
78
+ | `pick_a_score_score` | ~[0, 1] | PickScore (human preference) |
79
+ | `hpsv2_score` | ~[0, 1] | HPSv2 (human preference v2) |
80
+ | `vqa_score` | ~[0, 1] | VQAScore (compositional faithfulness) |
81
+ | `sciscore_score` | ~[0, 1] | SciScore (scientific-image plausibility) |
82
+
83
+ ## Reported benchmarks
84
+
85
+ The paper reports the following headline numbers for the **main MIRO** model
86
+ (this repo's `nicolas-dufour/miro`):
87
+
88
+ | Metric | MIRO (350M) | FLUX-dev (12B) |
89
+ |---|---|---|
90
+ | GenEval (overall) | **75** (with inference-time reward tuning) / 68 (default) | 67 |
91
+ | Inference compute | **1×** | ~370× |
92
+ | Aesthetic-metric convergence vs. baseline pretraining | **19×** faster | — |
93
+
94
+ Per-variant scores (GenEval, FID, individual reward scores) for the eight
95
+ ablations are reported in the paper's ablation tables. Please refer to
96
+ [arXiv:2510.25897](https://arxiv.org/abs/2510.25897) for the full breakdown.
97
+
98
+ ## Training compute and data
99
+
100
+ - **Default hardware**: 2 nodes × 8 H100 GPUs (16× H100, `16-mixed` precision)
101
+ - **Optimiser**: LAMB, lr 1e-3 (5k warmup → cosine decay), weight decay 1e-2
102
+ - **Batch size**: 1024 globally (64 per GPU on 16× H100), gradient-clip 2.0
103
+ - **Steps**: 500 k (≈ ~29 epochs over the enriched training set)
104
+ - **Wall-clock on 16× H100**: ~52 hours (≈ 2.65 train it/s sustained)
105
+ - **8-GPU fallback**: 1 node × 8 H100 with `trainer.accumulate_grad_batches=2`,
106
+ measured at **≈ 1.45 train it/s** → ~96 hours (~4 days) end-to-end.
107
+ Requires `trainer.strategy.static_graph=false` and
108
+ `trainer.strategy.find_unused_parameters=true` to play well with the
109
+ self-conditioning skip in the loss; both flags are set automatically by
110
+ `miro/slurm/launch_multicad_synth_8gpu.py`.
111
+ - **Data**: CC12M + LAION Aesthetics 6.0, encoded to SDXL VAE latents at 256
112
+ resolution. Each sample is paired with seven reward scores and FLAN-T5-XL
113
+ embeddings of both the original and a synthetic caption, computed by
114
+ [`miro/data/preprocess_data.py`](https://github.com/nicolas-dufour/miro/blob/main/data/preprocess_data.py).
115
+
116
+ ## Limitations and intended use
117
+
118
+ This checkpoint is a research artifact released to reproduce and build on the
119
+ MIRO paper. Known limitations:
120
+
121
+ - **Resolution**: 256×256 only. Higher-resolution outputs require upscaling.
122
+ - **Domain**: trained on web-scraped image–caption pairs (CC12M + LAION
123
+ Aesthetics 6.0). Inherits the biases of those datasets — including
124
+ under-representation of many cultures, languages, and concepts, and the
125
+ presence of stereotypes. Generations may reflect or amplify these biases.
126
+ - **Reward-model biases**: the seven reward predictors used during training
127
+ encode their own biases (e.g. aesthetic and human-preference models reflect
128
+ the taste of their annotator pools). Conditioning on these rewards inherits
129
+ and can sharpen those biases.
130
+ - **Not for safety-critical use**: outputs are not factual and the SciScore
131
+ reward does not guarantee scientific accuracy.
132
+ - **No safety filter** is shipped with the model; users deploying it in
133
+ user-facing settings should add their own.
134
+
135
+ The model is released under the MIT license; the SDXL VAE and FLAN-T5-XL
136
+ encoder it depends on at inference time are loaded from
137
+ [`stabilityai/sdxl-vae`](https://huggingface.co/stabilityai/sdxl-vae) and
138
+ [`google/flan-t5-xl`](https://huggingface.co/google/flan-t5-xl) and are
139
+ subject to their respective licenses.
140
+
141
+ ## Citation
142
+
143
+ ```bibtex
144
+ @inproceedings{dufour2026miro,
145
+ title = {{MIRO}: {M}ult{I}-{R}eward c{O}nditioned pretraining improves {T2I} quality and efficiency},
146
+ author = {Dufour, Nicolas and Degeorge, Lucas and Ghosh, Arijit and Kalogeiton, Vicky and Picard, David},
147
+ booktitle = {International Conference on Machine Learning (ICML)},
148
+ year = {2026}
149
+ }
150
+ ```
151
+
152
+ ## License
153
+
154
+ MIT — see <https://github.com/nicolas-dufour/miro/blob/main/LICENSE>.
config.json ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "network": {
3
+ "data_size": 32,
4
+ "data_dim": 512,
5
+ "num_input_channels": 4,
6
+ "num_latents": 256,
7
+ "latents_dim": 1024,
8
+ "label_dim": 2048,
9
+ "num_cond_tokens": 77,
10
+ "num_processing_layers": 4,
11
+ "num_blocks": 4,
12
+ "patch_size": 2,
13
+ "read_write_heads": 16,
14
+ "compute_heads": 32,
15
+ "latent_mlp_multiplier": 4,
16
+ "data_mlp_multiplier": 4,
17
+ "compute_dropout": 0,
18
+ "rw_stochastic_depth": 0,
19
+ "compute_stochastic_depth": 0,
20
+ "concat_cond_token_to_latents": false,
21
+ "use_cond_rin_block": true,
22
+ "num_text_registers": 16,
23
+ "coherence_keys": [
24
+ "clip_score",
25
+ "aesthetic_score",
26
+ "image_reward_score",
27
+ "pick_a_score_score",
28
+ "hpsv2_score",
29
+ "vqa_score",
30
+ "sciscore_score"
31
+ ],
32
+ "coherence_dropout": 0.0,
33
+ "dropout_strategy": "binomial",
34
+ "use_self_conditioning": true
35
+ },
36
+ "preconditioning": {
37
+ "num_latents": 256,
38
+ "latents_dim": 1024,
39
+ "do_normalization": true,
40
+ "sigma_data": 0.5,
41
+ "do_gradnorm_reweighting": true,
42
+ "logvar_channels": 128,
43
+ "logvar_mlp_layers": 0
44
+ },
45
+ "data_preprocessing": {
46
+ "input_key_mean": "vae_embeddings_mean_256",
47
+ "input_key_std": "vae_embeddings_std_256",
48
+ "output_key_root": "x_0",
49
+ "vae_sample": true,
50
+ "channel_wise_normalisation": true,
51
+ "model_type": "sdxl"
52
+ },
53
+ "postprocessing": {
54
+ "channel_wise_normalisation": true,
55
+ "model_type": "sdxl"
56
+ },
57
+ "scheduler": {
58
+ "start": 1,
59
+ "end": 0,
60
+ "clip_min": 1e-09
61
+ },
62
+ "coherence_keys": [
63
+ "clip_score",
64
+ "aesthetic_score",
65
+ "image_reward_score",
66
+ "pick_a_score_score",
67
+ "hpsv2_score",
68
+ "vqa_score",
69
+ "sciscore_score"
70
+ ],
71
+ "sampler_defaults": {
72
+ "num_steps": 50,
73
+ "guidance_scale": 7.0,
74
+ "sigma_data": 0.5
75
+ },
76
+ "data_resolution": 32,
77
+ "img_resolution": 256,
78
+ "max_text_len": 77,
79
+ "model_type": "sdxl",
80
+ "vae_repo": "stabilityai/sdxl-vae",
81
+ "text_encoder_repo": "google/flan-t5-xl"
82
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:152f209a3c83df3c14967495f278888cf5038e81e1bf3a1c6be89c749ff2cf80
3
+ size 720895255
uncond_embedding.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c18c7b19cb2a19a559949ff090c08f6c74dd2502a203c4ac2a93d06dd232d9d7
3
+ size 8320