ChatPaper.aiChatPaper

Uma Imagem Vale 32 Tokens para Reconstrução e Geração

An Image is Worth 32 Tokens for Reconstruction and Generation

June 11, 2024
Autores: Qihang Yu, Mark Weber, Xueqing Deng, Xiaohui Shen, Daniel Cremers, Liang-Chieh Chen
cs.AI

Resumo

Os avanços recentes em modelos generativos destacaram o papel crucial da tokenização de imagens na síntese eficiente de imagens de alta resolução. A tokenização, que transforma imagens em representações latentes, reduz as demandas computacionais em comparação com o processamento direto de pixels e aumenta a eficácia e eficiência do processo de geração. Métodos anteriores, como o VQGAN, geralmente utilizam grades latentes 2D com fatores de redução fixos. No entanto, essas tokenizações 2D enfrentam desafios ao gerenciar as redundâncias inerentes presentes nas imagens, onde regiões adjacentes frequentemente exibem similaridades. Para superar esse problema, introduzimos o Transformer-based 1-Dimensional Tokenizer (TiTok), uma abordagem inovadora que tokeniza imagens em sequências latentes 1D. O TiTok fornece uma representação latente mais compacta, resultando em representações substancialmente mais eficientes e eficazes do que as técnicas convencionais. Por exemplo, uma imagem de 256 x 256 x 3 pode ser reduzida para apenas 32 tokens discretos, uma redução significativa em relação aos 256 ou 1024 tokens obtidos por métodos anteriores. Apesar de sua natureza compacta, o TiTok alcança desempenho competitivo em relação às abordagens mais avançadas. Especificamente, utilizando a mesma estrutura de gerador, o TiTok atinge 1,97 gFID, superando significativamente a linha de base do MaskGIT em 4,21 no benchmark ImageNet 256 x 256. As vantagens do TiTok tornam-se ainda mais significativas quando se trata de resoluções mais altas. No benchmark ImageNet 512 x 512, o TiTok não apenas supera o modelo de difusão mais avançado DiT-XL/2 (gFID 2,74 vs. 3,04), mas também reduz os tokens de imagem em 64x, resultando em um processo de geração 410x mais rápido. Nossa variante de melhor desempenho pode superar significativamente o DiT-XL/2 (gFID 2,13 vs. 3,04) enquanto ainda gera amostras de alta qualidade 74x mais rápido.
English
Recent advancements in generative models have highlighted the crucial role of image tokenization in the efficient synthesis of high-resolution images. Tokenization, which transforms images into latent representations, reduces computational demands compared to directly processing pixels and enhances the effectiveness and efficiency of the generation process. Prior methods, such as VQGAN, typically utilize 2D latent grids with fixed downsampling factors. However, these 2D tokenizations face challenges in managing the inherent redundancies present in images, where adjacent regions frequently display similarities. To overcome this issue, we introduce Transformer-based 1-Dimensional Tokenizer (TiTok), an innovative approach that tokenizes images into 1D latent sequences. TiTok provides a more compact latent representation, yielding substantially more efficient and effective representations than conventional techniques. For example, a 256 x 256 x 3 image can be reduced to just 32 discrete tokens, a significant reduction from the 256 or 1024 tokens obtained by prior methods. Despite its compact nature, TiTok achieves competitive performance to state-of-the-art approaches. Specifically, using the same generator framework, TiTok attains 1.97 gFID, outperforming MaskGIT baseline significantly by 4.21 at ImageNet 256 x 256 benchmark. The advantages of TiTok become even more significant when it comes to higher resolution. At ImageNet 512 x 512 benchmark, TiTok not only outperforms state-of-the-art diffusion model DiT-XL/2 (gFID 2.74 vs. 3.04), but also reduces the image tokens by 64x, leading to 410x faster generation process. Our best-performing variant can significantly surpasses DiT-XL/2 (gFID 2.13 vs. 3.04) while still generating high-quality samples 74x faster.
PDF5921December 8, 2024