提出一种无需训练的扩散模型量化方法,显著提升生成效率。
PQD: Post-training Quantization for Efficient Diffusion Models
- 基于时间感知校准与代表性样本选择,实现无训练量化
- 8位或4位量化后仍保持接近原模型的生成质量(FID变化小)
- 首次支持512x512文生图任务的高效量化,适用性强
扩散模型在生成高保真、多样化图像方面表现卓越,但其巨大的计算开销和缓慢的生成速度限制了广泛应用。本文提出一种新型的后训练量化方法(PQD),是一种基于后训练量化的时序感知优化框架。该方法通过选取代表性样本并进行时序感知校准,优化推理过程。实验表明,所提方法可在无需训练的情况下,将全精度扩散模型直接量化为8位或4位模型,同时在无条件图像生成任务中于ImageNet上仅产生少量FID变化。本方法具备良好兼容性,首次成功应用于512x512文生图生成任务。
原文摘要 · Abstract (English)
Diffusionmodels(DMs)havedemonstratedremarkableachievements in synthesizing images of high fidelity and diversity. However, the extensive computational requirements and slow generative speed of diffusion models have limited their widespread adoption. In this paper, we propose a novel post-training quantization for diffusion models (PQD), which is a time-aware optimization framework for diffusion models based on post-training quantization. The proposed framework optimizes the inference process by selecting representative samples and conducting time-aware calibration. 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 few FID change on ImageNet for unconditional image generation. Our approach demonstrates compatibility and can also be applied to 512x512 text-guided image generation for the first time.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。