Fast Sampling Through The Reuse Of Attention Maps In Diffusion Models

Rosco Hunter, Łukasz Dudziak, Mohamed S. Abdelfattah, Abhinav Mehrotra, Sourav Bhattacharya +1 more
12/13/2023
cs.CVcs.AI
diffusion-flowtransformer-attention

No confident code implementation found for this paper.

Abstract

Text-to-image diffusion models have demonstrated unprecedented capabilities for flexible and realistic image synthesis. Nevertheless, these models rely on a time-consuming sampling procedure, which has motivated attempts to reduce their latency. When improving efficiency, researchers often use the original diffusion model to train an additional network designed specifically for fast image generation. In contrast, our approach seeks to reduce latency directly, without any retraining, fine-tuning, or knowledge distillation. In particular, we find the repeated calculation of attention maps to be costly yet redundant, and instead suggest reusing them during sampling. Our specific reuse strategies are based on ODE theory, which implies that the later a map is reused, the smaller the distortion in the final image. We empirically compare our reuse strategies with few-step sampling procedures of comparable latency, finding that reuse generates images that are closer to those produced by the original high-latency diffusion model.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hunter2023fast,
  title  = {Fast Sampling Through The Reuse Of Attention Maps In Diffusion Models},
  author = {Rosco Hunter and Łukasz Dudziak and Mohamed S. Abdelfattah and Abhinav Mehrotra and Sourav Bhattacharya and Hongkai Wen},
  year   = {2023},
  eprint = {2401.01008v4},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.01008v4}
}

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/2401.01008v4.svg)](https://codeofpaper.com/paper/2401.01008v4)

Discussion