Q-Diffusion: Quantizing Diffusion Models

02/08/2023
by   Xiuyu Li, et al.
0

Diffusion models have achieved great success in synthesizing diverse and high-fidelity images. However, sampling speed and memory constraints remain a major barrier to the practical adoption of diffusion models, since the generation process for these models can be slow due to the need for iterative noise estimation using compute-intensive neural networks. We propose to tackle this problem by compressing the noise estimation network to accelerate the generation process through post-training quantization (PTQ). While existing PTQ approaches have not been able to effectively deal with the changing output distributions of noise estimation networks in diffusion models over multiple time steps, we are able to formulate a PTQ method that is specifically designed to handle the unique multi-timestep structure of diffusion models with a data calibration scheme using data sampled from different time steps. Experimental results show that our proposed method is able to directly quantize full-precision diffusion models into 8-bit or 4-bit models while maintaining comparable performance in a training-free manner, achieving a FID change of at most 1.88. Our approach can also be applied to text-guided image generation, and for the first time we can run stable diffusion in 4-bit weights without losing much perceptual quality, as shown in Figure 5 and Figure 9.

READ FULL TEXT

page 6

page 11

page 12

research
11/28/2022

Post-training Quantization on Diffusion Models

Denoising diffusion (score-based) generative models have recently achiev...
research
05/30/2023

Nested Diffusion Processes for Anytime Image Generation

Diffusion models are the current state-of-the-art in image generation, s...
research
05/18/2023

PTQD: Accurate Post-Training Quantization for Diffusion Models

Diffusion models have recently dominated image synthesis and other relat...
research
10/06/2022

On Distillation of Guided Diffusion Models

Classifier-free guided diffusion models have recently been shown to be h...
research
06/15/2023

OMS-DPM: Optimizing the Model Schedule for Diffusion Probabilistic Models

Diffusion probabilistic models (DPMs) are a new class of generative mode...
research
02/05/2023

ReDi: Efficient Learning-Free Diffusion Inference via Trajectory Retrieval

Diffusion models show promising generation capability for a variety of d...
research
05/30/2023

Towards Accurate Data-free Quantization for Diffusion Models

In this paper, we propose an accurate data-free post-training quantizati...

Please sign up or login with your details

Forgot password? Click here to reset