Token Pruning for In-Context Generation in Diffusion Transformers

Junqing Lin, Xingyu Zheng, Pei Cheng, Bin Fu, Jingwei Sun +1 more
2/2/2026
cs.CV
diffusion-flowtransformer-attentionquantization-pruning

No confident code implementation found for this paper.

Abstract

In-context generation significantly enhances Diffusion Transformers (DiTs) by enabling controllable image-to-image generation through reference examples. However, the resulting input concatenation drastically increases sequence length, creating a substantial computational bottleneck.

Show full abstract

Existing token reduction techniques, primarily tailored for text-to-image synthesis, fall short in this paradigm as they apply uniform reduction strategies, overlooking the inherent role asymmetry between reference contexts and target latents across spatial, temporal, and functional dimensions. To bridge this gap, we introduce ToPi, a training-free token pruning framework tailored for in-context generation in DiTs. Specifically, ToPi utilizes offline calibration-driven sensitivity analysis to identify pivotal attention layers, serving as a robust proxy for redundancy estimation. Leveraging these layers, we derive a novel influence metric to quantify the contribution of each context token for selective pruning, coupled with a temporal update strategy that adapts to the evolving diffusion trajectory. Empirical evaluations demonstrate that ToPi can achieve over 30\% speedup in inference while maintaining structural fidelity and visual consistency across complex image generation tasks.

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{lin2026token,
  title  = {Token Pruning for In-Context Generation in Diffusion Transformers},
  author = {Junqing Lin and Xingyu Zheng and Pei Cheng and Bin Fu and Jingwei Sun and Guangzhong Sun},
  year   = {2026},
  eprint = {2602.01609},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.01609v1}
}

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

Discussion