Text-to-Image
Diffusers
Safetensors
MageFlowPipeline
image-generation
image-editing
diffusion
rectified-flow
mage-flow
Instructions to use microsoft/Mage-Flow with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use microsoft/Mage-Flow with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("microsoft/Mage-Flow", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
README: sync Installation section (torch 2.13, CUDA wheel notes)
Browse files
README.md
CHANGED
|
@@ -239,7 +239,7 @@ Install everything **except** `flash-attn` first, then install `flash-attn` sepa
|
|
| 239 |
cd Mage/mage_flow
|
| 240 |
uv venv && source .venv/bin/activate
|
| 241 |
|
| 242 |
-
# 1) Pinned, tested dependency set (torch 2.
|
| 243 |
# Recommended for reproducibility. `uv pip install -e .` also works, but its loose
|
| 244 |
# bounds may resolve to a newer torch/transformers than the code was tested against.
|
| 245 |
uv pip install -r requirements.txt
|
|
@@ -253,7 +253,7 @@ uv pip install --no-build-isolation flash-attn==2.8.3
|
|
| 253 |
|
| 254 |
Plain `pip` is equivalent (`pip install -r requirements.txt`, `pip install -e . --no-deps`, then the two flash-attn lines). This registers three commands: `mage-flow`, `mage-flow-edit`, `mage-flow-app`.
|
| 255 |
|
| 256 |
-
> **torch / CUDA:** the default PyPI torch wheel targets the newest CUDA (currently cu13x). If your machine's CUDA toolkit is 12.x, install torch from the matching index first, e.g. `uv pip install torch==2.
|
| 257 |
|
| 258 |
### Python API
|
| 259 |
|
|
|
|
| 239 |
cd Mage/mage_flow
|
| 240 |
uv venv && source .venv/bin/activate
|
| 241 |
|
| 242 |
+
# 1) Pinned, tested dependency set (torch 2.13, transformers 5.5, diffusers 0.38, pillow 12.3, …).
|
| 243 |
# Recommended for reproducibility. `uv pip install -e .` also works, but its loose
|
| 244 |
# bounds may resolve to a newer torch/transformers than the code was tested against.
|
| 245 |
uv pip install -r requirements.txt
|
|
|
|
| 253 |
|
| 254 |
Plain `pip` is equivalent (`pip install -r requirements.txt`, `pip install -e . --no-deps`, then the two flash-attn lines). This registers three commands: `mage-flow`, `mage-flow-edit`, `mage-flow-app`.
|
| 255 |
|
| 256 |
+
> **torch / CUDA:** the default PyPI torch wheel targets the newest CUDA (currently cu13x). If your machine's CUDA toolkit is 12.x, install torch from the matching index first, e.g. `uv pip install torch==2.13.0 torchvision==0.28.0 --index-url https://download.pytorch.org/whl/cu126`, otherwise the flash-attn build will fail with a CUDA-version mismatch. (torch 2.13.0 ships cu126/cu129/cu130 wheels — pick the one matching your `nvcc`.)
|
| 257 |
|
| 258 |
### Python API
|
| 259 |
|