Manuscript Offprint

arXiv:2610.34782

ToDoPro: Faster and Better Reference-Based Generation: Early Token Reduction via Downsampled Self-Probing

Caiyi Sun, Yujing Sun, Siu-Ming Yiu

ABSTRACT

Recent generic reference-based image generation models natively support multiple conditions by concatenating all reference image and text tokens into a joint sequence processed by a single Diffusion Transformer (DiT). However, this versatile paradigm comes at an efficiency cost: accommodating multiple references leads to a token explosion, incurring massive O(N2)\mathcal{O}(N^{2}) computational complexity. Most acceleration methods operate inside the DiT, showing limited capability in reducing spatial redundancy and failing to alleviate peak VRAM. While some pre-model token reduction alternatives exist, they inevitably introduce external models. This raises a question: Is it possible to achieve acceleration and memory savings while preserving compatibility with in-model techniques and requiring no additional parameters? In this work, we realize this goal by proposing the early Token reduction via Downsampled self-Probing (ToDoPro). By executing a few denoising steps on spatially 2×2\times downsampled reference images, this cheap probing stage utilizes the DiT model itself to effectively and efficiently extract reference token importance. Using the probed importance, we apply a hierarchical reduction before the main denoising stage: we completely discard low-importance tokens, substitute mid-importance tokens with their downsampled counterparts to cheaply preserve global context, and keep high-importance tokens. Experiments across three base models and two benchmarks demonstrate that our early reduction accelerates inference significantly and mitigates peak GPU memory. Furthermore, we can improve generation quality by safely filtering out noisy, uninformative reference tokens, enabling the model to concentrate its limited attention capacity on genuinely useful tokens. The code will be released at https://github.com/scy639/ToDoPro

1 INTRODUCTION

Reference images

Figure

The man in Image 1 is in the background center, the woman in Image 2 is on the left, the woman in Image 3 is on the right, and the tortoise in Image 4 is in the foreground. They are gathered around a campfire in a snowy village.

Ours

Baseline

3.3 × speedup

Missing object

Figure

The chef from image 2 and the mechanic from image 3 are standing in front of the white sports car from image 4, with the statue from image 1 in the background. The style of the image is the same as in image 5.

3.8 × speedup

Wrong shapes

Figure 1: Compared to base model FLUX.2-klein-4B, our method reduces inference latency while improving generation quality.

∗^{*}Corresponding author.

Reference-based image generation and editing have fundamentally transformed visual synthesis, moving beyond pure text prompts to multimodal control. By allowing multiple reference inputs, these models achieve greater controllability, driving increasing demand in domains such as advertising and design. However, incorporating multiple reference images massively expands the token sequence length. Due to the O(N2)\mathcal{O}(N^{2}) nature of attention, this token explosion significantly increases both the latency and peak VRAM, limiting the number of references and resolutions that can be practically supported. The token explosion also degrades the generation quality due to: 1) Attention interference: some irrelevant reference tokens inevitably attract anomalous attention, interfering with the generation process; 2) Attention dilution: The explosion in the number of tokens leads to a massive denominator in the attention Softmax, diluting weights of truly important tokens.

Despite growing works on efficient AI, a satisfying solution for generic reference-based generation is still missing. Most token reduction methods operate inside the DiT, pruning or merging tokens only after the full sequence has already entered the model. Therefore, they fail to reduce peak VRAM, which typically occurs at the earliest attention layers before reduction takes place. Some methods can reduce tokens before the main model, but they either degrade performance noticeably [5], limiting their practicality. Thus, to reduce peak memory and maintain compatibility with most DiT acceleration methods, we target an early reduction approach, meaning the token reduction is performed before the main denoising such that the entire main denoising process uses the reduced token sequence.

One straightforward early reduction method is to use an external model to identify unimportant regions [65], which introduces extra parameters and lacks alignment with the generator's actual demands. Another method is to utilize internal features, such as attention maps, to estimate token importance. Yet, attention patterns for token importance remain unexplored in reference-based image generation, and insights from adjacent fields like ViTs/VLMs and text-to-image (T2I) are inapplicable to our task due to fundamental differences: Unlike VLMs, where visual tokens mainly provide high-level semantics, our task relies heavily on fine-grained, low-level reference details; T2I acceleration focuses on cross-timestep temporal redundancy rather than spatial token redundancy.

Figure

DiT

Feature cache,

In-model reduction,

Efficient attention,

...

(a). Existing in-model acceleration methods

Figure

DiT

Figure

DiT

(b). Ours

Figure 2: (a) Most existing acceleration methods operate inside the DiT during the main denoising stage. (b) ToDoPro reduces reference tokens before the main denoising stage begins. A probing stage on downsampled references cheaply extracts token importance, guiding token preservation / low-resolution substitution / discarding. The compressed reference images then enter the main denoising stage, slashing end-to-end latency and activation VRAM while remaining compatible with in-model methods in (a).

Thus, we firstly perform an in-depth analysis of attention, yielding two key observations: First, the total attention that generative and prompt tokens pay to a reference token, termed the reference utilization score, correlates well with its actual importance, thus serving as an effective proxy. Second, although some unimportant reference tokens inevitably exhibit anomalous attention scores, these abnormal tokens are stochastic and vary across layers. Furthermore, a single layer is usually biased because different layers may have different functions and focuses. Computing the mean utilization score across layers smooths out the bias and instantaneous noise observed in any individual layer, ensuring meaningless tokens are accurately identified, and yielding a robust importance estimation. This reveals a pathway to address degradation: reducing the number of uninformative tokens mitigates attention dilution and interference, and averaging across layers further mitigates interference by identifying unimportant tokens more accurately.

However, extracting attention maps during main denoising loop cannot prevent the VRAM spike and impairs compatibility with in-model acceleration methods, contradicting the goal of early reduction. Thus, we propose our early token reduction via spatial-temporal downsampled self-probing, which identifies unimportant tokens in a cheap probing denoising stage and prunes or replaces them prior to the main denoising. By executing a temporally downsampled, few-step denoising on spa-tially 2×2 \times downsampled images, this probing stage cheaply approximates attention of full-resolution loop. Then, we adopt different policies for each 2×22 \times 2 block of full-resolution reference tokens, guided by importance score of its corresponding downsampled reference token: High-importance blocks remain intact (preserving all 4 tokens), whereas low-importance blocks are completely discarded. To prevent quality drops from losing broader mid-importance context at high pruning rates, we introduce an intermediate level, replacing mid-importance blocks with the corresponding downsampled reference token instead of completely discarding them, cheaply capturing global context.

This early reduction yields three major benefits: (1) Because tokens are reduced before the entire main denoising stage, computational savings apply to every timestep and layer, slashing FLOPs significantly and mitigating peak VRAM. (2) It is inherently orthogonal, complementary with existing in-model acceleration techniques (e.g., feature caching and in-model token reduction). (3) The self-probing design utilizes the generator itself, naturally ensuring optimal alignment with the model's actual demands while avoiding external models.

More importantly, our method does not sacrifice performance for efficiency; rather, it comprehensively enhances generation quality. By discarding low-importance tokens, our method mitigates attention interference and dilution issues, allowing the model to better concentrate its limited attention capacity on prompt and generative tokens and genuinely informative reference tokens, ultimately improving overall generation quality.

Our key contributions are threefold: (1) We present the first in-depth analysis of attention in generic reference-based diffusion models. This analysis uncovers two key observations regarding reference utilization, and layer-wise bias and noise, establishing a reliable proxy for reference token importance. (2) Guided by these insights, we propose a training-free, early token reduction framework, which is inherently compatible with the existing ecosystem of in-model acceleration. (3) Experiments across three base models and two benchmarks show that our method delivers up to 3×3 \times mean speedups, cuts peak activation VRAM by up to 50%, and consistently improves generation quality.

References (74)