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

Xinjie Zhang, Peng Zhang, Shicheng Zheng, Jinghao Guo, Zhaoyang Jia, Yifei Shen, Xun Guo, Yuxuan Luo, Jiahao Li, Wenxuan Xie, Fanyi Pu, Xiaoyi Zhang, Kaichen Zhang, Zongyu Guo, Tianci Bi, Dongnan Gui, Zhening Liu, Zimo Wen, Zihan Zheng, Senqiao Yang, Xiao Li, Jinglu Wang, Bin Li, Yan LuarXiv 2026

TL;DR

Mage-Flow is a highly efficient, 4-billion-parameter generative stack that delivers state-of-the-art text-to-image generation and image editing without the massive compute footprint of 20B+ parameter models. By co-designing a ultra-fast image tokenizer (Mage-VAE) with a native-resolution diffusion transformer, the authors achieve up to a $2.5\times$ training speedup and sub-second image generation ($0.59\text{s}$) on a single A100 GPU.

What Problem Does This Paper Address?

Recent breakthroughs in visual foundation models have drastically improved image synthesis and instruction-based editing. However, this progress has come at a steep cost: state-of-the-art open-source models are ballooning in size, ranging from 20B (Qwen-Image) to 80B parameters (Hunyuan-Image-3.0). This makes them incredibly expensive to train, fine-tune, and deploy on realistic budgets.

Furthermore, a hidden bottleneck in latent diffusion pipelines is the Variational Autoencoder (VAE) tokenizer. Traditional VAEs scale poorly at high resolutions ($1\text{K}$ and $2\text{K}$), with their encoding and decoding costs frequently matching or exceeding the latency of the diffusion backbone itself during few-step inference. Mage-Flow tackles both problems simultaneously by focusing on system-level efficiency and architecture co-design rather than raw parameter scaling.

Methods

The Mage-Flow stack consists of three core pillars:

  1. Mage-VAE (The Tokenizer): Instead of relying on heavy, attention-blocked public VAEs, the authors built a lightweight, fully convolutional image codec. The decoder is a pixel-diffusion model distilled down to a single step, and the encoder is its dual. To ensure the latent space remains compatible with downstream diffusion models, they introduced anchor-latent KL regularization, which forces the lightweight VAE's posterior to align with a strong public anchor (FLUX.2-VAE).
  2. Native-Resolution Multimodal Diffusion Transformer (NR-MMDiT): Rather than using standard bucket-based training (where batches are restricted to a single predefined aspect ratio), Mage-Flow uses a native-resolution packing scheme. It flattens and packs variable-length image and text sequences into a single contiguous batch using FlashAttention’s variable-length kernels and 3D frame-aware rotary embeddings (RoPE) to handle editing tasks bidirectionally.
  3. Stack-Level System Optimization: The authors wrote custom CUDA kernels to fuse memory-bound operator chains (like normalization, activation, and residual additions) across the VAE, the text encoder (Qwen3-VL), and the DiT blocks.
The Mage-Flow architecture overview.

Datasets

  • Generation Pre-training: A massive raw pool of ~10B web image-text pairs was filtered down to 1.3B high-quality pairs using a strict curation pipeline (filtering for aesthetics, watermarks, blur, and NSFW content). Images were recaptioned at multiple granularities using Qwen3-VL-32B.
  • Editing Pre-training: 45M triples (source image, instruction, target image), combining 20M open-source triples and 25M synthesized in-house triples, filtered via a multi-expert VLM voting system.
  • Evaluation: Evaluated across standard benchmarks including GenEval, DPG-Bench, TIIF-Bench, OneIG, CVTG-2K, and LongText for generation; and ImgEdit-Bench, GEdit-Bench, and TextEdit-Bench for editing.

Key Insights and Ideas

  • The Tokenizer Matters: Optimizing the diffusion backbone alone is a dead end for high-resolution interactive applications. Redesigning the VAE to operate without global attention blocks yields massive efficiency frontiers.
  • Anchor-Latent Supervision is a Cheat Code: You don't need a massive VAE to get a clean latent space. By regularizing a lightweight tokenizer toward a heavy VAE's distribution, it inherits a "generation-ready" geometry while slashing computational complexity.
  • Packing Beats Bucketing: Packing heterogeneous native image sizes directly into a single batch removes artificial resolution boundaries, allowing a single checkpoint to naturally generalize to extreme aspect ratios (e.g., $4:1$ or $1:4$).
Mage-VAE architecture and three-stage training process.

Key Results

  • Tokenization Efficiency: Mage-VAE requires $12\times$ fewer encoding MACs and $22\times$ fewer decoding MACs per pixel than FLUX.2-VAE, completely eliminating the tokenizer bottleneck.
  • Training Throughput: Custom CUDA kernel fusion increased Model FLOPs Utilization (MFU) from 14% to 29%, delivering a $2.5\times$ end-to-end training speedup.
  • Inference Speed: The distilled 4-step Turbo variants achieve remarkable interactive speeds on a single NVIDIA A100 GPU: $0.59\text{s}$ for text-to-image generation and $1.02\text{s}$ for image editing at $1024^2$ resolution.
  • Competitive Performance: Despite having a fraction of the parameters, Mage-Flow achieved the highest overall score on GenEval among compared open-source models and outperformed much larger 20B+ models on editing benchmarks like GEdit-Bench.
Quality-speed-memory comparison across text-to-image and image-editing models.

Limitations and Future Work

While Mage-Flow demonstrates exceptional efficiency, the authors note a few areas ripe for improvement. The model's performance on Chinese long-text rendering still leaves room for data supplementation. Additionally, the current stack is primarily optimized for single-image inputs; extending the architecture to support robust multi-image editing and tighter integration into agentic visual creation workflows are designated as key directions for future work.

Summary updated

BibTeX
@misc{zhang2026mage,
  author = {Xinjie Zhang and Peng Zhang and Shicheng Zheng and Jinghao Guo and Zhaoyang Jia and Yifei Shen and Xun Guo and Yuxuan Luo and Jiahao Li and Wenxuan Xie and Fanyi Pu and Xiaoyi Zhang and Kaichen Zhang and Zongyu Guo and Tianci Bi and Dongnan Gui and Zhening Liu and Zimo Wen and Zihan Zheng and Senqiao Yang and Xiao Li and Jinglu Wang and Bin Li and Yan Lu},
  title = {{Mage-Flow: An Efficient Native-Resolution Foundation Model for Image Generation and Editing}},
  year = {2026},
  eprint = {2607.19064},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.19064},
}
Figure