CoolFace
Modelpublic

ajh-code/Mage-Flow-Edit-Turbo-XPO3-NVFP4

sourceHugging Facemitupdated 2mo agoView on Hugging Face
1likes9downloads
Model Card

<h1 align="center">Mage-Flow Edit Turbo · XPO3 NVFP4</h1>

<p align="center"> A four-step, native Blackwell W4A4 release of Mage-Flow Edit Turbo. </p>

<p align="center"> <a href="https://huggingface.co/microsoft/Mage-Flow-Edit-Turbo">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> </p>


Download

FilePurposeSize
`Mage-Flow-Edit-Turbo-XPO3-NVFP4.safetensors`Self-contained Edit-Turbo transformer4.65 GB
`qwen3vl_4b_fp8_scaled.safetensors`Shared scaled-FP8 text encoder5.24 GB
`Mage-Flow-VAE.safetensors`Shared Mage VAE345 MB

The transformer contains all retained BF16 tensors, 48 packed NVFP4 MLP projections, and 24 offline-fused NVFP4 QKV groups. It does not require the 8.23 GB BF16 transformer.


Quick start

Linux, Python 3.11, CUDA 13, and an NVIDIA Blackwell SM120 GPU are required.

bash
hf download ajh-code/Mage-Flow-Edit-Turbo-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 \
  "Replace the background with a snowy pine forest. Keep the subject unchanged." \
  --output edited.png --seed 1 --max-size 1024

The included CLI uses the promoted profile automatically: four steps, CFG 1, shift 6, image-only fused GELU, calibrated FP4 bridge on all 12 blocks, and direct-HND accelerated attention on steps 1–3 with exact step-0 fallback. Every optimization has a CLI disable switch.

The public ComfyUI-XPO3 v0.3.0 nodes target text-to-image Turbo. Use the included Edit CLI until Edit-Turbo node support is released; do not load this checkpoint with the old Turbo Generate node.

Examples

ReferenceXPO3 edit
![Dog reference](examples/dog-reference.jpg)![Dog with snowy forest background](examples/dog-edited.png)
![Fruit reference](examples/fruit-reference.jpg)![Fruit with cobalt tablecloth](examples/fruit-edited.png)

The first edit changes the background while preserving the dog. The second changes only the tablecloth while preserving the fruit and composition.


Measured on RTX 5060 Ti

512-long-edge editBF16 denoiseXPO3 denoiseSpeedup
Dog background0.5820 s0.3216 s1.81×
Fruit tablecloth0.6285 s0.3469 s1.81×

Peak allocated memory was 5.41–5.54 GiB, 31–33% below the matched BF16 runs. These are hot denoise measurements on one local system, not universal end-to-end claims. Load, multimodal conditioning, reference encoding, denoise, and VAE decode were measured separately.

Validated scope

  • Same-seed outputs were deterministic across fresh and hot repeats.
  • Dog identity, pose, coat, collar, and framing survived a background change.
  • Fruit type, count, layout, bowl, and lighting survived a tablecloth-only change.
  • Step 0 accelerated attention was rejected after a black-image failure and remains on exact fallback.
  • The release file passed checksum, tensor-coverage, zero-source-read clean loading, restoration, and two-case edit-quality gates.

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 for 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`.