Attention-Driven Training-Free Efficiency Enhancement of Diffusion Models
Hongjie Wang, Difan Liu, Yan Kang, Yijun Li, Zhe Lin, Niraj K. Jha, Yuchen Liu
TL;DR
This work tackles the high computational cost of diffusion models by introducing AT-EDM, a training-free framework that prunes tokens in attention blocks at run-time using attention maps. The approach combines a fast token-pruning algorithm, G-WPR, with a similarity-based token recovery to preserve convolution compatibility, and a DSAP schedule to adapt pruning across denoising steps. Empirical results on SD-XL show substantial FLOPs reductions (up to 38.8%) and speed-ups (up to 1.53×) while maintaining near-full-model fidelity and text-image alignment (FID/CLIP). AT-EDM is complementary to existing efficiency methods and demonstrates strong performance gains without backbone retraining, offering practical impact for deploying diffusion models on constrained hardware.
Abstract
Diffusion Models (DMs) have exhibited superior performance in generating high-quality and diverse images. However, this exceptional performance comes at the cost of expensive architectural design, particularly due to the attention module heavily used in leading models. Existing works mainly adopt a retraining process to enhance DM efficiency. This is computationally expensive and not very scalable. To this end, we introduce the Attention-driven Training-free Efficient Diffusion Model (AT-EDM) framework that leverages attention maps to perform run-time pruning of redundant tokens, without the need for any retraining. Specifically, for single-denoising-step pruning, we develop a novel ranking algorithm, Generalized Weighted Page Rank (G-WPR), to identify redundant tokens, and a similarity-based recovery method to restore tokens for the convolution operation. In addition, we propose a Denoising-Steps-Aware Pruning (DSAP) approach to adjust the pruning budget across different denoising timesteps for better generation quality. Extensive evaluations show that AT-EDM performs favorably against prior art in terms of efficiency (e.g., 38.8% FLOPs saving and up to 1.53x speed-up over Stable Diffusion XL) while maintaining nearly the same FID and CLIP scores as the full model. Project webpage: https://atedm.github.io.
