Upload miro-only-vqa weights
Browse files- .gitattributes +1 -0
- miro-only-vqa/README.md +166 -0
- miro-only-vqa/config.json +69 -0
- miro-only-vqa/model.safetensors +3 -0
- miro-only-vqa/teaser.jpg +3 -0
- miro-only-vqa/uncond_embedding.npy +3 -0
.gitattributes
CHANGED
|
@@ -47,3 +47,4 @@ miro-only-hpsv2/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
|
| 47 |
miro-only-image-reward/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
| 48 |
miro-only-pickscore/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
| 49 |
miro-only-sciscore/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 47 |
miro-only-image-reward/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
| 48 |
miro-only-pickscore/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
| 49 |
miro-only-sciscore/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
miro-only-vqa/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
miro-only-vqa/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
# VQAScore-only specialist (paper baseline)
|
| 14 |
+
|
| 15 |
+

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