TokenFlow: Unified Image Tokenizer for Multimodal Understanding and Generation

Liao Qu, Huichao Zhang, Yiheng Liu, Xu Wang, Yi Jiang, Yiming Gao, Hu Ye, Daniel K. Du, Zehuan Yuan, Xinglong Wu

arXiv:2412.03069 · 2026-07-27 공개 · arXiv · PDF

image-generation llava multimodal-understanding vector-quantization sdxl semantic-features tokenflow unified-image-tokenizer

Abstract

We present TokenFlow, a novel unified image tokenizer that bridges the long-standing gap between multimodal understanding and generation. Prior research attempt to employ a single reconstruction-targeted Vector Quantization (VQ) encoder for unifying these two tasks. We observe that understanding and generation require fundamentally different granularities of visual information. This leads to a critical trade-off, particularly compromising performance in multimodal understanding tasks. TokenFlow addresses this challenge through an innovative dual-codebook architecture that decouples semantic and pixel-level feature learning while maintaining their alignment via a shared mapping mechanism. This design enables direct access to both high-level semantic representations crucial for understanding tasks and fine-grained visual features essential for generation through shared indices. Our extensive experiments demonstrate TokenFlow’s superiority across multiple dimensions. Leveraging TokenFlow, we demonstrate for the first time that discrete visual input can surpass LLaVA-1.5 13B in understanding performance, achieving a 7.2% average improvement. For image reconstruction, we achieve a strong FID score of 0.63 at 384×384 resolution. Moreover, TokenFlow establishes state-of-the-art performance in autoregressive image generation with a GenEval score of 0.55 at 256×256 resolution, achieving comparable results to SDXL. Our code and models are released at https://github.com/ByteFlow-Ai/TokenFlow.

한국어 요약

한 줄 요약

TokenFlow는 다중 모달 이해와 생성을 통합하는 이중 코드북 구조의 이미지 토크나이저로, 기존 VQ 기반 접근법의 한계를 극복한다.

핵심 기여도

핵심 아이디어

기존 VQ 기반 토크나이저는 재구성 최적화에 집중하여 의미적 표현력을 제한했다. TokenFlow는 이 문제를 해결하기 위해 의미적 인코더와 픽셀 인코더를 별도로 학습하면서 공유 인덱스를 통해 연결하는 이중 코드북 구조를 제안한다. 의미적 인코더는 CLIP에서 사전 학습된 가중치로 초기화되어 강력한 의미적 사전 정보를 제공하고, 픽셀 인코더는 세부 시각 정보를 포착한다. 이 두 인코더의 특징은 가중치 합산된 의미적 및 픽셀 수준 거리를 최소화하는 방식으로 양자화되어, 이해와 생성 모두에 활용 가능한 결합 표현 공간을 형성한다.

기술적 접근법

주요 결과

의의 및 한계

TokenFlow는 다중 모달 시스템에서 이해와 생성을 통합하는 데 중요한 발전을 이루었다. 이중 코드북 구조는 기존 단일 코드북 접근법의 한계를 극복하며, 의미적 표현력과 픽셀 수준 정밀도를 동시에 유지할 수 있다. 특히, CLIP 초기화와 MSVQ의 결합은 높은 성능과 효율성을 동시에 달성하는 데 기여했다. 그러나 코드북 크기가 증가할수록 생성 성능이 약간 저하되는 경향이 있어, 코드북 크기와 생성 복잡도 간의 균형이 필요하다는 한계가 있다.

실용적 활용

TokenFlow는 이미지-텍스트 통합 모델, 생성형 AI, 멀티모달 대화 시스템 등에 적용 가능하다. 특히, 생성 과정에서 샘플링 단계를 줄이며 빠른 추론이 필요한 산업 분야에서 유용할 것으로 기대된다.