Skip to main content
Mage-Flow 是微软研究院推出的紧凑型 4B 规模生成式技术栈,用于高效的文生图和基于指令的图像编辑。该技术栈由两个协同设计的组件构成:Mage-VAE(一个轻量级高保真度 Latent tokenizer)和采用整流流匹配(rectified flow matching)训练的原生分辨率多模态扩散 Transformer(NR-MMDiT)。结合原生分辨率打包,该共享技术栈为两个模型实例提供支持:用于文生图的 Mage-Flow 和用于基于指令的图像编辑的 Mage-Flow-Edit。每个实例提供 Base、RL 对齐和 4 步 Turbo 三种变体。 Mage-Flow 支持每边 512 到 2048 像素的原生分辨率,并支持任意宽高比,包括 4:1 等极端尺寸。 许可证MIT 相关链接

Mage-Flow 文生图工作流

Mage-Flow 文生图工作流输出

在 Comfy Cloud 上运行

在 Comfy Cloud 中打开

下载工作流

下载 JSON 或在模板库中搜索 “Mage-Flow”
请确保你的 ComfyUI 已经更新。本指南里的工作流可以在工作流模板中找到。如果找不到,可能是 ComfyUI 没有更新。如果加载工作流时有节点缺失,可能原因有:
  1. 你用的不是最新版(每夜版)。
  2. 启动时有些节点导入失败。
该工作流由以下几个部分组成:
  1. 文生图(Mage-Flow)子图:核心生成 pipeline,包含模型加载、提示词处理、原生分辨率 Latent 生成、采样和 VAE解码
  2. SaveImageAdvanced:保存已生成的图像

了解 Subgraph

此工作流使用 Subgraph 节点进行模块化处理。请查阅 Subgraph 文档,了解如何自定义和扩展此工作流。

一键生成

最简单的方式是:在子图中输入文本提示词,设置所需分辨率,然后点击 执行提示词。默认参数即可生成高质量图像,几乎无需额外配置。

使用工作流

  1. 输入提示词:在子图的提示词输入框中输入文本描述
  2. 设置分辨率:调整宽度和高度,以获得所需的输出尺寸。Mage-Flow 支持每边 512 至 2048 像素的原生分辨率。
  3. 调整设置:根据需要配置种子和负面提示词
  4. 点击队列:按 Ctrl+Enter 生成

Mage-Flow text-to-image workflow

Mage-Flow text-to-image workflow output

Run on Comfy Cloud

Open in Comfy Cloud

Download Workflow

Download JSON or search “Mage-Flow” in Template Library
请确保你的 ComfyUI 已经更新。本指南里的工作流可以在工作流模板中找到。如果找不到,可能是 ComfyUI 没有更新。如果加载工作流时有节点缺失,可能原因有:
  1. 你用的不是最新版(每夜版)。
  2. 启动时有些节点导入失败。
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-Edit image edit workflow

Mage-Flow-Edit image edit workflow output

Run on 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 on 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: