Imago-8B image generation model with RL fine-tuning
1 min readupdated
Imago-8B is a generative model based on the DiT (diffusion transformer) architecture, fine-tuned using reinforcement learning (RL). It is built on the baidu/ERNIE-Image model and has approximately 8 billion parameters. The model improves image generation quality across various artistic styles and aspect ratios without relying on a traditional prompt enhancer. It is useful for researchers and developers working with visual content using diffusers.
Key features
- Full RL post-training using the DiffusionNFT algorithm
- Improved benchmark metrics compared to the baseline ERNIE-Image
- Two-stage curriculum learning program
- Compatibility with the diffusers library and safetensors weight loading
What you can do
- Generate detailed images from text prompts using a Python pipeline
- Create images in custom aspect ratios ranging from 21:9 to 9:21
- Experiment with generation across diverse artistic styles
Example
import torch
from diffusers import ErnieImagePipeline, ErnieImageTransformer2DModel
transformer = ErnieImageTransformer2DModel.from_pretrained(
"Jialuo21/Imago-8B",
torch_dtype=torch.bfloat16,
)
pipe = ErnieImagePipeline.from_pretrained(
"baidu/ERNIE-Image",
transformer=transformer,
pe=None,
pe_tokenizer=None,
torch_dtype=torch.bfloat16,
).to("cuda")
image = pipe(
prompt="A weathered brass telescope resting on a wooden tripod...",
height=1024,
width=1024,
num_inference_steps=50,
guidance_scale=4.0,
use_pe=False,
generator=torch.Generator("cuda").manual_seed(0),
).images[0]
image.save("imago-8b.png")Read more
DetailsAverage benchmark score: Imago-8B — 87.7, ERNIE-Image — 84.2
Training recipe: Zero-shot Qwen3.5-9B ProbScore reward, DiffusionNFT algorithm
Settings: LR 8e-6, 800 + 800 steps for the Imago-Short and Imago-Long stages










Comments