arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2311.06322cs.CVcs.LG

基于渐进校准与激活松弛的文生图扩散模型训练后量化

Post-training Quantization for Text-to-Image Diffusion Models with Progressive Calibration and Activation Relaxing

Tsinghua University(清华大学);Tsingmao Intelligence(清萌智能)

Siao Tang, Xin Wang, Hong Chen, Chaoyu Guan, Zewen Wu, Yansong Tang, Wenwu Zhu

AI总结:

针对文生图扩散模型量化难题,提出 PCR 训练后量化方法及 QDiffBench 评测基准,在 Stable Diffusion 系列上实现高精度、低成本量化。

摘要:

高昂的计算开销是扩散模型面临的一个棘手问题。近期研究利用训练后量化(PTQ)来压缩扩散模型。然而,其中大多数只关注无条件模型,使得广泛使用的预训练文生图模型(例如 Stable Diffusion)的量化在很大程度上仍未得到探索。本文提出一种新颖的文生图扩散模型训练后量化方法 PCR(Progressive Calibration and Relaxing,渐进校准与松弛),该方法包含考虑跨时间步累积量化误差的渐进校准策略,以及以可忽略成本提升性能的激活松弛策略。此外,我们证明以往用于文生图扩散模型量化的指标由于分布差异而不够准确。为解决该问题,我们提出新颖的 QDiffBench 基准,利用同一域内的数据进行更准确的评估。除此之外,QDiffBench 还考虑量化模型在校准数据集之外的泛化性能。在 Stable Diffusion 和 Stable Diffusion XL 上的大量实验证明了我们的方法和基准的优越性。此外,我们首次实现了在保持性能的同时对 Stable Diffusion XL 进行量化。

英文摘要:

High computational overhead is a troublesome problem for diffusion models. Recent studies have leveraged post-training quantization (PTQ) to compress diffusion models. However, most of them only focus on unconditional models, leaving the quantization of widely-used pretrained text-to-image models, e.g., Stable Diffusion, largely unexplored. In this paper, we propose a novel post-training quantization method PCR (Progressive Calibration and Relaxing) for text-to-image diffusion models, which consists of a progressive calibration strategy that considers the accumulated quantization error across timesteps, and an activation relaxing strategy that improves the performance with negligible cost. Additionally, we demonstrate the previous metrics for text-to-image diffusion model quantization are not accurate due to the distribution gap. To tackle the problem, we propose a novel QDiffBench benchmark, which utilizes data in the same domain for more accurate evaluation. Besides, QDiffBench also considers the generalization performance of the quantized model outside the calibration dataset. Extensive experiments on Stable Diffusion and Stable Diffusion XL demonstrate the superiority of our method and benchmark. Moreover, we are the first to achieve quantization for Stable Diffusion XL while maintaining the performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑