Papers › TokenFlow: Unified Image Tokenizer for Multimodal Understanding and Generation

TokenFlow: Unified Image Tokenizer for Multimodal Understanding and Generation

4 Dec 2024CVPR 2025 1arXiv:2412.03069archive 2025-07-28

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

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2412.03069")

Code

Syntology Ran 5 of 20 code samples harvested from 2 repositories linked to this paper; 15 have no recorded run. Of those that ran: 1 ran · violated contract; 4 ran · our draft was wrong.

By repository: official repository: 15 samples from 1 repository, 5 ran; community (archive-listed): 5 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ByteFlow-AI/TokenFlow officialmentioned on GitHubpytorchApache-2.0 report
ruohaoguo/avis mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

20 samples harvested; 5 ran; 0 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · violated contract
4ran · our draft was wrong
15unverified

Licence: 0 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

center_crop_arr ByteFlow-AI/TokenFlow/tokenflow/dataset/augmentation.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 1712a07966b542ee · report
exists ByteFlow-AI/TokenFlow/tokenflow/tokenizer/discriminator.py official repository ran · violated contract fingerprinted Apache-2.0 (permissive) · aa5486a3650902d8 · report
hinge_d_loss ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_loss.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 22a83df891d750c6 · report
leaky_relu ByteFlow-AI/TokenFlow/tokenflow/tokenizer/discriminator.py official repository ran · our draft was wrong Apache-2.0 (permissive) · c8ec5333f4bcb71f · report
nonlinearity ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_model.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 3137073275f8c21a · report
build_coco ByteFlow-AI/TokenFlow/tokenflow/dataset/coco.py official repository unverified Apache-2.0 (permissive) · a5dc3fcd09ebc843 · report
build_imagenet ByteFlow-AI/TokenFlow/tokenflow/dataset/imagenet.py official repository unverified Apache-2.0 (permissive) · 5cceaa9d0edbce06 · report
build_model ByteFlow-AI/TokenFlow/tokenflow/tokenizer/clip/model.py official repository unverified Apache-2.0 (permissive) · beae755c2ed7e35a · report
build_openimage ByteFlow-AI/TokenFlow/tokenflow/dataset/openimage.py official repository unverified Apache-2.0 (permissive) · 0a65aaf586d4f90b · report
clip_model ByteFlow-AI/TokenFlow/tokenflow/tokenizer/clip/model.py official repository unverified Apache-2.0 (permissive) · 3980a12a0d103b4f · report
copy_new_embedding ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_model.py official repository unverified Apache-2.0 (permissive) · 797e47600ed8da5f · report
drop_scale ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_model.py official repository unverified Apache-2.0 (permissive) · f3dad8208b724c43 · report
non_saturating_d_loss ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_loss.py official repository unverified Apache-2.0 (permissive) · dd2278aa669b6313 · report
random_crop_arr ByteFlow-AI/TokenFlow/tokenflow/dataset/augmentation.py official repository unverified Apache-2.0 (permissive) · 980fb099f82d8b84 · report
vanilla_d_loss ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_loss.py official repository unverified Apache-2.0 (permissive) · 519cb60c0e3fbcb2 · report
batch_dice_loss ruohaoguo/avis/avism/modeling/avism_matcher.py community (archive-listed) unverified MIT (permissive) · bc2cb481a75c370d · report
batch_sigmoid_ce_loss ruohaoguo/avis/avism/modeling/avism_matcher.py community (archive-listed) unverified MIT (permissive) · 1edd24985036b0bf · report
calculate_uncertainty ruohaoguo/avis/avism/modeling/avism_criterion.py community (archive-listed) unverified MIT (permissive) · 2dcb8123d89bb1ff · report
dice_loss ruohaoguo/avis/avism/modeling/avism_criterion.py community (archive-listed) unverified MIT (permissive) · 89f75e54ff128be0 · report
sigmoid_ce_loss ruohaoguo/avis/avism/modeling/avism_criterion.py community (archive-listed) unverified MIT (permissive) · d0c61e8dba511aa3 · report

Tasks

Image GenerationImage ReconstructionQuantization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections