File size: 3,087 Bytes
780534d | 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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ---
license: mit
library_name: mage_flow
pipeline_tag: image-to-image
base_model: microsoft/Mage-Flow-Edit
base_model_relation: quantized
tags:
- xpo3
- mage-flow
- mage-flow-edit
- image-editing
- image-to-image
- nvfp4
- fp8
- blackwell
- quantization
---
<h1 align="center">Mage-Flow Edit 路 XPO3 NVFP4</h1>
<p align="center">A 30-step native Blackwell W4A4 release of Mage-Flow Edit.</p>
<p align="center">
<a href="https://huggingface.co/microsoft/Mage-Flow-Edit">Original model</a>
路 <a href="https://huggingface.co/Comfy-Org/Mage-Flow">ComfyUI source weights</a>
路 <a href="https://huggingface.co/starsfriday/Mage-Flow-Edit-FP8">FP8 text encoder source</a>
路 <a href="https://huggingface.co/ajh-code/Mage-Flow-Turbo-XPO3-NVFP4">XPO3 text-to-image sibling</a>
路 <a href="https://huggingface.co/ajh-code/Mage-Flow-Edit-Turbo-XPO3-NVFP4">XPO3 Edit-Turbo sibling</a>
</p>
---
## Download
| File | Purpose | Size |
|:--|:--|--:|
| `Mage-Flow-Edit-XPO3-NVFP4.safetensors` | Self-contained Edit transformer | 4.65 GB |
| `qwen3vl_4b_fp8_scaled.safetensors` | Shared scaled-FP8 text encoder | 5.24 GB |
| `Mage-Flow-VAE.safetensors` | Shared Mage VAE | 345 MB |
The root `config.json` is included for Hugging Face model/download accounting.
## Quick start
Linux, Python 3.11, CUDA 13, and an NVIDIA Blackwell SM120 GPU are required.
```bash
hf download ajh-code/Mage-Flow-Edit-XPO3-NVFP4 --local-dir mage-edit-xpo3
cd mage-edit-xpo3
python3.11 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python edit.py reference.jpg "Change the background; keep the subject unchanged." --output edited.png
```
The promoted profile is 30 steps, CFG 5, image-only fused GELU, calibrated
FP4 bridge on all 12 blocks, direct-HND attention on steps 7-29, and exact
SDPA fallback on steps 0-6. Every optimization has a CLI disable switch.
## Measured performance
| GPU 路 512-long-edge edit | BF16 hot denoise | XPO3 hot denoise | Speedup |
|:--|--:|--:|--:|
| RTX 5080 路 Dog background | 4.2491 s | 2.5709 s | 1.65脳 |
| RTX 5080 路 Fruit tablecloth | 4.4839 s | 2.6815 s | 1.67脳 |
| RTX 5060 Ti 路 Dog background | 8.6019 s | 4.7614 s | 1.81脳 |
| RTX 5060 Ti 路 Fruit tablecloth | 9.3282 s | 5.1300 s | 1.82脳 |
Hot denoise timings are local matched measurements, not universal end-to-end claims. The RTX 5060 Ti runs also used 31-33% less peak allocation than BF16.
## Validated scope
- Same-seed dog and fruit edits were deterministic across fresh and hot runs.
- The standalone package reproduced both approved RTX 5080 composed outputs pixel-exactly.
- Each release-only edit recorded 552 direct routes, 168 exact fallback routes, all 12 bridge blocks, and restored every temporary patch.
This is an XPO3 runtime package, not a generic portable quantization format.
The bundled native libraries target Linux x86-64, Python 3.11, PyTorch
2.13.0+cu130, and SM120.
MIT applies to the XPO3 package and Mage-derived runtime. The scaled-FP8
Qwen3-VL component and bundled SpargeAttn code are Apache-2.0; see
`THIRD_PARTY_NOTICES.md`.
|