FORA: Fast-Forward Caching in Diffusion Transformer Acceleration

Pratheba Selvaraju, Tianyu Ding, Tianyi Chen, Ilya Zharkov, Luming Liang
7/1/2024
cs.CV

Official code: prathebaselva/FORA (55 stars, last commit 2024-07-08).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

prathebaselva/FORAOfficial100%

FORA introduces simple yet effective caching mechanism in Diffusion Transformer Architecture for faster inference sampling.

552PythonJun 26, 20242 years ago
cachingdiffusion-transformerfaster-sampling

Similar Papers

Cite this paper

@article{selvaraju2024fora,
  title  = {FORA: Fast-Forward Caching in Diffusion Transformer Acceleration},
  author = {Pratheba Selvaraju and Tianyu Ding and Tianyi Chen and Ilya Zharkov and Luming Liang},
  year   = {2024},
  eprint = {2407.01425},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.01425v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.01425.svg)](https://codeofpaper.com/paper/2407.01425)

Discussion