Q-Diffusion: Quantizing Diffusion Models
By Xiuyu Li, Long Lian, Yijia Liu, Hua Yang, Zhen Dong, Daniel Kang, Shanghang Zhang, Kurt Keutzer. IEEE International Conference on Computer Vision, 2023
316 citations recorded by the source corpus.
Diffusion models have achieved great success in image synthesis through iterative noise estimation using deep neural networks. However, the slow inference, high memory consumption, and computation intensity of the noise estimation model hinder the efficient adoption of diffusion models. Although post-training quantization (PTQ) is considered a go-to compression method for other tasks, it does not work out-of-the-box on diffusion models. We propose a novel PTQ method specifically tailored towards the unique multi-timestep pipeline and model architecture of the diffusion models, which compresses the noise estimation network to accelerate the generation process. We identify the key difficulty of diffusion model quantization as the changing output distributions of noise estimation networks over multiple time steps and the bimodal activation distribution of the shortcut layers within the noise estimation network. We tackle these challenges with timestep-aware calibration and split shortcut quantization in this work. Experimental results show that our proposed method is able to quantize full-precision unconditional diffusion models into 4-bit while maintaining comparable performance (small FID change of at most 2.34 compared to >100 for traditional PTQ) in a training-free manner. Our approach can also be applied to text-guided image generation, where we can run stable diffusion in 4-bit weights with high generation quality for the first time.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Statistical and Nonlinear Physics
View Paper: https://www.semanticscholar.org/paper/489ab1945feb21f17b3efbcf40726c8cbb52bb75
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Kurt Keutzer
- A. Gholami
- Michael W. Mahoney
- Zhen Dong
- Sehoon Kim
- Sheng Shen
- Zi-Mei Yao
- Coleman Hooper
In Computer Vision and Pattern Recognition
- Kurt Keutzer
- A. Gholami
- Michael W. Mahoney
- Zhen Dong
- Sehoon Kim
- Sheng Shen
- Zi-Mei Yao
- Coleman Hooper
In Statistical and Nonlinear Physics
Citations in the corpus
- SqueezeLLM: Dense-and-Sparse Quantization (2023, methodology): “Quantization-Aware Training (QAT) requires retraining the model to adapt its weights to help recover accuracy after quantization [2, 35, 55, 82, 85, 86], whereas Post-Training Quantization (PTQ) performs quantization without any retraining [5, 44, 49, 56, 87].”