Skip to main content
Mage-Flow is a compact 4B-scale generative stack from Microsoft Research for efficient text-to-image generation and instruction-based image editing. The stack is built from two co-designed components: Mage-VAE, a lightweight high-fidelity latent tokenizer, and a Native-Resolution Multimodal Diffusion Transformer (NR-MMDiT) trained with rectified flow matching. Together with native-resolution packing, 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. Mage-Flow supports native resolutions from 512 to 2048 pixels per side at any aspect ratio, including extreme dimensions like 4:1. License: MIT Related Links:

Mage-Flow text-to-image workflow

Mage-Flow text-to-image workflow output

Run in Comfy Cloud

Open in Comfy Cloud

Download Workflow

Download JSON or search “Mage-Flow” in Template Library
Make sure your ComfyUI is updated.Workflows in this guide can be found in the Workflow Templates. If you can’t find them in the template, your ComfyUI may be outdated.If nodes are missing when loading a workflow, possible reasons:
  1. You are not using the latest ComfyUI version (Nightly version)
  2. Some nodes failed to import at startup
The workflow is organized into a few parts:
  1. Text to Image (Mage-Flow) subgraph: the core generation pipeline, containing model loading, prompt handling, native-resolution latent generation, sampling, and VAE decode
  2. SaveImageAdvanced: saves the generated image

Learn about Subgraph

This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow.

Single-click generation

At its simplest, just enter a text prompt in the subgraph, set your desired resolution, and click Queue Prompt. The defaults produce a high-quality image with minimal configuration.

Using the workflow

  1. Enter a prompt — type a text description in the subgraph’s prompt input
  2. Set resolution — adjust width and height for your desired output size. Mage-Flow supports native resolutions from 512 to 2048 pixels per side.
  3. Adjust settings — configure the seed and negative prompt as needed
  4. Click Queue — press Ctrl+Enter to generate

Mage-Flow Turbo text-to-image workflow

Mage-Flow Turbo text-to-image workflow output

Run in Comfy Cloud

Open in Comfy Cloud

Download Workflow

Download JSON or search “Mage-Flow Turbo” in Template Library
The Turbo variant uses a distilled 4-step checkpoint for faster generation while maintaining high quality. The workflow structure and controls are identical to the base text-to-image workflow, but uses the Turbo diffusion model for lower-latency inference.

Mage-Flow-Edit image edit workflow

Mage-Flow-Edit image edit workflow output

Run in Comfy Cloud

Open in Comfy Cloud

Download Workflow

Download JSON or search “Mage-Flow-Edit” in Template Library

Download Sample Image

Get the example input image for this workflow
The image edit workflow uses Mage-Flow-Edit, an instruction-based model that edits images using natural language descriptions. Upload one or more reference images and describe the desired edit. The workflow is organized into a few parts:
  1. LoadImage: upload your reference images (up to 3)
  2. Image Edit (Mage-Flow-Edit) subgraph: the core editing pipeline containing model loading, reference image conditioning, prompt handling, and sampling
  3. ImageCompare: a side-by-side comparison of the original and edited image
  4. SaveImage: saves the edited output

Using image edit

  1. Upload reference images — use the LoadImage node to load the image you want to edit (up to 3 images)
  2. Enter your edit instruction — type a text description of the edit you want to apply (e.g., “replace the background with a beach scene” or “turn this into a watercolor painting”)
  3. Adjust settings — configure resolution, seed, and other parameters
  4. Click Queue — press Ctrl+Enter to generate

Mage-Flow-Edit Turbo image edit workflow

Mage-Flow-Edit Turbo image edit workflow output

Run in Comfy Cloud

Open in Comfy Cloud

Download Workflow

Download JSON or search “Mage-Flow-Edit Turbo” in Template Library

Download Sample Image

Get the example input image for this workflow
The Turbo variant of the edit workflow uses a distilled 4-step checkpoint for faster editing. The structure and controls match the base edit workflow but with reduced sampling steps.

Model downloads

For local use, download the ComfyUI-optimized model files from Comfy-Org/Mage-Flow.

Text Encoder

qwen3vl_4b_bf16.safetensors: Qwen3VL-4B text encoder

VAE

mage_flow_vae_bf16.safetensors

Diffusion Model (Base Int8)

mage_flow_int8_convrot.safetensors: Base model used in the T2I workflow

Diffusion Model (Turbo Int8)

mage_flow_turbo_int8_convrot.safetensors: Turbo model used in the Turbo T2I workflow

Diffusion Model (Edit Int8)

mage_flow_edit_int8_convrot.safetensors: Edit model used in the Edit workflow

Diffusion Model (Edit Turbo Int8)

mage_flow_edit_turbo_int8_convrot.safetensors: Edit Turbo model used in the Edit Turbo workflow
Other model variants (BF16, FP8) are also available for users with different hardware configurations. Place the files in the following directories: