Nunchaku Lite Finally Lets You Run Big Diffusion Models on Consumer GPUs—Without the Usual Headaches
Nunchaku Lite integrates SVDQuant quantization into Diffusers, enabling W4A4 inference on consumer GPUs with half the VRAM and up to 1.8x speedup. It supports pre-quantized checkpoints via standard `from_pretrained()` calls, with NVFP4 for Blackwell and INT4 for older GPUs. While slightly slower than the native engine, it offers model-agnostic support and a straightforward quantization toolkit.

Nunchaku Lite Finally Lets You Run Big Diffusion Models on Consumer GPUs—Without the Usual Headaches
If you’ve tried loading a modern text-to-image diffusion transformer (FLUX, ERNIE-Image-Turbo, etc.) in BF16, the result is the same: 20–30 GB of VRAM, which immediately rules out every consumer GPU short of a 4090 or 5090. Quantization helps, but most weight-only backends (bitsandbytes, GGUF, torchao) save memory at the cost of a small latency tax—they dequantize weights back to high precision at compute time. It’s like buying groceries in bulk but only taking one item out of the bag at a time.
SVDQuant, the method behind the Nunchaku inference engine, takes a different approach: it quantizes both weights and activations to 4 bits (W4A4). That cuts memory while actually speeding up the denoising loop. Until now, using it meant pulling in a separate CUDA library and hoping your model architecture was supported. With Diffusers’ new native integration, you just call from_pretrained(). No local compilation, no custom pipeline.
To get started: install pip install -U diffusers transformers accelerate kernels bitsandbytes, then load a pre-quantized checkpoint like any other model. Generating a 1024×1024 image on an RTX 5090 takes about 1.7 seconds with peak VRAM around 12 GB—roughly half the 24 GB the BF16 version would need. The speedup over dense is about 1.35x, and if you throw torch.compile(fullgraph=True) at the transformer, it jumps to 1.8x.
There’s a hardware catch: the NVFP4 variant (the fastest one) requires Blackwell GPUs (RTX 50 series, RTX PRO 6000, B200). For RTX 30 and 40 series, A100, or L40S, use the INT4 kernels. Volta and Hopper are currently out of luck.
But it’s not quite the full Nunchaku experience. The original engine gets its speed from model-specific fused operations (e.g., combining Q, K, V projections into one fused kernel with normalization and rotary embeddings). Nunchaku Lite, the Diffusers integration, patches individual nn.Linear modules without those structural rewrites. You lose some raw performance—maybe 20–30% less speedup than the native engine—but you gain model agnosticism. If your architecture fits the generic pattern (attention + MLP linears in a transformer block), it works out of the box.
Quantize your own models: the diffuse-compressor toolkit lets you calibrate, quantize, package the result as a standard Diffusers repo, and upload to the Hub. The generic path handles most architectures, but if your model has fused projections (like FLUX.1-dev’s QKV), you’ll need a model-specific target config and a small runtime adapter. The docs include a full example for FLUX.2 Klein 4B.
Bottom line: Nunchaku Lite makes SVDQuant practical for everyday workflows—no exotic dependencies, just from_pretrained(). If you’ve got a Blackwell card, you get memory halved and speed boosted. If you’re still on Ada or Ampere, the INT4 path still clears a comfortable 50% VRAM reduction with a 30% latency win. For once, running a 30GB model on a 12GB GPU doesn’t feel like a hack.
Read the original at huggingface.co →