Microsoft Asia publicly released the Mage-Flow image model on Hugging Face on July 22, an image generation and editing model with only 4 billion parameters. This model can generate an image in 1 second with only 4 steps of inference at 1024×1024 resolution, and supports any aspect ratio from native resolution 512 to 2048. What’s more striking is that it equals or even surpasses models with 5 to 8 times more parameters such as FLUX.2 (32B) and Qwen-Image (20B) in multiple benchmark tests.

The paper was launched on arXiv on the same day (No. 2607.19064),GitHub projects Microsoft/Mage is open source under the MIT license, and a real-time trial interface is also provided on Hugging Face Spaces. Less than 24 hours after its release, developers have successfully run it on consumer hardware such as AMD Strix Halo, and ComfyUI integration is also in progress.

4B Parameters to what extent
Mage-Flow’s core architecture consists of two co-designed components: Mage-VAE and NR-MMDiT. Mage-VAE is a lightweight high-fidelity latent tokenizer that uses single-step diffusion encoding and decoding with anchor latent KL regularization. It matches FLUX.2-VAE in terms of reconstruction quality, but the encoding and decoding operations per pixel are reduced by about 12 times and 22 times respectively, directly eliminating the bottleneck of VAE in high-resolution scenes.

NR-MMDiT is a 4B parameter native resolution multi-modal diffusion Transformer that uses Qwen3-VL as a text encoder and is trained in the latent space of Mage-VAE through rectified flow matching. Native-resolution packing eliminates traditional bucket quantization and padding, allowing the same set of model weights to generate images with extreme aspect ratios such as 512×2048 and 2048×512. With FlashAttention var-len sequence packaging and per-sample 2D RoPE, CFG’s conditional branches and unconditional branches can be combined and executed in one forward pass.

System-level CUDA core fusion compresses the training time of each step from about 1.93 seconds to about 0.78 seconds, and the overall training throughput is increased by about 2.5 times. On a single A100 GPU, Mage-Flow-Turbo generates a 1024×1024 image in 0.59 seconds, Mage-Flow-Edit-Turbo edits an image in 1.02 seconds, and the peak memory is about 18 to 20 GB, the lowest of all compared systems. For comparison, FLUX.2-dev (32B) has much higher memory requirements at the same resolution. Although FLUX.2-Klein-4B also has 4B parameters, its 0.83 score on the GenEval benchmark is lower than Mage-Flow-Turbo’s 0.88 score.
Benchmarking: Big results for small models
In the text-to-image benchmark test, the Mage-Flow RL-aligned version scored 0.90 on GenEval, surpassing FLUX.2-dev (0.87), Qwen-Image (0.87), and ByteDance’s LongCat-Image (0.87). The Turbo version still achieves a score of 0.88 with only 4 steps of reasoning. On DPG-Bench, Mage-Flow achieved a score of 86.49, which is not far behind Qwen-Image’s score of 88.32, but the number of parameters is only one-fifth of the latter.

In terms of image editing, Mage-Flow-Edit-Turbo scored 4.38 points on ImgEdit-Bench, surpassing FLUX.2-dev (4.35) and FLUX.2-Klein-9B (4.18). In the GEdit-Bench English and Chinese evaluations, it achieved 8.271 and 8.264 points respectively, which is almost the same as the 8.276 and 8.125 points of JoyAI-Image-Edit (16B). It scored 12.77 points in the TextEdit-Bench synthesis test, exceeding FLUX.2-dev’s 11.86 points. The only one that lags significantly behind is FireRed-Image-Edit (20B) with 15.19 points, but the latter has 5 times as many parameters as Mage-Flow.

Compared with the closed-source model, Mage-Flow’s GenEval score of 0.90 also catches up with commercial models such as Seedream 4.0 (0.84) and Nano-Banana-Pro (0.83). Among open source models, Mage-Flow is the first model to achieve this score on the order of 4B parameters.
Complete model family and licensing
Mage-Flow is a complete family. There are three versions of text-to-image conversion: Base (30 steps), RL-aligned (20 steps), and Turbo (4-step distillation); image editing also has three versions: Base, RL-aligned, and Turbo. The RL-aligned version uses Diffusion-NFT to enhance prompt compliance, text rendering, aesthetic quality, and editing fidelity; the Turbo version uses decoupled DMD and adversarial perception-guided few-step distillation technology to complete generation or editing in 4 steps.
All six model checkpoints are released on Hugging Face under the MIT license, including microsoft/Mage-Flow-Base, microsoft/Mage-Flow, microsoft/Mage-Flow-Turbo, and the corresponding Edit versions. The GitHub project microsoft/Mage provides a complete Python API, CLI tools and Gradio Web UI that users can use mage-flow、mage-flow-edit、mage-flow-app Three commands to start quickly. The Diffusers library is also supported. You can call it with a few lines of code: install diffusers and pass DiffusionPipeline.from_pretrained("microsoft/Mage-Flow-Turbo") Load the model and pass in the prompt word to generate it. CLI also supports batch generation, multiple prompt words can be packaged and executed in one forward pass, and each sample can be set to different resolutions and seeds.
| 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 |
The Mage family also includes an upcoming Mage-VL, which is positioned as a 4B parameter image and video understanding model. It uses a codec-native streaming architecture and is also trained from scratch.
microsoft/mage-flow on Hugging Face Spaces provides a real-time trial interface. Users can upload images and enter editing instructions to experience the effects of Mage-Flow-Edit directly in the browser without local installation. Spaces execute on ZeroGPU infrastructure, and there are currently two Spaces using the Mage-Flow-Turbo model.

Please click me to try Mage-Flow
For local AI operations, 18 to 20 GB of peak memory allows Mage-Flow to execute on consumer graphics cards with 24GB VRAM, as well as APU platforms such as AMD Strix Halo. Combined with the upcoming integration of ComfyUI, Mage-Flow has the potential to become one of the main tools for local image generation and editing. Friends who are capable of setting up can also try running it locally.
Source: KOCPC Chinese