ChrisColeTech commited on
Commit
647ce91
Β·
verified Β·
1 Parent(s): 3d47f8d

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +113 -0
README.md CHANGED
@@ -1,3 +1,116 @@
1
  ---
2
  license: unknown
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: unknown
3
+ pipeline_tag: text-to-image
4
+ tags:
5
+ - text-to-image
6
+ - image-to-image
7
+ - image-editing
8
+ - multi-reference
9
+ - distilled
10
+ - turbo
11
  ---
12
+
13
+ # Mage-Flow Turbo + Edit Turbo
14
+
15
+ 4-step photographic text-to-image (**~3 s** per 1024Β² image on an RTX 5090)
16
+ and a companion instruction-editing model that takes up to **three**
17
+ reference images.
18
+
19
+ > **What this repo is:** the Mage-Flow turbo and turbo-edit transformers, a
20
+ > shared Qwen2.5-VL text encoder and VAE β€” weights only, not a retrain. The
21
+ > settings below are the values these weights are actually run with day to
22
+ > day.
23
+
24
+ ---
25
+
26
+ ## Samples β€” `mage-flow-turbo` (txt2img)
27
+
28
+ Four steps, guidance 1.0. Photorealism is this model's strength.
29
+
30
+ <table>
31
+ <tr><td><img src="https://huggingface.co/ChrisColeTech/Mage-Flow/resolve/main/samples/apple.png" width="380" alt="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"></td><td><img src="https://huggingface.co/ChrisColeTech/Mage-Flow/resolve/main/samples/portrait.png" width="380" alt="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"></td></tr>
32
+ <tr><td><sub>**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</sub></td><td><sub>**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</sub></td></tr>
33
+ <tr><td><img src="https://huggingface.co/ChrisColeTech/Mage-Flow/resolve/main/samples/street.png" width="380" alt="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"></td><td></td></tr>
34
+ <tr><td><sub>**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</sub></td><td></td></tr>
35
+ </table>
36
+
37
+ ---
38
+
39
+ ## Editing β€” `mage-flow-edit-turbo` (img2img)
40
+
41
+ Plain-language instructions against a reference image. Identity, pose,
42
+ lighting and camera are preserved; only what the instruction names changes.
43
+
44
+ <table>
45
+ <tr><td><img src="https://huggingface.co/ChrisColeTech/Mage-Flow/resolve/main/samples/portrait.png" width="250" alt="reference"></td><td><img src="https://huggingface.co/ChrisColeTech/Mage-Flow/resolve/main/samples/edit-hat.png" width="250" alt="edit: put a brown flat cap on his head"></td><td><img src="https://huggingface.co/ChrisColeTech/Mage-Flow/resolve/main/samples/edit-beach.png" width="250" alt="edit: change the background to a sunny beach"></td></tr>
46
+ <tr><td><sub>**reference** β€” the seed-99 portrait above</sub></td><td><sub>**instruction:** `put a brown flat cap on his head` β€” 4 steps, seed 7 (~88 s)</sub></td><td><sub>**instruction:** `change the background to a sunny beach with the ocean behind him` β€” 4 steps, seed 7 (~60 s)</sub></td></tr>
47
+ </table>
48
+
49
+ Both edits keep the subject essentially pixel-identical β€” same skin detail,
50
+ same jacket, same catchlights β€” while adding an object in one case and
51
+ replacing the entire environment in the other. Up to **three** reference
52
+ images may be supplied together (subject, style, context).
53
+
54
+ ## Recommended settings
55
+
56
+ Values these builds are run with in practice.
57
+
58
+ | Parameter | `mage-flow-turbo` | `mage-flow-edit-turbo` | Meaning |
59
+ |---|---|---|---|
60
+ | `width` Γ— `height` | `1024` Γ— `1024` | follows the reference | Output size |
61
+ | `steps` | `4` | `4` | Denoising steps |
62
+ | `guidance` | `1.0` | `1.0` | Distilled β€” CFG is not used |
63
+ | `max_size` | β€” | `1024` | Longest edge the reference is fitted to |
64
+ | `vl_condition_long_edge` | β€” | `384` | Resolution the VL encoder sees the reference at |
65
+
66
+ **Supported modes:** `txt2img` (turbo), `img2img` / instruction editing (edit-turbo, 1–3 references)
67
+
68
+ ### Notes and gotchas
69
+
70
+ - **Four steps is correct.** Both variants are step-distilled at guidance 1.0;
71
+ raising either is not the lever for quality.
72
+ - **Editing costs far more than generating** β€” ~60–90 s versus ~3 s, because
73
+ the reference must be encoded through the VL tower before denoising begins.
74
+ That asymmetry is inherent to the architecture, not a misconfiguration.
75
+ - **Write edits as instructions, not descriptions** β€” `put a brown flat cap on
76
+ his head`, not `a man wearing a brown flat cap`.
77
+ - **`torchvision` is a hard dependency** of the Mage-Flow pipeline (the VL
78
+ image preprocessing path) even though the rest of this stack does not need
79
+ it. Install the build matching your torch (`torchvision==0.28.0` for torch
80
+ 2.13.0+cu130) or loading fails with `ModuleNotFoundError`.
81
+ - **Three transformers ship here**: `base` (30 steps, guidance 5.0 β€” the
82
+ undistilled model), `turbo` and `turbo-edit` (4 steps, guidance 1.0). The
83
+ samples on this card are from the two turbo variants; the base transformer
84
+ is included for anyone who wants the slower, higher-guidance path.
85
+ - Each transformer directory is self-contained β€” download only the variant you
86
+ intend to run (8.2 GB each) plus the shared encoder, VAE and scheduler.
87
+
88
+ ---
89
+
90
+ ## Layout
91
+
92
+ Components ship as separate directories under `split/`: one transformer
93
+ directory per variant (`turbo`, `turbo-edit`), plus the shared text encoder,
94
+ VAE and scheduler config. Loaders that accept a diffusers-style component tree
95
+ can consume this directly.
96
+
97
+ ---
98
+
99
+ ## Files
100
+
101
+ | Path | Size | Role |
102
+ |---|---|---|
103
+ | `split/transformer/turbo/diffusion_pytorch_model.safetensors` | 8.23 GB | txt2img transformer (4-step distilled) β€” **the tier these settings were measured on** |
104
+ | `split/transformer/turbo-edit/diffusion_pytorch_model.safetensors` | 8.23 GB | instruction-editing transformer (4-step distilled) |
105
+ | `split/transformer/base/diffusion_pytorch_model.safetensors` | 8.23 GB | undistilled transformer (30 steps, guidance 5.0) |
106
+ | `split/text_encoder/` | 8.88 GB | Qwen2.5-VL text/vision encoder (2 shards) |
107
+ | `split/vae/diffusion_pytorch_model.safetensors` | 345 MB | VAE |
108
+ | `split/scheduler/scheduler_config.json` | 169 B | scheduler config |
109
+
110
+ ---
111
+
112
+ ## Provenance
113
+
114
+ - **Upstream base model:** Mage-Flow (turbo and turbo-edit distillations)
115
+ - **This build:** redistributed as a split component tree with the shared encoder and VAE alongside. Weights are not retrained here.
116
+ - **License:** left as `unknown` in this repo's metadata. Refer to the upstream model's license for redistribution and commercial-use terms.