Downloads · 30 days
4
5% of all-time downloads
ajh-code/Mage-Flow-Turbo-NVFP4-Balanced-AJH
Mage-Flow-Turbo-NVFP4-Balanced-AJH is a text-to-image model from ajh-code. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as other.
A standalone, four-step quantized derivative of microsoft/Mage-Flow-Turbo. It packages the complete transformer, scaled-FP8 text encoder, VAE, scheduler, pinned Mage inference source, and native SM120 runtime.
Downloads · 30 days
4
5% of all-time downloads
All-time downloads
77
Public
Parameters
3.4B
11.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors11.4 GB · 100%
How the weights are stored.
BF162.5B · 72%
From the Hugging Face model README
A standalone, four-step quantized derivative of
microsoft/Mage-Flow-Turbo.
It packages the complete transformer, scaled-FP8 text encoder, VAE,
scheduler, pinned Mage inference source, and native SM120 runtime.
amax.1.0.0.75.BF16 transformer projections:
transformer_blocks.9.img_mlp.net.2transformer_blocks.10.img_mlp.net.2transformer_blocks.11.img_mlp.net.0.projtransformer_blocks.11.img_mlp.net.2
Generated directly at 1024×1024 with this package, four steps, CFG 1,
static shift 6, and seed 3334072683, without upscaling or
post-processing.
A 4K resolution high detail photo realistic image of the top half of a cyborg woman with dark black hair, striking blue eyes that have a very subtle glow in the iris, standing side profile, head tilted up towards the sky with a questioning expression, she has subtle gaps in her skin that hint at a robotic nature, outdoor forest night setting, sky filled with bright brilliant stars that glow against the dark setting, nebula visible
Both images use the same Turbo weights, scaled-FP8 text encoder, prompt,
seed 3334072683, 1024×1024 resolution, four steps, CFG 1, and static
shift 6. Only the transformer implementation changes.
| BF16 Turbo transformer | Balanced NVFP4 Turbo transformer |
|---|---|
![]() | ![]() |
| 4.89 s denoise, 8.52 GiB peak | 3.51 s denoise, 6.29 GiB peak |
In the original matched two-branch harness on the project SM120 test GPU at 1024×1024, the Balanced transformer denoised in 3.51 seconds with 6.29 GiB peak allocated, versus 4.89 seconds and 8.52 GiB for the BF16 Turbo transformer. This is about a 1.39× denoising speedup and 2.22 GiB lower transformer-stage VRAM for this exact four-step case; results are hardware and prompt dependent.
The scaled-FP8 encoder used about 4.95 GiB standalone versus 8.36 GiB for BF16. Direct prompt-conditioning cosine against BF16 ranged from 0.9932 to 0.9971 in the frozen four-case suite.
Turbo defaults to CFG 1. Following the upstream Mage pipeline, this runtime does not encode a negative prompt or execute an unconditional transformer branch unless CFG is greater than 1 and the negative prompt is nonempty.
At 1024×1024 in resident mode, removing that redundant branch reduced warm denoising from 2.78 to 1.43 seconds and warm end-to-end latency from 4.90 to 3.56 seconds, a further 1.38× speedup. CFG values above 1 continue to use the normal conditional and unconditional branches.
For repeated generation on a 16 GiB GPU, the packaged runtime can retain the text encoder, transformer, and VAE on CUDA instead of transferring each component for every stage:
pipe, load_report = runtime.load_pipeline(model=model_id, torch=torch)
placement = runtime.place_pipeline_resident(pipe, torch)
image, stages, screening = runtime.generate_staged(
pipe=pipe,
prompt=prompt,
negative_prompt="",
height=1024,
width=1024,
steps=4,
cfg=1.0,
seed=1,
static_shift=6.0,
torch=torch,
keep_resident=True,
)
With the CFG-1 single-branch path active, warm 1024×1024 latency decreased from 5.90 seconds staged to 3.56 seconds resident: a 1.66× end-to-end speedup. Peak allocated VRAM increased from 5.89 GiB to 11.39 GiB. The staged and resident decoded-pixel hashes were identical. Resident mode is intended for a long-running WebUI, API server, or ComfyUI process; the default remains staged for lower VRAM use.
Together, CFG-1 single-branch execution and resident placement reduced warm latency from the original 7.21-second staged path to 3.56 seconds, a 2.02× combined speedup on the tested GPU.
Tested on Linux x86-64, NVIDIA Blackwell SM120, CUDA 13.1, Python
3.11, PyTorch 2.13.0+cu130, comfy-kitchen==0.2.22, and
flash-attn==2.8.3. Use a virtual environment.
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
The packaged binaries target the tested stack. Run build_native.sh
after changing PyTorch, CUDA, or the C++ ABI.
CUDA_VISIBLE_DEVICES=0 .venv/bin/python generate.py \
--model ajh-code/Mage-Flow-Turbo-NVFP4-Balanced-AJH \
--prompt 'A detailed watercolor fox reading under an old oak tree' \
--output fox.png --height 1024 --width 1024 \
--steps 4 --cfg 1 --seed 1
Stock Diffusers does not understand the custom native NVFP4 modules; use the packaged entry point or a compatible integration. SM120 is required by this runtime.
python validate_release.py
The scaled-FP8 Qwen3-VL artifact comes from
starsfriday/Mage-Flow-Edit-FP8
at revision 5a64f75aa6a962cbc6c9f0bc42ed0f819b739890.
See THIRD_PARTY_NOTICES.md and the included license files.