Instructions to use AutomatosX/AX-Image-2.1-Turbo-AXQ-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AutomatosX/AX-Image-2.1-Turbo-AXQ-NVFP4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AutomatosX/AX-Image-2.1-Turbo-AXQ-NVFP4", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
AX-Image-2.1-Turbo-AXQ-NVFP4
Research/evaluation only. Built with Qwen. This is an experimental NVFP4 storage conversion of Qwen/Qwen-Image-2.1-Turbo at fc13ba1986fcb905854dc8de2f52eee395f49b5b. It is not a native CUDA FP4 inference checkpoint. The separate source research license applies to the model weights; an AXQuant software license does not grant commercial model rights. Read LICENSE and Notice before use.
What was changed
AXQuant 2.2.1's owned RTN encoder packs 224 image-transformer attention and MLP matrices into NVFP4 E2M1 bytes, E4M3 block scales (16 values), and FP32 inverse global scales. The text encoder, VAE, normalization, conditioning/modulation, input/output projections, and all other tensors remain at source precision. 73 unquantized transformer tensors were compared against the source and are byte-identical. Other source components are copied unchanged and digest-bound.
This source-specific container uses axq-diffusion.reference/1, not compressed-tensors language-model format. The custom root entrypoint and nonstandard weight filenames intentionally require the explicit verifier/decoder below. Ordinary DiffusionPipeline.from_pretrained, vLLM, AX Engine, MLX-LM, oMLX, and MTPLX do not load this container directly.
Execution and evidence
One bounded image-generation smoke passed after BF16 reconstruction; see reference-runtime-smoke.json for hardware, dimensions, seed, and dependency versions. This is not image-quality or native FP4 qualification.
The bundled loader verifies every manifest member, reconstructs complete BF16 transformer weights, strictly checks the real Diffusers state dictionary, and injects the transformer into the original pipeline. All inference then uses ordinary BF16 operators. It does not provide FP4 arithmetic, lower inference RAM/VRAM, acceleration, quality certification, or a claim that upstream quality measurements transfer to this conversion. Expect approximately the original BF16 pipeline's memory requirements, plus temporary decoding buffers.
The source's eight-step sample_sigmas are preserved. No activation calibration, fine-tuning, or sensitivity measurement was performed. See axq-diffusion-manifest.json, static-validation.json, and any separate smoke receipt for exact evidence binding.
Reference loading
Use a regular-file local download directory; the verifier rejects symlinked weight trees.
python -m pip install 'axquant[cuda]==2.2.1' 'diffusers==0.41.0' 'transformers==5.19.0' 'accelerate==1.15.0' 'torchvision==0.29.1'
hf download AutomatosX/AX-Image-2.1-Turbo-AXQ-NVFP4 --local-dir ./ax-image-nvfp4
Run Python from the downloaded directory:
import torch
from axq_diffusion_reference import load_qwen_image_pipeline
pipe = load_qwen_image_pipeline('.')
# Choose a device with enough memory for the reconstructed BF16 pipeline.
pipe = pipe.to('cuda')
image = pipe(
prompt='A red cube on a plain background',
height=512,
width=512,
num_inference_steps=8,
true_cfg_scale=1.0,
generator=torch.Generator('cpu').manual_seed(0),
).images[0]
image.save('reference-output.png')
Read the manifest and license before redistributing. Retain the full research license, mandatory Notice, and modification notices. Commercial use requires a separate license from the source licensor.
- Downloads last month
- -