NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PTQD: Accurate Post-Training Quantization for Diffusion Models

Yefei He, Luping Liu, Jing Liu, Weijia Wu, Hong Zhou, Bohan Zhuang

Introduction

Diffusion models have emerged as the state-of-the-art for generative tasks, yet their deployment is hindered by significant computational costs. Unlike single-pass generative adversarial networks, diffusion models require iterative denoising steps—often numbering in the dozens or hundreds—through large neural networks. This iterative nature imposes a heavy "efficiency tax" in terms of latency and power consumption.

Post-Training Quantization (PTQ) is a common strategy to mitigate these costs by reducing weight and activation precision (e.g., from FP32 to INT8 or INT4). However, applying standard PTQ to diffusion models typically results in severe performance degradation. This paper introduces PTQD, a framework designed to enable low-bit quantization while maintaining high generative fidelity.

Challenges in Quantizing Diffusion Models

The authors identify two primary obstacles to effective quantization in the diffusion context:

  1. Noise Accumulation: Quantization introduces errors at every denoising step. These errors accumulate, shifting the mean (bias) and increasing the variance of the predicted distribution, causing the model to drift away from the target data manifold.
  2. Signal-to-Noise Ratio (SNR) Collapse: In the final stages of the denoising process, the signal the model predicts becomes increasingly small. If quantization noise exceeds this signal, the SNR collapses, leading to significant artifacts and blurred outputs.

The PTQD Framework

PTQD addresses these challenges by treating quantization noise as a mathematically manageable component of the diffusion process rather than an external error.

Correlation Disentanglement

The authors demonstrate that normalization layers cause quantization noise to become correlated with the network's output. PTQD disentangles this noise into a correlated component—addressed via a scaling coefficient $k$—and an uncorrelated component. This allows for more precise error modeling and correction.

Variance Schedule Calibration (VSC) and Bias Correction (BC)

Rather than letting quantization noise degrade the image, PTQD "absorbs" it into the diffusion math. Variance Schedule Calibration (VSC) adjusts the model's internal variance schedule ($\sigma_t$) to account for the additional variance introduced by lower-precision hardware. Simultaneously, Bias Correction (BC) estimates and subtracts the mean deviation caused by quantization at each step, ensuring the denoising trajectory remains accurate.

Step-aware Mixed Precision (MP)

Recognizing that different denoising steps have varying sensitivity to noise, PTQD employs a step-aware mixed-precision strategy. Early steps, characterized by high noise levels, can tolerate lower precision (e.g., 4-bit). Later steps, which handle fine details and have lower intrinsic signal, require higher precision (e.g., 8-bit) to prevent SNR collapse. A heuristic based on forward process SNR automatically determines the optimal bit-width switching point.

Experimental Evaluation

The framework was evaluated on high-resolution ($256 \times 256$) benchmarks, including ImageNet (class-conditional), LSUN-Bedrooms, LSUN-Churches, and CelebA-HQ.

Performance and Efficiency

PTQD demonstrates a significant reduction in computational overhead. For the LDM-4 model on ImageNet, the framework achieved a 19.9x reduction in Bit Operations (BOPs) compared to the full-precision baseline. On an NVIDIA RTX 3090, this translated to a 3.34x speedup for 4-bit quantization and a 2.03x speedup for 8-bit quantization.

Generative Quality

The method maintains near-lossless quality. On ImageNet, PTQD (using mixed 4-bit/8-bit activations) achieved an FID score of 6.44, representing a negligible increase of 1.39 over the FP32 baseline. Notably, in low-step regimes (e.g., 20 steps), PTQD significantly outperformed existing state-of-the-art methods like Q-Diffusion, which often failed to produce coherent images (FID > 100) where PTQD maintained high fidelity (FID ~7.75).

Conclusion and Future Work

PTQD provides a robust mathematical foundation for quantizing diffusion models. By viewing quantization noise through the lens of diffusion theory and employing step-aware precision, it bridges the gap between high-fidelity generation and efficient hardware deployment.

While the current study focuses on the UNet architecture, future work may extend these techniques to text encoders (CLIP) and VAE decoders. Additionally, as deep learning libraries evolve to better support W4A8 operations, the real-world latency benefits of PTQD are expected to increase further across diverse generative tasks, including video and 3D synthesis.

Summary updated

BibTeX
@inproceedings{he2023ptqd,
  author = {Yefei He and Luping Liu and Jing Liu and Weijia Wu and Hong Zhou and Bohan Zhuang},
  title = {{PTQD: Accurate Post-Training Quantization for Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=Y3g1PV5R9l},
}
Figure