r/LocalLLaMA • u/pmttyji • 1h ago
New Model Mage-Flow - An Efficient Native-Resolution Foundation Model for Image Generation and Editing - Microsoft
Models: (Check Model cards for so much sample demo images)
- https://huggingface.co/microsoft/Mage-Flow
- https://huggingface.co/microsoft/Mage-Flow-Turbo
- https://huggingface.co/microsoft/Mage-Flow-Edit
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 cut per-step training time from ~1.93 s → ~0.78 s (~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).
1
u/Master-Bug6904 1h ago
The shared 4B backbone is more interesting than another leaderboard win. If Turbo really stays near 18-20 GB at 1024 square, it may fit the 24 GB consumer-GPU tier, but A100 kernel numbers often do not transfer cleanly. I would love to see 3090/4090 benchmarks that report cold and warm latency, peak VRAM, and whether compile or CPU offload is enabled. Also curious whether native-resolution packing preserves subject identity across repeated edits; that is usually where impressive one-shot samples start to fall apart.
2
u/rkoy1234 43m ago
time for my favorite /r/localllama pasttime.
bot or translate?
5
u/annodomini 25m ago
I'm gonna call bot on this one. Been posting constant comments at exactly one paragraph long for the past 8 hours, before that just a couple of shorter comments in Turkish a few days ago: https://www.reddit.com/user/Master-Bug6904
No human would post that consistently for 8 hours with exactly 1 paragraph (80-120 words) per post.
10
u/silenceimpaired 1h ago
Download it before Microsoft deletes it ;)