Qwen-Image-2.1-Turbo-Nunchaku

Language: English | 中文

9.20 GiB less after load (46.4%) · text-to-image 2.43× faster · editing 2.02× faster

FP4 on an RTX 5090, compared with the BF16 transformer.

4-bit weight-and-activation quantization of the Qwen-Image-2.1-Turbo transformer, rank 32, for inference with Nunchaku. The repo has two checkpoints: FP4 for Blackwell (50-series) and INT4 for 30- and 40-series GPUs. The VAE stays in BF16. Diffusers components are included, so the repo loads as a pipeline.

Model

Qwen-Image-2.1-Turbo is the 8-step distilled version of Qwen-Image-2.1. The visual generator is still about 7B parameters, a 32-layer single-stream DiT. The same weights do text-to-image, reference-image editing, and transparent (RGBA) output. Official sampling is 8 steps, true_cfg_scale=1, and prefix KV cache.

Samples

A blonde girl holds a wooden sign in her hand, which reads::CreatePPTX.com

BF16 FP4
BF16 FP4

Performance

1024×1024, true_cfg_scale=1, 8 steps, prefix KV cache on, CPU offload off, dtype bfloat16. BF16 and FP4 share the same INT4 text encoder, svdq-int4-Qwen3-VL-8B-Instruct-Nunchaku.safetensors. Measured on an RTX 5090.

Text-to-image

BF16 FP4
Load 5.625s 4.778s 1.18×
Cold inference 3.429s 1.449s 2.37×
Steady inference 3.080s 1.269s 2.43×

Image editing

The condition image is the BF16 sample above. Prompt: Turn the girl's hair black. Other settings match text-to-image.

BF16 FP4
Load 5.500s 4.796s 1.15×
Cold inference 4.531s 2.256s 2.01×
Steady inference 4.062s 2.014s 2.02×

Memory

BF16 FP4 Saved
Allocated after load 19.83 GiB 10.63 GiB 9.20 GiB (46.4%)
Reserved after load 19.89 GiB 10.68 GiB 9.22 GiB (46.3%)
Text-to-image peak allocated 26.44 GiB 17.23 GiB 9.22 GiB (34.8%)
Text-to-image peak reserved 27.92 GiB 18.46 GiB 9.46 GiB (33.9%)
Edit peak allocated 28.45 GiB 17.24 GiB 11.21 GiB (39.4%)
Edit peak reserved 30.47 GiB 18.46 GiB 12.01 GiB (39.4%)

Quality

Same FP4 run on an RTX 5090, 25 images each, compared with the BF16 transformer under the same settings. Higher PSNR and SSIM are closer. Lower LPIPS is closer. p90 is the 90th percentile of that metric.

Task Metric Mean p50 p90 Best Worst
Text-to-image PSNR ↑ 20.14 19.88 24.84 26.99 15.21
Text-to-image SSIM ↑ 0.843 0.853 0.937 0.961 0.604
Text-to-image LPIPS ↓ 0.185 0.164 0.320 0.047 0.531
Image editing PSNR ↑ 19.17 19.75 23.47 24.32 13.62
Image editing SSIM ↑ 0.719 0.717 0.879 0.928 0.397
Image editing LPIPS ↓ 0.156 0.124 0.283 0.055 0.392

Use in ComfyUI

Install the Vitoom Nunchaku plugin. ComfyUI 0.44 or newer is required, started with --enable-manager. Installing the plugin also installs a matching nunchaku wheel.

  1. Open ComfyUI and click Manage Extensions in the top-right corner.
  2. Search for Vitoom Nunchaku and click Install.
  3. Restart ComfyUI.

Place this repository's transformer in ComfyUI/models/diffusion_models: svdq-fp4_r32-Qwen-Image-2.1-Turbo-Nunchaku.safetensors for RTX 50 series, svdq-int4_r32-Qwen-Image-2.1-Turbo-Nunchaku.safetensors for RTX 30 and 40 series. The text encoder is the same as the non-Turbo model: svdq-int4-Qwen3-VL-8B-Instruct-Nunchaku.safetensors, in ~/weights or ComfyUI/models/text_encoders. Place the VAE qwen_image_2.1_vae_bf16.safetensors in ComfyUI/models/vae.

The plugin does not ship a separate Turbo workflow. Open example_workflows/qwen_image21.json, select the Turbo checkpoint above on Vitoom Nunchaku DiT Loader, and set KSampler to 8 steps. Connect Vitoom Nunchaku DiT Loader to KSampler, and Vitoom Nunchaku Text Encoder to TextEncodeQwenImage21. For editing, connect the reference image to the encode node's image_1 and write <image1> in the prompt.

Use in Python

Installation

Nunchaku must provide NunchakuQwenImage21Transformer2DModel, and Diffusers must provide QwenImage21Pipeline (after 2026-09-18, including PR #14804; Turbo's sampling schedule also needs PR #14950). Prebuilt wheels are in tonera/vitoom-nunchaku.

pip install "git+https://github.com/huggingface/diffusers.git"

python -m pip uninstall -y torch torchvision torchaudio nunchaku
python -m pip install "torch==2.14.*" "torchvision==0.29.*" --index-url https://download.pytorch.org/whl/cu130

# Pick the wheel that matches your Python, CUDA, and PyTorch from tonera/vitoom-nunchaku
hf download tonera/vitoom-nunchaku \
  nunchaku-1.4.0+cu13.0torch2.14-cp311-cp311-linux_x86_64.whl \
  --local-dir ./wheels

python -m pip install ./wheels/nunchaku-1.4.0+cu13.0torch2.14-cp311-cp311-linux_x86_64.whl

Usage

import torch
from diffusers import QwenImage21Pipeline
from PIL import Image
from nunchaku import NunchakuQwenImage21Transformer2DModel
from nunchaku.utils import get_precision

REPO = "tonera/Qwen-Image-2.1-Turbo-Nunchaku"
NAME = "Qwen-Image-2.1-Turbo-Nunchaku"

transformer = NunchakuQwenImage21Transformer2DModel.from_pretrained(
    f"{REPO}/svdq-{get_precision()}_r32-{NAME}.safetensors",
    torch_dtype=torch.bfloat16,
    device="cuda",
)
pipe = QwenImage21Pipeline.from_pretrained(
    REPO,
    transformer=transformer,
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")

image = pipe(
    prompt="A blonde girl holds a wooden sign in her hand, which reads::CreatePPTX.com",
    width=1024,
    height=1024,
    num_inference_steps=8,
    true_cfg_scale=1.0,
    use_kv_cache=True,
    generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
image.save("qwen21-turbo-w4a4.png")

ref = Image.open("input.png").convert("RGB")
edited = pipe(
    prompt="Turn the girl's hair black",
    image=ref,
    width=1024,
    height=1024,
    num_inference_steps=8,
    true_cfg_scale=1.0,
    use_kv_cache=True,
    generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
edited.save("qwen21-turbo-edit-w4a4.png")

Acknowledgments

License

These quantized weights are derived from Qwen/Qwen-Image-2.1-Turbo and follow the Qwen Research License. license: other in the model-card metadata is only a placeholder for the Hugging Face license field. The license linked above is what applies.

Downloads last month
865
Safetensors
Model size
7B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for tonera/Qwen-Image-2.1-Turbo-Nunchaku

Quantized
(57)
this model

Collection including tonera/Qwen-Image-2.1-Turbo-Nunchaku