File size: 1,446 Bytes
5a26714
f8d22a5
 
 
 
5a26714
f8d22a5
5a26714
f8d22a5
 
 
5a26714
 
f8d22a5
 
 
 
8a536f3
f8d22a5
8a536f3
 
f8d22a5
8a536f3
f8d22a5
 
 
8a536f3
 
 
f8d22a5
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title: Mage-Flow
emoji: 🎨
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 6.15.1
app_file: app.py
short_description: Efficient native-resolution image generation and editing
python_version: "3.12"
startup_duration_timeout: 30m
---

# Mage-Flow

Efficient Native-Resolution Foundation Model for Image Generation and Editing.

This Space demonstrates [Mage-Flow](https://huggingface.co/papers/2607.19064) from Microsoft, a 4B-scale image generation and editing foundation model through a single unified interface:

- **No image** → the prompt generates a new image (routes to [Mage-Flow-Turbo](https://huggingface.co/microsoft/Mage-Flow-Turbo)).
- **With an uploaded image** → the prompt is treated as an edit instruction (routes to [Mage-Flow-Edit-Turbo](https://huggingface.co/microsoft/Mage-Flow-Edit-Turbo)).

The demo uses the Turbo variants for fast, few-step inference (4 steps, CFG 1.0).

## Usage

1. Enter a prompt.
2. *(Optional)* Upload an image to edit — the prompt becomes an edit instruction.
3. Click **Run**.

## References

- Paper: [Mage-Flow: An Efficient Native-Resolution Foundation Model for Image Generation and Editing](https://huggingface.co/papers/2607.19064)
- GitHub: [microsoft/Mage](https://github.com/microsoft/Mage)
- Models: [microsoft/Mage-Flow-Turbo](https://huggingface.co/microsoft/Mage-Flow-Turbo), [microsoft/Mage-Flow-Edit-Turbo](https://huggingface.co/microsoft/Mage-Flow-Edit-Turbo)