arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.05252cs.CVcs.AIcs.LGeess.IVeess.SP
收藏

扩散模型的注意力驱动、无需训练的效率增强

Attention-Driven Training-Free Efficiency Enhancement of Diffusion Models

Princeton University(普林斯顿大学);Adobe Research(奥多比研究中心)

Hongjie Wang, Difan Liu, Yan Kang, Yijun Li, Zhe Lin, Niraj K. Jha, Yuchen Liu

AI总结:

本文提出无需训练的 AT-EDM 框架,通过 G-WPR 识别并剪枝冗余注意力 token、相似性恢复及 DSAP 跨去噪步分配预算,在保持生成质量的同时显著降低 Stable Diffusion XL 计算量。

摘要:

扩散模型(Diffusion Models, DMs)在生成高质量且多样化图像方面表现出卓越性能。然而,这种出色性能的代价是昂贵的架构设计,尤其是主流模型中大量使用的注意力模块。现有工作主要采用重新训练流程来提升 DM 效率,这在计算上代价高昂且可扩展性较差。为此,我们提出注意力驱动的无需训练的高效扩散模型(Attention-driven Training-free Efficient Diffusion Model, AT-EDM)框架,该框架利用注意力图在运行时剪除冗余 token,无需任何重新训练。具体而言,对于单去噪步剪枝,我们开发了一种新颖的排序算法——广义加权 Page Rank(Generalized Weighted Page Rank, G-WPR),用于识别冗余 token,并提出一种基于相似性的恢复方法,以为卷积操作恢复 token。此外,我们提出去噪步感知剪枝(Denoising-Steps-Aware Pruning, DSAP)方法,在不同去噪时间步之间调整剪枝预算,以获得更好的生成质量。大量评估表明,AT-EDM 在效率方面优于现有方法(例如,相比 Stable Diffusion XL 节省 38.8% FLOPs,并实现最高 1.53 倍加速),同时保持与完整模型几乎相同的 FID 和 CLIP 分数。项目网页:https://atedm.github.io。

英文摘要:

Diffusion Models (DMs) have exhibited superior performance in generating high-quality and diverse images. However, this exceptional performance comes at the cost of expensive architectural design, particularly due to the attention module heavily used in leading models. Existing works mainly adopt a retraining process to enhance DM efficiency. This is computationally expensive and not very scalable. To this end, we introduce the Attention-driven Training-free Efficient Diffusion Model (AT-EDM) framework that leverages attention maps to perform run-time pruning of redundant tokens, without the need for any retraining. Specifically, for single-denoising-step pruning, we develop a novel ranking algorithm, Generalized Weighted Page Rank (G-WPR), to identify redundant tokens, and a similarity-based recovery method to restore tokens for the convolution operation. In addition, we propose a Denoising-Steps-Aware Pruning (DSAP) approach to adjust the pruning budget across different denoising timesteps for better generation quality. Extensive evaluations show that AT-EDM performs favorably against prior art in terms of efficiency (e.g., 38.8% FLOPs saving and up to 1.53x speed-up over Stable Diffusion XL) while maintaining nearly the same FID and CLIP scores as the full model. Project webpage: https://atedm.github.io.

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

↑