How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("ChrisColeTech/Mage-Flow", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

Mage-Flow Turbo + Edit Turbo

4-step photographic text-to-image (β‰ˆ3 s per 1024Β² image on an RTX 5090) and a companion instruction-editing model that takes up to three reference images.

What this repo is: the Mage-Flow turbo and turbo-edit transformers, a shared Qwen2.5-VL text encoder and VAE β€” weights only, not a retrain. The settings below are the values these weights are actually run with day to day.


Samples β€” mage-flow-turbo (txt2img)

Four steps, guidance 1.0. Photorealism is this model's strength.

prompt: a red apple on a rustic wooden table beside a window, soft daylight, fine skin texture and wood grain, studio photograph, sharp focus β€” 1024Γ—1024, 4 steps, guidance 1.0, seed 12345prompt: portrait of an older fisherman with a weathered face, natural window light, shallow depth of field, photorealistic β€” 1024Γ—1024, 4 steps, guidance 1.0, seed 99
**prompt:** `a red apple on a rustic wooden table beside a window, soft daylight, fine skin texture and wood grain, studio photograph, sharp focus` β€” 1024Γ—1024, 4 steps, guidance 1.0, seed 12345**prompt:** `portrait of an older fisherman with a weathered face, natural window light, shallow depth of field, photorealistic` β€” 1024Γ—1024, 4 steps, guidance 1.0, seed 99
prompt: a rain-slicked Tokyo street at night, neon signs reflecting in puddles, cinematic, 35mm photograph β€” 1024Γ—1024, 4 steps, guidance 1.0, seed 1234
**prompt:** `a rain-slicked Tokyo street at night, neon signs reflecting in puddles, cinematic, 35mm photograph` β€” 1024Γ—1024, 4 steps, guidance 1.0, seed 1234

Editing β€” mage-flow-edit-turbo (img2img)

Plain-language instructions against a reference image. Identity, pose, lighting and camera are preserved; only what the instruction names changes.

referenceedit: put a brown flat cap on his headedit: change the background to a sunny beach
**reference** β€” the seed-99 portrait above**instruction:** `put a brown flat cap on his head` β€” 4 steps, seed 7 (β‰ˆ88 s)**instruction:** `change the background to a sunny beach with the ocean behind him` β€” 4 steps, seed 7 (β‰ˆ60 s)

Both edits keep the subject essentially pixel-identical β€” same skin detail, same jacket, same catchlights β€” while adding an object in one case and replacing the entire environment in the other. Up to three reference images may be supplied together (subject, style, context).

Recommended settings

Values these builds are run with in practice.

Parameter mage-flow-turbo mage-flow-edit-turbo Meaning
width Γ— height 1024 Γ— 1024 follows the reference Output size
steps 4 4 Denoising steps
guidance 1.0 1.0 Distilled β€” CFG is not used
max_size β€” 1024 Longest edge the reference is fitted to
vl_condition_long_edge β€” 384 Resolution the VL encoder sees the reference at

Supported modes: txt2img (turbo), img2img / instruction editing (edit-turbo, 1–3 references)

Notes and gotchas

  • Four steps is correct. Both variants are step-distilled at guidance 1.0; raising either is not the lever for quality.
  • Editing costs far more than generating β€” β‰ˆ60–90 s versus β‰ˆ3 s, because the reference must be encoded through the VL tower before denoising begins. That asymmetry is inherent to the architecture, not a misconfiguration.
  • Write edits as instructions, not descriptions β€” put a brown flat cap on his head, not a man wearing a brown flat cap.
  • torchvision is a hard dependency of the Mage-Flow pipeline (the VL image preprocessing path) even though the rest of this stack does not need it. Install the build matching your torch (torchvision==0.28.0 for torch 2.13.0+cu130) or loading fails with ModuleNotFoundError.
  • Three transformers ship here: base (30 steps, guidance 5.0 β€” the undistilled model), turbo and turbo-edit (4 steps, guidance 1.0). The samples on this card are from the two turbo variants; the base transformer is included for anyone who wants the slower, higher-guidance path.
  • Each transformer directory is self-contained β€” download only the variant you intend to run (8.2 GB each) plus the shared encoder, VAE and scheduler.

Layout

Components ship as separate directories under split/: one transformer directory per variant (turbo, turbo-edit), plus the shared text encoder, VAE and scheduler config. Loaders that accept a diffusers-style component tree can consume this directly.


Files

Path Size Role
split/transformer/turbo/diffusion_pytorch_model.safetensors 8.23 GB txt2img transformer (4-step distilled) β€” the tier these settings were measured on
split/transformer/turbo-edit/diffusion_pytorch_model.safetensors 8.23 GB instruction-editing transformer (4-step distilled)
split/transformer/base/diffusion_pytorch_model.safetensors 8.23 GB undistilled transformer (30 steps, guidance 5.0)
split/text_encoder/ 8.88 GB Qwen2.5-VL text/vision encoder (2 shards)
split/vae/diffusion_pytorch_model.safetensors 345 MB VAE
split/scheduler/scheduler_config.json 169 B scheduler config

Provenance

  • Upstream base model: Mage-Flow (turbo and turbo-edit distillations)
  • This build: redistributed as a split component tree with the shared encoder and VAE alongside. Weights are not retrained here.
  • License: left as unknown in this repo's metadata. Refer to the upstream model's license for redistribution and commercial-use terms.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support