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

DiTFastAttnV2:面向多模态扩散Transformer的逐头注意力压缩

DiTFastAttnV2: Head-wise Attention Compression for Multi-Modality Diffusion Transformers

Tsinghua University(清华大学);Infinigence AI(智源人工智能);Fudan University(复旦大学);Imperial College London(伦敦帝国学院);Shanghai Jiao Tong University(上海交通大学)

Hanling Zhang, Rundong Su, Zhihang Yuan, Pengtao Chen, Mingzhu Shen Yibo Fan, Shengen Yan, Guohao Dai, Yu Wang

AI总结:

本文提出DiTFastAttnV2,一种针对多模态扩散Transformer的训练后注意力压缩方法,通过逐头箭头注意力与缓存机制及高效融合内核,在保持生成质量的同时实现68%的注意力FLOPs减少和1.5倍端到端加速。

摘要:

文本到图像生成模型,尤其是多模态扩散Transformer(MMDiT),在生成高质量图像方面取得了显著进展。然而,这些模型常面临严重的计算瓶颈,特别是在注意力机制中,这阻碍了其可扩展性与效率。本文提出DiTFastAttnV2,一种旨在加速MMDiT中注意力的训练后压缩方法。通过对MMDiT注意力模式的深入分析,我们识别出与先前基于DiT方法的关键差异,并提出逐头箭头注意力与缓存机制来动态调整注意力头,有效弥合了这一差距。我们还设计了高效融合内核以进一步加速。借助局部度量方法与优化技术,我们的方法将最优压缩方案的搜索时间大幅缩减至仅几分钟,同时保持生成质量。此外,凭借定制内核,DiTFastAttnV2在2K图像生成上实现了68%的注意力FLOPs减少和1.5倍的端到端加速,且未损害视觉保真度。

英文摘要:

Text-to-image generation models, especially Multimodal Diffusion Transformers (MMDiT), have shown remarkable progress in generating high-quality images. However, these models often face significant computational bottlenecks, particularly in attention mechanisms, which hinder their scalability and efficiency. In this paper, we introduce DiTFastAttnV2, a post-training compression method designed to accelerate attention in MMDiT. Through an in-depth analysis of MMDiT's attention patterns, we identify key differences from prior DiT-based methods and propose head-wise arrow attention and caching mechanisms to dynamically adjust attention heads, effectively bridging this gap. We also design an Efficient Fused Kernel for further acceleration. By leveraging local metric methods and optimization techniques, our approach significantly reduces the search time for optimal compression schemes to just minutes while maintaining generation quality. Furthermore, with the customized kernel, DiTFastAttnV2 achieves a 68% reduction in attention FLOPs and 1.5x end-to-end speedup on 2K image generation without compromising visual fidelity.

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

↑