Abstract
Modern image generation models rely on discrete token representations, creating a bottleneck between computational efficiency and visual fidelity. We present TexTok (Text-Conditioned Image Tokenization), a novel framework that leverages natural language as a semantic prior during the compression stage. By offloading high-level conceptual information to text captions, TexTok allows image tokens to focus on fine-grained visual details. Our approach achieves state-of-the-art reconstruction quality and enables a 93.5x inference speedup in diffusion-based generation while maintaining superior image quality.
Introduction
Diffusion Transformers (DiT) and similar generative models operate on compact tokenized representations of images. Current tokenizers, typically based on VQ-VAE architectures, face a strict trade-off: high-quality generation requires a large number of tokens, leading to significant computational costs. Conversely, reducing the token count to improve speed often results in the loss of critical fine-grained details, such as text, textures, and small object features. TexTok addresses this by incorporating text conditioning directly into the tokenization process, utilizing language to represent semantic "gist" and freeing visual tokens to capture intricate details.
Methods
The core innovation of TexTok is the integration of a frozen text encoder (e.g., T5) into the tokenization pipeline. The architecture utilizes a Vision Transformer (ViT) backbone for both the tokenizer (encoder) and detokenizer (decoder).
The process involves "semantic offloading," where text tokens provide high-level context ("what" is in the image), allowing learnable image tokens to specialize in the "how it looks" aspect. During training, the model learns to reconstruct the original image by combining these complementary information streams. In the generation phase, a Diffusion Transformer predicts the small set of image tokens, which are then decoded alongside the text prompt to produce high-resolution outputs.
Results
Evaluation on ImageNet at 256×256 and 512×512 resolutions demonstrates the efficacy of TexTok. Using Gemini v1.5 Flash to generate detailed training captions, the model significantly outperforms baseline tokenizers across all token budgets.
Key quantitative results include a 48.1% improvement in reconstruction FID on ImageNet-512. Most notably, TexTok enables high-quality generation in the "low-token" regime (e.g., 32 or 64 tokens), where standard models fail. This efficiency translates to a 93.5x speedup over original DiT models while achieving a record-breaking FID of 1.46 on ImageNet-256. Qualitatively, TexTok excels at preserving small anatomical features and rendering legible text within generated scenes, areas where traditional compression methods typically struggle.
Conclusion
TexTok demonstrates that language-guided compression is a powerful paradigm for efficient image generation. By treating text as a rich semantic prior, we can drastically reduce the token budget required for high-fidelity synthesis. Future work will explore extending this approach to video tokenization and utilizing more advanced large language models for even deeper semantic guidance.
Summary updated