AI / Quantization

Diff4Diff

Diff4Diff: Differential Activation Quantization for Diffusion Transformers

See how quantizing the difference between guidance branches changes a four-bit diffusion model's output.

Diff4Diff and Differential Activation Quantization for Diffusion Transformers beside two overlapping ink circles brushed on cream paper.

The paper studies the conditional and unconditional branches used in classifier-free guidance. Explore the matched video sequences, inspect the same detail across each output and compare the results across image, video and 3D generation.

Explore Diff4Diff.

See the interactive examples and explore the method.

Read the interactive blog

Related publications

2026arXiv

Diff4Diff: Differential Activation Quantization for Diffusion Transformers

Philippe Bich, Chiara Boretti, Hyun-Min Chang, Lukas Cavigelli, Lorenz K Muller

QuantizationDiffusion Models
Abstract

Diffusion transformers require repeated, computationally intensive denoising evaluations, motivating low-bit weight and activation quantization. Yet low-bit activation quantization can degrade generation quality. We identify a source of this degradation in classifier-free guidance (CFG): existing quantizers process conditional and unconditional branches independently, while CFG amplifies their difference. Quantization errors enter both branches before subtraction and are amplified by the guidance scale. We introduce Diff4Diff (D4D), a quantizer-agnostic activation transformation applied around linear projections. D4D maps paired branch activations to their mean and difference, allowing the quantizer to operate on these components before reconstructing the branches. The transformation leaves full-precision projections unchanged in exact arithmetic. D4D uses a fixed 2x2 transform and its inverse, introducing minimal computational overhead without requiring training, calibration data, or estimated statistics for the transformation. The method is compatible with different weight and activation quantizers and requires no high-precision correction path. Our evaluation on image, video, and 3D diffusion transformers shows that D4D improves fidelity to full-precision outputs when combined with existing W4A4 quantizers, reducing LPIPS by up to 11.3%, 29.6%, and 52.8% for images, videos, and rendered 3D surface normals, respectively. Fused kernels introduce less than 0.3% end-to-end latency overhead in W4A4 image and video pipelines. Code is available at this https URL.

More blogs from the team

The original AI Almanac mark on a warm paper background, framed by research pages and a code notebook.Interactive blog
AI / Research Discovery

The AI Almanac

Explore the connections between papers and code, and discover the GitScholar research behind The AI Almanac.