ModelMicrosoftMicrosoftpublished Jul 21, 2026seen 4d

microsoft/Mage-Flow-Turbo

Open original ↗

Captured source

source ↗
published Jul 21, 2026seen 4dcaptured 4dhttp 200method plaintask text-to-imagelicense mitlibrary diffusersparams 4.1Bdownloads 933likes 61

Mage-Flow An Efficient Native-Resolution Foundation Model for Image Generation and Editing

---

Mage-Flow is a compact 4B-scale generative stack for efficient text-to-image generation and instruction-based image editing. Instead of scaling to tens of billions of parameters, Mage-Flow reaches state-of-the-art-competitive quality through careful tokenizer–backbone–system co-design, so it stays fast, memory-light, and easy to fine-tune under realistic compute budgets.

The stack is built from two shared, co-designed components:

  • Mage-VAE — a lightweight, high-fidelity latent tokenizer (one-step diffusion encode/decode with anchor-latent KL regularization).
  • NR-MMDiT — a shared 4B Native-Resolution Multimodal Diffusion Transformer, trained with rectified flow matching in the Mage-VAE latent space.

Together with native-resolution packing and a fused-kernel training infrastructure, this shared stack powers two model instantiations: Mage-Flow for text-to-image generation and Mage-Flow-Edit for instruction-based image editing. Each ships in Base, RL-aligned, and 4-step Turbo variants.

✨ Highlights

  • Compact & competitive. A single 4B family for generation *and* editing that matches or beats much larger open systems (Qwen-Image 20B, Z-Image 6B, FLUX.2 32B, FireRed-Image-Edit 20B).
  • Efficient tokenizer. Mage-VAE matches FLUX.2-VAE reconstruction fidelity while using ~12× / ~22× fewer encode / decode MACs per pixel, removing the VAE as the high-resolution bottleneck.
  • Native resolution. One checkpoint generates from 512 to 2048 on any aspect ratio, including extreme 4:1 (e.g. 512×2048, 2048×512).
  • System-level speed. Native-resolution packing (FlashAttention var-len + per-sample 2D RoPE) + fused CUDA kernels raise MFU from ~33% → ~77% (~2.5× faster training); CFG's conditional/unconditional branches run in one packed forward.
  • Full family. Base, RL-aligned, and 4-step Turbo variants for both generation and editing.
  • Versatile editing. Mage-Flow-Edit supports semantic content editing, appearance transformation, image restoration, and structure-aware outputs within a unified image-and-text-conditioned model. See the report's editing galleries.
  • Interactive latency. At 1024² on a single A100: Mage-Flow-Turbo 0.59 s/image, Mage-Flow-Edit-Turbo 1.02 s/edit, peak memory ~18–20 GB (lowest among compared systems).

📥 Model Zoo

Each checkpoint is a self-contained diffusers-style repo (transformer/ + shared vae/, text_encoder/, scheduler/).

| Model | Task | Variant | Steps | Hugging Face | | :-------------------------- | :---------- | :----------------- | :---: | :---------------------------------------------------------------------------------------- | | Mage-Flow-4B-Base | text→image | Base | 30 | 🤗 microsoft/Mage-Flow-Base | | Mage-Flow-4B | text→image | RL-aligned | 20 | 🤗 microsoft/Mage-Flow | | Mage-Flow-4B-Turbo | text→image | Few-step distilled | 4 | 🤗 microsoft/Mage-Flow-Turbo | | Mage-Flow-Edit-4B-Base | editing | Base | 30 | 🤗 microsoft/Mage-Flow-Edit-Base | | Mage-Flow-Edit-4B | editing | RL-aligned | 30 | 🤗 microsoft/Mage-Flow-Edit | | Mage-Flow-Edit-4B-Turbo | editing | Few-step distilled | 4 | 🤗 microsoft/Mage-Flow-Edit-Turbo |

🖼️ Showcase

Text-to-image — prompt following, fine detail, and legible English/Chinese text rendering. *(The first panel is open; click a title to expand the others.)*

Showcase

General scenes

Portraits

Cuisine & still life

English text rendering

Chinese text rendering

Instruction-based editing — appearance, content, scene/subject, human-centered & creative, low-level, and restoration edits (source → result). *(The first panel is open; click a title to expand the others.)*

Various Editing I

Various Editing II

Localized content & object editing

Scene, subject & camera transformations

Appearance & artistic rendering

Human-centered & creative editing

Low-level vision & conditional reconstruction

Bidirectional degradation & restoration

📊 Performance

Full benchmark tables (text-to-image & image editing) — click to expand

Text-to-image — full benchmark suite: GenEval, DPG-Bench, TIIF-Bench (short/long splits), CVTG-2K, OneIG (EN/CN), LongText (EN/CN). Higher is better; GenEval / CVTG-2K / OneIG / LongText on a 0–1 scale, DPG / TIIF on 0–100. The Type column marks closed- vs open-source; bold / underline = best / second-best among open-source models (closed-source shown for reference, not ranked); = not reported; ★ = ours.

| Model | Type | #Params | Steps | GenEval | DPG | TIIF-Short | TIIF-Long | CVTG-2K | OneIG-EN | OneIG-CN | LongText-EN | LongText-CN | | :--------------------------- | :----: | :-----: | :---: | :-------------: | :--------------: | :--------------: | :--------------: | :--------------: | :--------------: | :--------------: | :--------------: | :--------------: | | Seedream 3.0 | Closed | – | – | 0.84 | 88.27 | 86.02 | 84.31 | 0.592 | 0.530 | 0.528 | 0.896 | 0.878 | | Seedream 4.0 | Closed | – | – | 0.84 | 88.63 | – | – | 0.892 | 0.573 | 0.554 | 0.936 | 0.946 | | GPT-Image-1 | Closed | – | – | 0.84 | 85.15 | 89.15 | 88.29 | 0.857 | 0.533 | 0.474 | 0.956 | 0.619 | | Nano-Banana-Pro | Closed | – | – | 0.83 | 87.16 | – | – | 0.779 | 0.580 | 0.570 | 0.981 | 0.949 | | FLUX.1-dev | Open | 12B | 50 | 0.66 | 83.84 | 71.09 | 71.78 | 0.496 | 0.434 | 0.245 | 0.607 | 0.005 | | FLUX.1-Krea-dev | Open | 12B | 50 | 0.72 | 86.59 | 80.36 | 81.67 | 0.444 | 0.443 | 0.271 | 0.693 | 0.002 | | FLUX.2-dev | Open | 32B | 50 | 0.87 | 87.57 | 88.82 | 88.10 | 0.893 | 0.551 | 0.516 | 0.963 | 0.757 | | FLUX.2-Klein-Base-4B | Open | 4B | 50 | 0.78 | 83.02 | 79.94 | 80.01 | 0.656 | 0.485 | 0.366 | 0.554 | 0.071 | | FLUX.2-Klein-Base-9B | Open | 9B | 50 | 0.83 | 85.29 | 81.47 | 84.52 | 0.655 | 0.544 | 0.400 | 0.872 | 0.227 | | FLUX.2-Klein-4B | Open | 4B | 4 | 0.83 | 85.53 | 78.91 | 79.04 | 0.628 | 0.500 | 0.364 | 0.649 | 0.068 | | FLUX.2-Klein-9B | Open | 9B | 4 | 0.86 | 86.20 | 85.22 |...

Excerpt shown — open the source for the full document.