arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.02508cs.CVeess.IV
收藏

Q&C:当量化在高效图像生成中遇到缓存

Q&C: When Quantization Meets Cache in Efficient Image Generation

University of Science and Technology of China(中国科学技术大学);ETH Zürich(苏黎世联邦理工学院)

Xin Ding, Xin Li, Haotong Qin, Zhibo Chen

AI总结:

针对量化与缓存机制结合导致的校准失效和暴露偏差问题,提出混合加速方法TAP与VC策略,在保持生成能力的同时将DiTs加速12.7倍。

摘要:

量化和缓存机制通常分别应用于高效的Diffusion Transformers (DiTs),每种机制都展现出显著的加速潜力。然而,这两种机制结合对高效生成的促进作用仍未得到充分探索。通过实证研究,我们发现将量化与缓存机制结合用于DiT并非易事,两个关键挑战导致了严重的灾难性性能下降:(i) 校准数据集在训练后量化 (PTQ) 中的样本有效性被缓存操作显著消除;(ii) 上述机制的结合在采样分布内引入了更严重的暴露偏差,导致图像生成过程中误差累积被放大。在本研究中,我们利用这两种加速机制,并通过解决上述挑战提出了一种混合加速方法,旨在进一步提高DiTs的效率,同时保持出色的生成能力。具体而言,设计了时间感知并行聚类 (TAP),以动态提高不同扩散步骤PTQ中校准的样本选择有效性。推导了方差补偿 (VC) 策略来校正采样分布。它通过自适应校正因子生成来缓解暴露偏差。大量实验表明,我们的方法将DiTs加速了12.7倍,同时保持了具竞争力的生成能力。代码将发布于 https://github.com/xinding-sys/Quant-Cache。

英文摘要:

Quantization and cache mechanisms are typically applied individually for efficient Diffusion Transformers (DiTs), each demonstrating notable potential for acceleration. However, the promoting effect of combining the two mechanisms on efficient generation remains under-explored. Through empirical investigation, we find that the combination of quantization and cache mechanisms for DiT is not straightforward, and two key challenges lead to severe catastrophic performance degradation: (i) the sample efficacy of calibration datasets in post-training quantization (PTQ) is significantly eliminated by cache operation; (ii) the combination of the above mechanisms introduces more severe exposure bias within sampling distribution, resulting in amplified error accumulation in the image generation process. In this work, we take advantage of these two acceleration mechanisms and propose a hybrid acceleration method by tackling the above challenges, aiming to further improve the efficiency of DiTs while maintaining excellent generation capability. Concretely, a temporal-aware parallel clustering (TAP) is designed to dynamically improve the sample selection efficacy for the calibration within PTQ for different diffusion steps. A variance compensation (VC) strategy is derived to correct the sampling distribution. It mitigates exposure bias through an adaptive correction factor generation. Extensive experiments have shown that our method has accelerated DiTs by 12.7x while preserving competitive generation capability. The code will be available at https://github.com/xinding-sys/Quant-Cache.

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

↑