SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.03069 · 2024

TokenFlow: Unified Image Tokenizer for Multimodal Understanding and Generation

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 20 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
ByteFlow-AI/TokenFlow canonical 5 of 15
ruohaoguo/avis canonical 0 of 5
FunctionStatusWhere it lives
center_crop_arr Ran ByteFlow-AI/TokenFlow/tokenflow/dataset/augmentation.py
code served (permissive licence) · get_code("1712a07966b542ee")
exists Ran ByteFlow-AI/TokenFlow/tokenflow/tokenizer/discriminator.py
code served (permissive licence) · get_code("aa5486a3650902d8")
hinge_d_loss Ran ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_loss.py
code served (permissive licence) · get_code("22a83df891d750c6")
leaky_relu Ran ByteFlow-AI/TokenFlow/tokenflow/tokenizer/discriminator.py
code served (permissive licence) · get_code("c8ec5333f4bcb71f")
nonlinearity Ran ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_model.py
code served (permissive licence) · get_code("3137073275f8c21a")
batch_dice_loss Not yet run ruohaoguo/avis/avism/modeling/avism_matcher.py
code served (permissive licence) · get_code("bc2cb481a75c370d")
batch_sigmoid_ce_loss Not yet run ruohaoguo/avis/avism/modeling/avism_matcher.py
code served (permissive licence) · get_code("1edd24985036b0bf")
build_coco Not yet run ByteFlow-AI/TokenFlow/tokenflow/dataset/coco.py
code served (permissive licence) · get_code("a5dc3fcd09ebc843")
build_imagenet Not yet run ByteFlow-AI/TokenFlow/tokenflow/dataset/imagenet.py
code served (permissive licence) · get_code("5cceaa9d0edbce06")
build_model Not yet run ByteFlow-AI/TokenFlow/tokenflow/tokenizer/clip/model.py
code served (permissive licence) · get_code("beae755c2ed7e35a")
build_openimage Not yet run ByteFlow-AI/TokenFlow/tokenflow/dataset/openimage.py
code served (permissive licence) · get_code("0a65aaf586d4f90b")
calculate_uncertainty Not yet run ruohaoguo/avis/avism/modeling/avism_criterion.py
code served (permissive licence) · get_code("2dcb8123d89bb1ff")
clip_model Not yet run ByteFlow-AI/TokenFlow/tokenflow/tokenizer/clip/model.py
code served (permissive licence) · get_code("3980a12a0d103b4f")
copy_new_embedding Not yet run ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_model.py
code served (permissive licence) · get_code("797e47600ed8da5f")
dice_loss Not yet run ruohaoguo/avis/avism/modeling/avism_criterion.py
code served (permissive licence) · get_code("89f75e54ff128be0")
drop_scale Not yet run ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_model.py
code served (permissive licence) · get_code("f3dad8208b724c43")
non_saturating_d_loss Not yet run ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_loss.py
code served (permissive licence) · get_code("dd2278aa669b6313")
random_crop_arr Not yet run ByteFlow-AI/TokenFlow/tokenflow/dataset/augmentation.py
code served (permissive licence) · get_code("980fb099f82d8b84")
sigmoid_ce_loss Not yet run ruohaoguo/avis/avism/modeling/avism_criterion.py
code served (permissive licence) · get_code("d0c61e8dba511aa3")
vanilla_d_loss Not yet run ByteFlow-AI/TokenFlow/tokenflow/tokenizer/vq_loss.py
code served (permissive licence) · get_code("519cb60c0e3fbcb2")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2412.03069")
get_code_for_paper("2412.03069")
have("2412.03069")

Connect an agent — have() is free.