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

时间特征很重要:一种扩散模型量化框架

Temporal Feature Matters: A Framework for Diffusion Model Quantization

Department of Electrical and Computer Engineering, the Hong Kong University of Science and Technology(香港科技大学电子与计算机工程系);State Key Laboratory of Complex & Critical Software Environment, Beihang University(北京航空航天大学复杂与关键软件环境国家重点实验室);Department of Information Technology, Monash University(墨尔本大学信息科技系);Department of Electrical Engineering, Yale University(耶鲁大学电子工程系)

Yushi Huang, Ruihao Gong, Xianglong Liu, Jing Liu, Yuhang Li, Jiwen Lu, Dacheng Tao

AI总结:

针对扩散模型推理慢和内存高的问题,提出一种新型量化框架,通过基于TIB的维护、基于缓存的维护和扰动感知选择三种策略有效保留时间特征信息,确保高质量生成并实现卓越加速。

摘要:

广泛用于图像生成的扩散模型,由于推理时间长和内存需求高,在其广泛适用性上面临重大挑战。高效的训练后量化(PTQ)对于解决这些问题至关重要。然而,与传统模型不同,扩散模型严重依赖多轮去噪的时间步。通常,每个时间步由几个模块编码为高度敏感的时间特征。尽管如此,现有的PTQ方法并未单独优化这些模块。相反,它们采用不合适的重建目标和复杂的校准方法,导致时间特征和去噪轨迹受到显著干扰,并降低了压缩效率。为了应对这些挑战,我们引入了一个包含三种策略的新型量化框架:1)基于TIB的维护:基于我们创新的Temporal Information Block(TIB)定义,开发了Temporal Information-aware Reconstruction(TIAR)和Finite Set Calibration(FSC)来高效对齐原始时间特征。2)基于缓存的维护:不对相关模块进行间接且复杂的优化,而是开发了对时间特征的量化对应物进行预计算和缓存的方法,以最小化误差。3)扰动感知选择:利用时间特征误差来指导两种维护策略之间的细粒度选择,以进一步减少扰动。该框架保留了大部分时间信息,并确保高质量的端到端生成。在各种数据集、扩散模型和硬件上的广泛测试证实了我们卓越的性能和加速效果。

英文摘要:

The Diffusion models, widely used for image generation, face significant challenges related to their broad applicability due to prolonged inference times and high memory demands. Efficient Post-Training Quantization (PTQ) is crucial to address these issues. However, unlike traditional models, diffusion models critically rely on the time-step for the multi-round denoising. Typically, each time-step is encoded into a hypersensitive temporal feature by several modules. Despite this, existing PTQ methods do not optimize these modules individually. Instead, they employ unsuitable reconstruction objectives and complex calibration methods, leading to significant disturbances in the temporal feature and denoising trajectory, as well as reduced compression efficiency. To address these challenges, we introduce a novel quantization framework that includes three strategies: 1) TIB-based Maintenance: Based on our innovative Temporal Information Block (TIB) definition, Temporal Information-aware Reconstruction (TIAR) and Finite Set Calibration (FSC) are developed to efficiently align original temporal features. 2) Cache-based Maintenance: Instead of indirect and complex optimization for the related modules, pre-computing and caching quantized counterparts of temporal features are developed to minimize errors. 3) Disturbance-aware Selection: Employ temporal feature errors to guide a fine-grained selection between the two maintenance strategies for further disturbance reduction. This framework preserves most of the temporal information and ensures high-quality end-to-end generation. Extensive testing on various datasets, diffusion models and hardware confirms our superior performance and acceleration.

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

↑