FlexTok:将图像重采样为灵活长度的一维 Token 序列
FlexTok: Resampling Images into 1D Token Sequences of Flexible Length
AI总结:
FlexTok 提出将图像编码为可变长度的一维 Token 序列,结合 rectified flow 解码器和嵌套 dropout,在 ImageNet 上以更少 Token 实现 FID<2,并支持由粗到细的文本条件图像生成。
摘要:
图像 Token 化通过提供比原始像素更高效处理的压缩离散表示,推动了自回归图像生成的重大进展。传统方法采用二维网格 Token 化,而近期 TiTok 等方法表明,一维 Token 化可以通过消除网格冗余实现较高的生成质量。然而,这些方法通常使用固定数量的 Token,因此无法适应图像固有的复杂度。我们提出 FlexTok,一种将二维图像投影为可变长度、有序一维 Token 序列的 Token 化器。例如,一张 256x256 的图像可以被重采样为 1 到 256 个任意数量的离散 Token,以分层和语义的方式压缩其信息。通过训练一个 rectified flow 模型作为解码器并使用嵌套 dropout,FlexTok 无论选择的 Token 序列长度如何,都能产生合理的重建结果。我们在自回归生成设置中使用简单的 GPT 风格 Transformer 对该方法进行评估。在 ImageNet 上,该方法在 8 到 128 个 Token 范围内实现了 FID<2,优于 TiTok,并以远少于现有方法的 Token 数量达到了当前最优水平。我们进一步扩展该模型以支持文本条件图像生成,并考察 FlexTok 与传统二维 Token 化的关系。一个关键发现是,FlexTok 使下一 Token 预测能够以由粗到细的“视觉词汇”描述图像,且需要生成的 Token 数量取决于生成任务的复杂度。
英文摘要:
Image tokenization has enabled major advances in autoregressive image generation by providing compressed, discrete representations that are more efficient to process than raw pixels. While traditional approaches use 2D grid tokenization, recent methods like TiTok have shown that 1D tokenization can achieve high generation quality by eliminating grid redundancies. However, these methods typically use a fixed number of tokens and thus cannot adapt to an image's inherent complexity. We introduce FlexTok, a tokenizer that projects 2D images into variable-length, ordered 1D token sequences. For example, a 256x256 image can be resampled into anywhere from 1 to 256 discrete tokens, hierarchically and semantically compressing its information. By training a rectified flow model as the decoder and using nested dropout, FlexTok produces plausible reconstructions regardless of the chosen token sequence length. We evaluate our approach in an autoregressive generation setting using a simple GPT-style Transformer. On ImageNet, this approach achieves an FID<2 across 8 to 128 tokens, outperforming TiTok and matching state-of-the-art methods with far fewer tokens. We further extend the model to support to text-conditioned image generation and examine how FlexTok relates to traditional 2D tokenization. A key finding is that FlexTok enables next-token prediction to describe images in a coarse-to-fine "visual vocabulary", and that the number of tokens to generate depends on the complexity of the generation task.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。