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

通过时间注意力分解加速扩散模型

Faster Diffusion via Temporal Attention Decomposition

Center of Excellence for Generative AI, King Abdullah University of Science and Technology (KAUST)(阿卜杜拉国王科技大学生成式AI卓越中心);Show Lab, National University of Singapore (NUS)(新加坡国立大学Show Lab);Swiss AI Lab, IDSIA, USI & SUPSI(瑞士AI实验室);Meta AI

Haozhe Liu, Wentian Zhang, Jinheng Xie, Francesco Faccio, Mengmeng Xu, Tao Xiang, Mike Zheng Shou, Juan-Manuel Perez-Rua, Jürgen Schmidhuber

AI总结:

本文发现文本条件扩散模型中交叉注意力与自注意力在不同推理阶段作用不同,据此提出无需训练的TGATE方法,通过缓存重用注意力输出,实现10%-50%的加速。

摘要:

我们探讨了文本条件扩散模型在推理过程中注意力机制的作用。经验观察表明,交叉注意力输出在若干推理步骤后收敛到一个固定点。收敛时间自然地将整个推理过程分为两个阶段:一个用于规划文本导向视觉语义的初始阶段,这些语义随后在后续的保真度提升阶段被转化为图像。交叉注意力在初始阶段至关重要,但在此后几乎无关紧要。然而,自注意力在初始阶段作用较小,但在第二阶段变得至关重要。这些发现产生了一种简单且无需训练的方法,称为时间门控注意力(TGATE),该方法通过在预定时间步缓存和重用注意力输出来高效生成图像。实验结果表明,当广泛应用于各种现有的文本条件扩散模型时,TGATE可将这些模型加速10%-50%。TGATE的代码可在https://github.com/HaozheLiu-ST/T-GATE获取。

英文摘要:

We explore the role of attention mechanism during inference in text-conditional diffusion models. Empirical observations suggest that cross-attention outputs converge to a fixed point after several inference steps. The convergence time naturally divides the entire inference process into two phases: an initial phase for planning text-oriented visual semantics, which are then translated into images in a subsequent fidelity-improving phase. Cross-attention is essential in the initial phase but almost irrelevant thereafter. However, self-attention initially plays a minor role but becomes crucial in the second phase. These findings yield a simple and training-free method known as temporally gating the attention (TGATE), which efficiently generates images by caching and reusing attention outputs at scheduled time steps. Experimental results show when widely applied to various existing text-conditional diffusion models, TGATE accelerates these models by 10%-50%. The code of TGATE is available at https://github.com/HaozheLiu-ST/T-GATE.

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

↑