Skip to content
Cross-Attention Makes Inference Cumbersome in Text-to-Image Diffusion Models episode artwork

Apr 4, 2024 4 min

Cross-Attention Makes Inference Cumbersome in Text-to-Image Diffusion Models

from Tech Frontier

This study explores the role of cross-attention during inference in text-conditional diffusion models. We find that cross-attention outputs converge to a fixed point after few inference steps. Accordingly, the time point of convergence naturally divides the entire inference process into two stages: an initial semantics-planning stage, during which, the model relies on cross-attention to plan text-oriented visual semantics, and a subsequent fidelity-improving stage, during which the model tries to generate images from previously planned semantics. Surprisingly, ignoring text conditions in the fidelity-improving stage not only reduces computation complexity, but also maintains model performance. This yields a simple and training-free method called TGATE for efficient generation, which caches the cross-attention output once it converges and keeps it fixed during the remaining inference steps. Our empirical study on the MS-COCO validation set confirms its effectiveness. The source code of TGATE is available at https://github.com/HaozheLiu-ST/T-GATE.

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Cross-Attention Makes Inference Cumbersome in Text-to-Image Diffusion Models

0:00 4:01

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Tech Frontier?

This episode is 4 minutes long.

When was this Tech Frontier episode published?

This episode was published on April 4, 2024.

Can I download this Tech Frontier episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.