Views
No views yet
[!IMPORTANT] Experimental: This Nunchaku Lite quantized Qwen-Image checkpoint is experimental. APIs and loading behavior may change.
text_encodertransformer/config.json.| Component | Method | Precision | Group size | Rank | Targets |
|---|---|---|---|---|---|
Transformer svdq_w4a4 | Nunchaku Lite | fp4 | 16 | 128 | 720 |
Transformer awq_w4a16 | Nunchaku Lite | int4 | 64 | - | 120 |
| Text encoder | bitsandbytes | nf4 4-bit | - | - | 358 modules |
NunchakuLiteQuantizationConfig and the Nunchaku Lite loader path.1pip install git+https://github.com/huggingface/diffusers
2pip install kernels bitsandbyteskernels package, and the text encoder uses bitsandbytes 4-bit modules.1import torch
2from diffusers import QwenImagePipeline
3
4pipe = QwenImagePipeline.from_pretrained(
5 "lite-infer/Qwen-Image-nunchaku-lite-fp4_r128-bnb4-text-encoder",
6 torch_dtype=torch.bfloat16,
7).to("cuda")
8
9image = pipe(
10 prompt="A cinematic photo of a glass teapot on a wooden table, warm window light, detailed reflections, shallow depth of field",
11 negative_prompt=" ",
12 height=1024,
13 width=1024,
14 num_inference_steps=20,
15 true_cfg_scale=4.0,
16 generator=torch.Generator(device="cuda").manual_seed(42),
17).images[0]
18
19image.save("qwen-image-nunchaku-lite-fp4_r128-bnb4-text-encoder.png")torch_dtype=torch.bfloat16true_cfg_scale=4.0" "+ torch.compile rows compile only pipe.transformer with mode=None and fullgraph=False.[!NOTE] On Blackwell GPUs, the INT4 variants measured slower than FP4 in this benchmark. Prefer FP4 variants for latency-sensitive use on Blackwell-class hardware.The Diffusers integration currently uses the Nunchaku Lite quantized modules and kernels, but does not include the original Nunchaku runtime's kernel/module fusing. The+ torch.compilerows compile only the Diffusers transformer graph around those modules, so the speedup can be smaller than the original Nunchaku checkpoint benchmark below.
| Variant | Generation latency | Peak allocated VRAM | Peak reserved VRAM |
|---|---|---|---|
| BF16 base | 11.41s | 57.94GB | 58.80GB |
| INT4 R32 transformer + BNB4 text encoder | 47.63s | 21.22GB | 22.55GB |
| INT4 R128 transformer + BNB4 text encoder | 48.28s | 22.45GB | 23.06GB |
| FP4 R32 transformer + BNB4 text encoder | 9.17s | 21.58GB | 22.11GB |
| FP4 R128 transformer + BNB4 text encoder | 9.83s | 22.76GB | 23.56GB |
| BF16 base + torch.compile | 10.06s | 57.93GB | 59.51GB |
| INT4 R32 transformer + BNB4 text encoder + torch.compile | 46.41s | 21.20GB | 22.41GB |
| INT4 R128 transformer + BNB4 text encoder + torch.compile | 47.06s | 22.43GB | 23.71GB |
| FP4 R32 transformer + BNB4 text encoder + torch.compile | 8.14s | 21.55GB | 22.76GB |
| FP4 R128 transformer + BNB4 text encoder + torch.compile | 8.83s | 22.72GB | 24.18GB |
NunchakuQwenImageTransformer2DModel.from_pretrained(...) and inserted into the matching converted pipeline components so the text encoder, tokenizer, VAE, and scheduler matched the converted checkpoint.| Original checkpoint | Generation latency | Peak allocated VRAM | Peak reserved VRAM |
|---|---|---|---|
nunchaku-ai/nunchaku-qwen-image/svdq-int4_r32-qwen-image.safetensors | 36.47s | 21.23GB | 22.38GB |
nunchaku-ai/nunchaku-qwen-image/svdq-int4_r128-qwen-image.safetensors | 36.94s | 22.26GB | 22.82GB |
nunchaku-ai/nunchaku-qwen-image/svdq-fp4_r32-qwen-image.safetensors | 7.27s | 21.56GB | 22.10GB |
nunchaku-ai/nunchaku-qwen-image/svdq-fp4_r128-qwen-image.safetensors | 7.72s | 22.64GB | 23.28GB |



svdq-fp4_r128-qwen-image.safetensors