Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

ToMA: Token Merge with Attention for Diffusion Models

About

Diffusion models excel in high-fidelity image generation but face scalability limits due to transformers' quadratic attention complexity. Plug-and-play token reduction methods like ToMeSD and ToFu reduce FLOPs by merging redundant tokens in generated images but rely on GPU-inefficient operations (e.g., sorting, scattered writes), introducing overheads that negate theoretical speedups when paired with optimized attention implementations (e.g., FlashAttention). To bridge this gap, we propose Token Merge with Attention (ToMA), an off-the-shelf method that redesigns token reduction for GPU-aligned efficiency, with three key contributions: 1) a reformulation of token merge as a submodular optimization problem to select diverse tokens; 2) merge/unmerge as an attention-like linear transformation via GPU-friendly matrix operations; and 3) exploiting latent locality and sequential redundancy (pattern reuse) to minimize overhead. ToMA reduces SDXL/Flux generation latency by 24%/23%, respectively (with DINO $\Delta < 0.07$), outperforming prior methods. This work bridges the gap between theoretical and practical efficiency for transformers in diffusion. Code available at https://github.com/WenboLuu/ToMA.

Wenbo Lu, Shaoyi Zheng, Yuxuan Xia, Shengjie Wang• 2025

Related benchmarks

TaskDatasetResultRank
Global EditAnyEdit Global Edit 1.0
PSNR19.79
10
Camera MoveAnyEdit Camera Move 1.0
PSNR21.99
10
Implicit ChangeAnyEdit Implicit Change 1.0
PSNR24.39
10
Local EditAnyEdit Local Edit 1.0
PSNR22.69
10
Showing 4 of 4 rows

Other info

Follow for update