Instructions to use Jialuo21/Imago-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Jialuo21/Imago-2B with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Jialuo21/Imago-2B", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Upload final full-parameter Imago-2B transformer weights
Browse files- README.md +56 -0
- config.json +26 -0
- diffusion_pytorch_model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers
|
| 3 |
+
library_name: diffusers
|
| 4 |
+
pipeline_tag: text-to-image
|
| 5 |
+
tags:
|
| 6 |
+
- text-to-image
|
| 7 |
+
- diffusers
|
| 8 |
+
- reinforcement-learning
|
| 9 |
+
- imago
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Imago-2B
|
| 13 |
+
|
| 14 |
+
**Imago-2B** is a full-parameter RL post-trained DiT transformer from *Imago: Maturing Visual Generation with RL*, initialized from [`Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers`](https://huggingface.co/Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers).
|
| 15 |
+
|
| 16 |
+
## Benchmark Results (Kimi-K2.6 Judge)
|
| 17 |
+
|
| 18 |
+
| Model | Mean | T2I-CompBench | TIIF-Bench | SpatialGenEval | T2I-CoReBench | LPD-Bench | Arena-T2I-Hard | LongBench-T2I | DrawBench PickScore |
|
| 19 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 20 |
+
| Imago-2B | **72.1** | 3.94 | 75.1 | 73.5 | 63.7 | 91.4 | 61.9 | 3.03 | 22.7 |
|
| 21 |
+
| SANA-1.5 (Base) | 63.5 | 3.71 | 69.2 | 63.2 | 53.4 | 83.1 | 51.5 | 2.49 | 22.7 |
|
| 22 |
+
|
| 23 |
+
## Training Recipe
|
| 24 |
+
- **Reward**: Zero-shot Qwen3.5-9B ProbScore
|
| 25 |
+
- **Curriculum**: Two-stage sequential RL (`Jialuo21/Imago-Short` -> `Jialuo21/Imago-Long`)
|
| 26 |
+
- **Algorithm**: DiffusionNFT with Branch Sampling, DAVE, and scalar velocity norm regularization (no CFG, no KL penalty)
|
| 27 |
+
- **Settings**: LR `1e-5`, 500 steps on `Imago-Short` -> 500 steps on `Imago-Long`, Branch Sampling (`t in [0.5, 1.0]`), DAVE (`block 16/20`), Norm Reg. (`beta=0.05`)
|
| 28 |
+
|
| 29 |
+
## Usage
|
| 30 |
+
|
| 31 |
+
This repository contains the fine-tuned DiT transformer weights (`config.json` + `diffusion_pytorch_model.safetensors`). Load it into the base `SanaPipeline`:
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
import torch
|
| 35 |
+
from diffusers import SanaPipeline, SanaTransformer2DModel
|
| 36 |
+
|
| 37 |
+
transformer = SanaTransformer2DModel.from_pretrained(
|
| 38 |
+
"Jialuo21/Imago-2B",
|
| 39 |
+
torch_dtype=torch.bfloat16,
|
| 40 |
+
)
|
| 41 |
+
pipe = SanaPipeline.from_pretrained(
|
| 42 |
+
"Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers",
|
| 43 |
+
transformer=transformer,
|
| 44 |
+
torch_dtype=torch.bfloat16,
|
| 45 |
+
).to("cuda")
|
| 46 |
+
|
| 47 |
+
image = pipe(
|
| 48 |
+
prompt="A weathered brass telescope resting on a wooden tripod next to an open leather-bound star atlas on a stone balcony overlooking a moonlit harbor.",
|
| 49 |
+
height=1024,
|
| 50 |
+
width=1024,
|
| 51 |
+
num_inference_steps=20,
|
| 52 |
+
guidance_scale=4.5,
|
| 53 |
+
generator=torch.Generator("cuda").manual_seed(0),
|
| 54 |
+
).images[0]
|
| 55 |
+
image.save("imago-2b.png")
|
| 56 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "SanaTransformer2DModel",
|
| 3 |
+
"_diffusers_version": "0.37.0.dev0",
|
| 4 |
+
"_name_or_path": "saves/imago-1.6b-full-v4-lr1e5-stage1-short-s42/checkpoints/checkpoint-500",
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_head_dim": 32,
|
| 7 |
+
"caption_channels": 2304,
|
| 8 |
+
"cross_attention_dim": 2240,
|
| 9 |
+
"cross_attention_head_dim": 112,
|
| 10 |
+
"dropout": 0.0,
|
| 11 |
+
"guidance_embeds": false,
|
| 12 |
+
"guidance_embeds_scale": 0.1,
|
| 13 |
+
"in_channels": 32,
|
| 14 |
+
"interpolation_scale": null,
|
| 15 |
+
"mlp_ratio": 2.5,
|
| 16 |
+
"norm_elementwise_affine": false,
|
| 17 |
+
"norm_eps": 1e-06,
|
| 18 |
+
"num_attention_heads": 70,
|
| 19 |
+
"num_cross_attention_heads": 20,
|
| 20 |
+
"num_layers": 20,
|
| 21 |
+
"out_channels": 32,
|
| 22 |
+
"patch_size": 1,
|
| 23 |
+
"qk_norm": "rms_norm_across_heads",
|
| 24 |
+
"sample_size": 32,
|
| 25 |
+
"timestep_scale": 1.0
|
| 26 |
+
}
|
diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d05f25e43882e15334a37966775adc1e21132db5616e3e5bc59fc22ff43e9cc
|
| 3 |
+
size 6418622624
|