Downloads · 30 days
10
11% of all-time downloads
ajh-code/Mage-Flow-NVFP4-AJH
Mage-Flow-NVFP4-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.
Mage-Flow-NVFP4-AJH is a portable, runnable NVFP4 package for microsoft/Mage-Flow. It combines a native NVFP4 Mage transformer with a complete mixed NVFP4/FP8 Qwen3-VL text encoder.
Downloads · 30 days
10
11% of all-time downloads
All-time downloads
88
Public
Parameters
3.3B
10 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors10 GB · 100%
How the weights are stored.
BF162.3B · 69%
From the Hugging Face model README
Mage-Flow-NVFP4-AJH is a portable, runnable NVFP4 package for
microsoft/Mage-Flow.
It combines a native NVFP4 Mage transformer with a complete mixed
NVFP4/FP8 Qwen3-VL text encoder.
Ready-to-use custom nodes are available at
AJH-Code/ComfyUI-MageFlow-NVFP4-AJH.
The plugin provides loader and generation nodes, downloads this complete model
repository, and returns a standard ComfyUI IMAGE. Its initial release targets
Linux x86-64, Python 3.11, and NVIDIA Blackwell SM120 GPUs; follow the exact
runtime requirements documented in the plugin repository.

Generated directly with the released full NVFP4 package, 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
Settings: 1280×1280, 20 steps, CFG 5, static shift 6, seed 3334072683.
This is a complete Hugging Face component-layout repository, not an overlay:
model_index.json
transformer/
config.json
diffusion_pytorch_model-00001-of-00004.safetensors
diffusion_pytorch_model.safetensors.index.json
text_encoder/
config.json
model.safetensors
vae/
scheduler/
The transformer shards include every retained BF16 tensor alongside the NVFP4 module state. The VAE, scheduler, text-encoder configuration, tokenizer, and processor are also included. Running the downloaded repository does not fetch BF16 weights from the base model.
Mage transformer:
packed_weight, weight_scales, weight_scale, and bias.Qwen3-VL text encoder:
4,031,376,064 bytes.The prebuilt runtime was tested on:
2.13.0+cu130comfy-kitchen==0.2.22flash-attn==2.8.3Create a local environment:
python3.11 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
CUDA_HOME=/usr/local/cuda-13.1 \
python -m pip install --no-build-isolation flash-attn==2.8.3
The included binaries are for the exact tested stack. Rebuild them after changing PyTorch, CUDA, or the C++ ABI:
CUDA_HOME=/usr/local/cuda-13.1 \
PYTHON_BIN="$PWD/.venv/bin/python" \
./build_native.sh
Expose exactly one SM120 GPU:
CUDA_VISIBLE_DEVICES=0 .venv/bin/python generate.py \
--prompt 'A detailed watercolor fox reading under an old oak tree' \
--output fox.png \
--height 1024 \
--width 1024 \
--steps 20 \
--seed 1
When running from another copy of the scripts, --model also accepts the Hub
repository id or a downloaded standard-layout directory:
CUDA_VISIBLE_DEVICES=0 .venv/bin/python generate.py \
--model ajh-code/Mage-Flow-NVFP4-AJH \
--prompt 'A lighthouse poster reading "ARCTIC LOOP"' \
--output lighthouse.png
The command refuses to overwrite an existing output and writes a companion JSON report containing coverage, memory, timing, and environment information.
Transformer:
5,628,438,016 bytes.2,604,638,208 bytes
(2.4258 GiB).0.3.26x eager and 3.25x compiled
speedup over BF16.Text encoder:
7.5453 GiB.3.0427 GiB.4.5026 GiB.Combined validation on an RTX 5060 Ti 16 GB:
10,437,891,584 bytes (9.72 GiB).0.9927827428 / 0.1200022063.0.9339298065 / 0.3618087155.ARCTIC LOOP and NORTHERN COAST were both rendered
correctly.
The standard-layout packaged loader is validated independently of the research-tree loader. It installs 48 native Mage projections and 238 packed Qwen projections and rejects any checkpoint containing the replaced BF16 transformer targets.
The mixed text encoder is functional and produced visually strong downstream
images, but it does not meet our unusually strict embedding-similarity gate:
mean token/pooled cosine was 0.9531366898 / 0.9751400001. All ten content
screening verdicts and category lists remained unchanged.
The ten-case text workload was slower with the packed runtime (30.36 s)
than BF16 (18.29 s). This package therefore claims major text-encoder VRAM
savings, not a text-encoding speedup. Transformer projections are materially
faster, but repeated matched end-to-end timing has not been completed.
Additional limitations:
mage_flow_nvfp4 runtime is not yet built into stock Diffusers.
Use the included loader.MANIFEST.json records every distributed file except itself:
.venv/bin/python validate_release.py
Hashing the transformer shards and text checkpoint can take a little while.
LICENSE and
licenses/MAGE-MIT.txt.licenses/QWEN-APACHE-2.0.txt.InsecureErasure/Qwen3-VL-4B-Instruct-NVFP4
using learned rounding and comfy-kitchen.