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(耶鲁大学电子工程系)
广泛用于图像生成的扩散模型,由于推理时间长和内存需求高,在其广泛适用性上面临重大挑战。高效的训练后量化(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.
MPQ-DM: Mixed Precision Quantization for Extremely Low Bit Diffusion Models
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);ETH Zurich(苏黎世联邦理工学院);Beijing Jiaotong University(北京交通大学)
Post-Training Quantization via Residual Truncation and Zero Suppression for Diffusion Models
Department of Artificial Intelligence(人工智能系);Kyung Hee University(庆尚大学);Department of Electrical Engineering(电气工程系);Department of Computer Science(计算机科学系)
FP4DiT: Towards Effective Floating Point Quantization for Diffusion Transformers
Department of Electrical and Computer Engineering, Faculty of Engineering University of Alberta(电气与计算机工程系,工程学院,阿尔伯塔大学);Division of Computer Science and Engineering, College of Engineering Louisiana State University(计算机科学与工程系,工程学院,路易斯安那州立大学)
Hardware-Friendly Static Quantization Method for Video Diffusion Transformers
Division of the Humanities and Social Sciences(人文与社会科学系);California Institute of Technology(加州理工学院);Device Solutions Research America(设备解决方案研究美国);Samsung Semiconductor Inc.(三星半导体公司)
School of Software Technology, Zhejiang University(浙江大学软件技术学院);Ningbo Innovation Center, Zhejiang University(浙大宁波创新中心);State Key Laboratory of Blockchain and Security, Zhejiang University(浙江大学区块链与安全国家重点实验室);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security(杭州高新技术区(滨江)区块链与数据安全研究院)
MPQ-DMv2: Flexible Residual Mixed Precision Quantization for Low-Bit Diffusion Models with Temporal Distillation
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);ETH Zurich(苏黎世联邦理工学院);Institute of Artificial Intelligence, Beihang University(北航人工智能研究院);Zhongguancun Laboratory(中关村实验室);Department of Electrical Engineering, The City College(城市学院电子工程系);Department of Computer Science, the Graduate Center, the City University of New York(纽约城市大学计算机科学系);School of Computer Science and Control Engineering, Shenzhen University of Advanced Technology(深圳先进技术大学计算机科学与控制工程学院)
QuantSparse: Comprehensively Compressing Video Diffusion Transformer with Model Quantization and Attention Sparsification
State Key Laboratory of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences(人工智能安全国家重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);ETH Zürich(苏黎世联邦理工学院);City College of New York, City University of New York, USA(纽约城市学院,纽约城市大学,美国);Shanghai Jiao Tong University(上海交通大学)
Spatial-Temporal Multi-Scale Quantization for Flexible Motion Generation
School of Computer Science & Technology, Beijing Institute of Technology(北京理工大学计算机科学与技术学院);State Key Laboratory of General Artificial Intelligence, BIGAI(一般人工智能国家重点实验室,BIGAI);Department of Automation, Tsinghua University(清华大学自动化系);Yangtze Delta Region Academy of Beijing Institute of Technology, Jiaxing(北京理工大学长江三角洲地区研究院,嘉兴)
Modulated Diffusion: Accelerating Generative Modeling with Modulated Quantization
Department of Computer Science, North Carolina State University(北卡罗来纳州立大学计算机科学系);National Center for Computational Science, Oak Ridge National Lab(橡树岭国家实验室计算科学中心);Department of Mechanical Engineering, Keio University(庆应大学机械工程系)
LRQ-DiT: Log-Rotation Post-Training Quantization of Diffusion Transformers for Image and Video Generation
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Department of Electronic Engineering, Tsinghua University(清华大学电子工程系);School of Engineering and Applied Sciences, Harvard University(哈佛大学工程与应用科学学院);Department of Computer Science, City University of Hong Kong(香港城市大学计算机科学系)
Tsinghua University(清华大学);University of California Santa Barbara(加利福尼亚大学圣巴巴拉分校);Microsoft(微软公司);Infinigence AI(智源人工智能);Shanghai Jiaotong University(上海交通大学)