Multimodal Promptable Token Merging for Diffusion Models
Vision Transformers (ViTs) have become a cornerstone of modern computer vision, particularly in generative diffusion models. However, their computational cost scales quadratically with the number of input tokens, creating a significant "token tax" that limits inference speed. While previous techniques like Token Merging (ToMe) attempted to mitigate this by combining similar tokens, they often rely solely on visual similarity. This "blind" approach can lead to the fusion of semantically distinct regions—such as a white cat and white snow—resulting in a loss of critical detail.
Multimodal Promptable Token Merging (MPTM) addresses this by using the user's prompt as a semantic anchor to guide the merging process, ensuring that task-relevant information is preserved while redundant background data is compressed.
The MPTM Framework
The core innovation of MPTM is the shift from raw feature similarity to prompt-induced similarity. Instead of evaluating tokens in isolation, MPTM projects them into a space defined by the multimodal prompt (text, audio, etc.).
- Multimodal Prompt Fusion: Prompts from various sources are encoded and fused into a unified latent representation.
- Prompt-induced Similarity: Image tokens are evaluated based on their proximity to this multimodal prompt. This ensures that tokens representing the "subject" of the prompt are prioritized for preservation.
- Bipartite Soft Matching: MPTM utilizes an efficient matching algorithm to group tokens, but the matching scores are derived from the prompt-induced space rather than raw visual features.
- $\tau$-Threshold Unmerging: To maintain the high-resolution requirements of diffusion models, MPTM introduces a threshold-based unmerging step. This reduces error propagation during the iterative denoising process by selectively restoring tokens when necessary.
Experimental Evaluation
MPTM was evaluated across several benchmarks, including ImageNet-1k for generation, LVIS and COCO for object detection, and AudioCaps for multimodal tasks.
Key Results:
- Efficiency Gains: MPTM achieved up to a 2.9x increase in throughput in multimodal diffusion models without sacrificing output quality.
- Superior Generative Quality: In text-to-image tasks, MPTM maintained higher FID and CLIP scores at a 60% reduction ratio than previous state-of-the-art methods could achieve at only 50%.
- Enhanced Object Detection: When integrated into the DiffusionDet architecture, MPTM improved detection accuracy by 2.3% AP on the LVIS dataset, demonstrating that semantic-aware merging benefits dense prediction tasks.
- Qualitative Detail: Visual comparisons show that MPTM successfully preserves fine details—such as the intricate patterns on a bird's feathers—that standard merging techniques often blur or eliminate at high compression rates.
Conclusion and Future Directions
MPTM demonstrates that prompts are not just inputs for generation but powerful filters for model optimization. By aligning token reduction with user intent, MPTM achieves a superior balance between speed and accuracy. While some architectures currently require retraining to fully leverage MPTM, its success in "training-free" generative scenarios suggests broad applicability. Future work may extend this prompt-aware compression to video diffusion models, where the computational demands are even more extreme.
Summary updated