Instructions to use lite-infer/z-image-turbo-nunchaku-lite-nvfp4_r32-bnb4-text-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lite-infer/z-image-turbo-nunchaku-lite-nvfp4_r32-bnb4-text-encoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lite-infer/z-image-turbo-nunchaku-lite-nvfp4_r32-bnb4-text-encoder", torch_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
Z-Image-Turbo Nunchaku Lite NVFP4 r32
Diffusers-loadable conversion of:
- Base model:
Tongyi-MAI/Z-Image-Turbo - Source repo:
nunchaku-ai/nunchaku-z-image-turbo - Source checkpoint:
svdq-fp4_r32-z-image-turbo.safetensors
The transformer uses quant_method: nunchaku_lite, NVFP4 SVDQ, group size 16, rank 32, and 238 quantized targets. Packed fused QKV and SwiGLU projections are split in logical layout into the stock Z-Image graph. The Qwen3 text encoder is packaged with BitsAndBytes 4-bit NF4.
Benchmark
| Checkpoint | Latency | Max VRAM |
|---|---|---|
| Converted Diffusers Nunchaku Lite NVFP4 r32 + BNB4 Qwen3 | 1.68 s (stdev 0.00 s) | 12.11 GiB |
| Original Nunchaku NVFP4 r32 + BF16 Qwen3 | 1.31 s (stdev 0.00 s) | 16.57 GiB |
RTX 5090, 1024×1024, 9 scheduler steps (8 DiT forwards), guidance scale 0, seed 42, one warmup and three measured runs. VRAM is peak total device usage sampled through nvidia-smi. The native row uses the base model's BF16 Qwen3 encoder.
Output Comparison
Both images use the same prompt, seed, scheduler, resolution, and step count. Same-precision pixel MAE is 13.37 and RMSE is 24.12.
Run
Requires the Hugging Face kernels package and an NVIDIA Blackwell GPU.
import torch
from diffusers import ZImagePipeline
pipe = ZImagePipeline.from_pretrained(
"lite-infer/z-image-turbo-nunchaku-lite-nvfp4_r32-bnb4-text-encoder",
torch_dtype=torch.bfloat16,
).to("cuda")
image = pipe(
prompt='A cinematic portrait of a red fox in a misty forest at sunrise, detailed fur, volumetric light',
height=1024,
width=1024,
num_inference_steps=9,
guidance_scale=0.0,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("output.png")
- Downloads last month
- 22
Model tree for lite-infer/z-image-turbo-nunchaku-lite-nvfp4_r32-bnb4-text-encoder
Base model
Tongyi-MAI/Z-Image-Turbo