缓存自适应令牌合并:扩散模型中的动态令牌缩减与冗余计算消除
Cached Adaptive Token Merging: Dynamic Token Reduction and Redundant Computation Elimination in Diffusion Model
AI总结:
本文提出缓存自适应令牌合并(CA-ToMe),通过自适应阈值和跨步缓存相似对来动态减少扩散模型中的冗余令牌,在保持FID不变的同时实现1.24倍去噪加速。
摘要:
扩散模型已成为生成高质量、高维图像的一种有前景的方法。然而,这些模型受到高计算成本和缓慢推理的阻碍,部分原因是自注意力机制相对于输入大小的二次计算复杂度。人们已提出各种方法来解决这一缺点。其中一种方法侧重于减少输入到自注意力中的令牌数量,称为令牌合并(ToMe)。在我们称为缓存自适应令牌合并(CA-ToMe)的方法中,我们计算令牌之间的相似度,然后合并最相似的r比例的令牌。然而,由于在相邻步骤中观察到的重复模式以及相似度频率的变化,我们旨在通过实现一个用于合并令牌的自适应阈值,并添加一个缓存机制来存储若干相邻步骤中的相似对,从而增强这种方法。实证结果表明,我们的方法作为一种免训练的加速方法运行,在去噪过程中实现了1.24倍的加速因子,同时与现有方法相比保持了相同的FID分数。
英文摘要:
Diffusion models have emerged as a promising approach for generating high-quality, high-dimensional images. Nevertheless, these models are hindered by their high computational cost and slow inference, partly due to the quadratic computational complexity of the self-attention mechanisms with respect to input size. Various approaches have been proposed to address this drawback. One such approach focuses on reducing the number of tokens fed into the self-attention, known as token merging (ToMe). In our method, which is called cached adaptive token merging(CA-ToMe), we calculate the similarity between tokens and then merge the r proportion of the most similar tokens. However, due to the repetitive patterns observed in adjacent steps and the variation in the frequency of similarities, we aim to enhance this approach by implementing an adaptive threshold for merging tokens and adding a caching mechanism that stores similar pairs across several adjacent steps. Empirical results demonstrate that our method operates as a training-free acceleration method, achieving a speedup factor of 1.24 in the denoising process while maintaining the same FID scores compared to existing approaches.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。