arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.01425cs.CV
收藏

FORA:扩散Transformer加速中的快进缓存

FORA: Fast-Forward Caching in Diffusion Transformer Acceleration

UMass Amherst(马萨诸塞大学阿默斯特分校);Microsoft(微软公司)

Pratheba Selvaraju, Tianyu Ding, Tianyi Chen, Ilya Zharkov, Luming Liang

AI总结:

FORA提出一种无需重训练的快进缓存机制,通过跨去噪步骤重用注意力层和MLP层中间输出,在几乎不影响IS Score和FID的情况下将扩散Transformer加速数倍,显著提升实时部署可行性。

摘要:

扩散Transformer(DiT)已成为生成高质量图像和视频的事实标准选择,这主要归功于其可扩展性,使得能够构建更大的模型以获得更强的性能。然而,这些模型规模的增大导致推理成本上升,使其在实时应用中的吸引力下降。我们提出Fast-FORward CAching(FORA),这是一种简单而有效的方法,旨在通过利用扩散过程的重复特性来加速DiT。FORA实现了一种缓存机制,在去噪步骤之间存储并重用来自注意力层和MLP层的中间输出,从而降低计算开销。该方法不需要重新训练模型,并能与现有的基于Transformer的扩散模型无缝集成。实验表明,FORA可以将扩散Transformer的速度提升数倍,同时对IS Score和FID等性能指标的影响极小。通过以最小的质量权衡实现更快的处理速度,FORA代表了在实时应用中部署扩散Transformer方面的重要进展。代码将公开于:https://github.com/prathebaselva/FORA。

英文摘要:

Diffusion transformers (DiT) have become the de facto choice for generating high-quality images and videos, largely due to their scalability, which enables the construction of larger models for enhanced performance. However, the increased size of these models leads to higher inference costs, making them less attractive for real-time applications. We present Fast-FORward CAching (FORA), a simple yet effective approach designed to accelerate DiT by exploiting the repetitive nature of the diffusion process. FORA implements a caching mechanism that stores and reuses intermediate outputs from the attention and MLP layers across denoising steps, thereby reducing computational overhead. This approach does not require model retraining and seamlessly integrates with existing transformer-based diffusion models. Experiments show that FORA can speed up diffusion transformers several times over while only minimally affecting performance metrics such as the IS Score and FID. By enabling faster processing with minimal trade-offs in quality, FORA represents a significant advancement in deploying diffusion transformers for real-time applications. Code will be made publicly available at: https://github.com/prathebaselva/FORA.

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

↑