Abstract
Diffusion models (DMs) have set new standards in generative AI but suffer from high computational costs. This review provides a comprehensive taxonomy of quantization techniques designed to mitigate these overheads. We explore Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT) across U-Net and Diffusion Transformer (DiT) architectures, highlighting the unique challenges of iterative error accumulation and dynamic activation distributions.
Introduction: The Deployment Bottleneck
While diffusion models like Stable Diffusion produce high-quality results, their iterative denoising process is computationally expensive. Deploying these models on edge devices requires significant memory and compute reduction. Quantization—converting 32-bit floating-point weights and activations into lower-bit integers (e.g., INT8 or INT4)—is a primary solution. However, DMs present three unique hurdles:
- Iterative Error Accumulation: Unlike single-pass classifiers, DMs are iterative. Small quantization errors in early steps compound over the denoising chain, causing the final image to "drift" away from the intended result.
- Dynamic Distributions: Activation ranges change significantly across different timesteps (e.g., early noise-heavy steps vs. late detail-refining steps), making static quantization ineffective.
- Architectural Quirks: U-Nets use "shortcut" concatenations that create difficult-to-quantize bimodal data distributions, while DiTs suffer from extreme outliers in their attention mechanisms.
Taxonomy of Quantization Methods
The research landscape is divided into two primary strategies: Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT).
Post-Training Quantization (PTQ)
PTQ methods are "data-light" and don't require full retraining. Key innovations include:
- Calibration Strategies: Techniques like Normally Distributed Time-step Calibration (NDTC) sample specific timesteps to better capture the model's dynamic range.
- Error Correction: Methods like PTQD and D2-DPM model quantization noise as a distribution and subtract it during the sampling process to "nudge" the trajectory back on track.
- Specialized Handling: "Split" quantization addresses the bimodal distributions found in U-Net architectures.
Quantization-Aware Training (QAT)
QAT involves fine-tuning the model to be "noise-resilient," which is essential for ultra-low bitwidths.
- LoRA-Based Enhancements: Using techniques like QaLoRA or IntLoRA makes QAT computationally feasible for massive models.
- Ultra-Low Bit Models: Research into 1-bit (binary) diffusion models replaces multiplications with simple bitwise operations.
Key Insights and Benchmarks
The "Beneficial" Noise Paradox
One of the most surprising findings is that in some cases, 4-bit models (W4A8) actually outperform 8-bit models. The authors hypothesize that quantization noise can act as a form of "Langevin dynamics," providing a stochasticity that helps the sampling process contract errors, similar to how noise injection works in standard SDE solvers.
Temporal Confusion and Color Bias
Quantizing the TimeEmbedding layer is particularly dangerous. If the model "misunderstands" what timestep it is currently at due to quantization error, the entire denoising trajectory can become convoluted. Qualitatively, quantization noise often hits the blue channel hardest, leading to a distinct yellow color shift in generated images.
Performance Results
- 8-bit is the "Sweet Spot" for PTQ: Most PTQ methods (like D2-DPM) achieve near-lossless performance at W8A8. For instance, D2-DPM achieves an FID of 8.12 on ImageNet, very close to the full-precision baseline.
- The 4-bit Wall: PTQ methods generally fail when activations are pushed to 4-bit (W4A4), leading to massive FID spikes and visual artifacts. QAT methods like QuEST are essential for 4-bit stability, maintaining an FID of 8.52 at W4A8.
Limitations and Future Work
While QAT is effective, the computational cost of fine-tuning large-scale models remains prohibitive. Furthermore, there is a gap in how these quantized kernels perform on specific edge hardware (NPU, mobile GPU). Future work should explore vector quantization and the link between quantization and model explainability to understand why certain layers are more sensitive than others.
Summary updated