Back to News Hub
🤗Hugging Face
July 23, 2026
General AI

Bringing Nunchaku 4-bit Diffusion Inference to Diffusers

Overview

We're on a journey to advance and democratize artificial intelligence through open source and open science. 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 .

Key Takeaways

  • This means that they store the weights in low precision and dequantize them back to high precision at compute time.

    This reduces memory usage significantly, but it usually does not make inference faster, and can even add a small latency overhead.

  • With current Diffusers, loading a Nunchaku checkpoint is as simple as calling , with no local CUDA compilation required thanks to the package.

    In addition, the companion diffuse-compressor toolkit lets you quantize new architectures yourself and publish them as regular Diffusers repositories.

  • 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 .

  • Background: SVDQuant and Nunchaku 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.

  • Nunchaku Lite is the new integration path in Diffusers.

This means that they store the weights in low precision and dequantize them back to high precision at compute time. 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 , with no local CUDA compilation required thanks to the package.

In addition, the companion diffuse-compressor toolkit lets you quantize new architectures yourself and publish them as regular Diffusers repositories. Table of Contents Getting started with Nunchaku Lite Background: SVDQuant and Nunchaku Introducing Nunchaku Lite Native loading in Diffusers Getting more speed and lower memory Benchmarks Quantizing your own model Ready-to-use checkpoints Conclusion Acknowledgements Getting started with Nunchaku Lite First, install the requirements. You need a recent version of Diffusers and the Hugging Face package: Then load a pre-quantized pipeline like any other Diffusers model: No custom pipeline class or separate inference engine is needed, and there is nothing to compile locally.

For more details please read the original article at Hugging Face.

Continue Learning

Originally published by Hugging Face
Read the original

Comments

Sign in to join the conversation