Variable-Length Tokenization via Learnable Global Merging for Diffusion Transformers
Abstract
Lay Summary
Many image generation systems rely on a tokenizer, which converts images into compact learned tokens that the generation model can process efficiently. The tokenizer’s compression level largely determines the efficiency of the generation model, but increasing compression usually comes at the cost of quality — for example, making the output look blurry. Variable-length tokenizers aim to provide more flexibility by letting a single system use fewer tokens when efficiency matters and more tokens when quality matters. However, the common approach of simply discarding tokens can make the short and long versions inconsistent for the generation model. To address this, the proposed method learns to merge related tokens into a smaller representation while keeping their relationships more consistent across different lengths. Experiments show that this approach helps preserve image quality while giving diffusion-based image generators more flexible control over computation. The result makes adjustable-cost image generation more practical, letting one model serve applications with very different speed and quality needs.