Key takeaways

  • Large diffusion transformers can create stunning images (or even videos, audio snippets, and now text), but loading a modern text-to-image m
  • This reduces memory usage significantly, but it usually does not make inference faster, and can even add a small latency overhead.
  • The details are covered below, but until now, using these checkpoints required a separate inference library.

What happened

Large diffusion transformers can create stunning images (or even videos, audio snippets, and now text), but loading a modern text-to-image model in BF16 precision often requires 20-30 GB of VRAM, which puts these models out of reach of most consumer GPUs.

This reduces memory usage significantly, but it usually does not make inference faster, and can even add a small latency overhead. SVDQuant, the quantization method behind the popular Nunchaku inference engine, takes a different approach. It runs the main transformer layers with 4-bit weights and activations (W4A4), reducing memory while also speeding up the denoising loop.

The details are covered below, but until now, using these checkpoints required a separate inference library. With current Diffusers, loading a Nunchaku checkpoint is as simple as calling from_pretrained(), with no local CUDA compilation required thanks to the kernels package. In addition, the companion diffuse-compressor toolkit lets you quantize new architectures yourself and publish them as regular Diffusers repositories. First, install the requirements.

You need a recent version of Diffusers and the Hugging Face kernels package: No custom pipeline class or separate inference engine is needed, and there is nothing to compile locally. The NVFP4 kernels are downloaded from the Hub through the Nunchaku Lite kernels page the first time they are used.

7 seconds on an RTX 5090 with a peak memory usage of about 12 GB, compared with about 24 GB for the BF16 pipeline. You can find more details about the Nunchaku Lite checkpoint format in the official Diffusers documentation. SVDQuant is the quantization method behind Nunchaku, its reference CUDA inference engine. Standard 4-bit quantization is difficult for diffusion transformers because both weights and activations contain large outliers.

SVDQuant handles this by moving activation outliers into the weights, representing the hardest part of each weight matrix with a small 16-bit low-rank branch, and quantizing the remaining residual to 4 bits. Nunchaku makes this fast with fused kernels for the 4-bit path and the low-rank branch. The original Nunchaku engine gets much of its speed from model-specific fused execution paths, such as fused QKV projections and fused GELU/MLP kernels.

Those optimizations are tied to each architecture's module layout and checkpoint format, so supporting a new model family usually requires model-specific integration work. Nunchaku Lite is the new integration path in Diffusers. With it, Diffusers can load Nunchaku-style checkpoints without a custom pipeline or a separate inference engine. Linear modules of a stock Diffusers model with runtime SVDQ/AWQ linear layers before the checkpoint is loaded.

A Nunchaku Lite model repository is an ordinary Diffusers repository. json: This config tells Diffusers which modules were quantized, which scheme t

Why it matters

Quantization is a powerful solution to this problem, and Diffusers already integrates several quantization backends such as bitsandbytes, GGUF, torchao, and Quanto, which we covered in Exploring Quantization Backends in Diffusers. Most of these backends are weight-only. This means that they store the weights in low precision and dequantize them back to high precision at compute time.

What to watch

The CUDA kernels come from the Hub through the kernels package. Two kernel families are used: The trade-off is that, without architecture-specific fused kernels and modules, Nunchaku Lite cannot match the speedup of the original Nunchaku engine. However, the bare-bones implementation still delivers around 30% speedup while retaining the same level of VRAM reduction. If you have used bitsandbytes or torchao in Diffusers, the mechanics will feel familiar.