Towards Accurate Post-Training Quantization for Diffusion Models

Changyuan Wang, Ziwei Wang, Xiuwei Xu, Yansong Tang, Jie Zhou +1 more
2/14/2026

No official code found. Best implementation: ChangyuanWang17/APQ-DM (37 stars, Apache-2.0, last commit 2024-06-04).

Abstract

In this paper, we propose an accurate post-training quantization framework of diffusion models (APQ-DM) for efficient image generation. Conventional quantization frameworks learn shared quantization functions for tensor discretization regardless of the generation timesteps in diffusion models, while the activation distribution differs significantly across various timesteps. Meanwhile, the calibration images are acquired in random timesteps which fail to provide sufficient information for generalizable quantization function learning. Both issues cause sizable quantization errors with obvious image generation performance degradation. On the contrary, we design distribution-aware quantization functions for activation discretization in different timesteps and search the optimal timesteps for informative calibration image generation, so that our quantized diffusion model can reduce the discretization errors with negligible computational overhead. Specifically, we partition various timestep quantization functions into different groups according to the importance weights, which are optimized by differentiable search algorithms. We also extend structural risk minimization principle for informative calibration image generation to enhance the generalization ability in the deployment of quantized diffusion model. Extensive experimental results show that our method outperforms the state-of-the-art post-training quantization of diffusion model by a sizable margin with similar computational cost11Code is available at https://github.com/ChangyuanWang17/APQ-DM.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

This is the official pytorch implementation for the paper: Towards Accurate Post-training Quantization for Diffusion Models.(CVPR24 Poster Highlight)

372Shell, PythonMar 27, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{wang2026towards,
  title  = {Towards Accurate Post-Training Quantization for Diffusion Models},
  author = {Changyuan Wang and Ziwei Wang and Xiuwei Xu and Yansong Tang and Jie Zhou and Jiwen Lu},
  year   = {2026},
  eprint = {2305.18723},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2305.18723},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.18723.svg)](https://codeofpaper.com/paper/2305.18723)

Discussion