Een Afbeelding is 32 Tokens Waard voor Reconstructie en Generatie
An Image is Worth 32 Tokens for Reconstruction and Generation
June 11, 2024
Auteurs: Qihang Yu, Mark Weber, Xueqing Deng, Xiaohui Shen, Daniel Cremers, Liang-Chieh Chen
cs.AI
Samenvatting
Recente vooruitgang in generatieve modellen heeft de cruciale rol van beeldtokenisatie bij de efficiënte synthese van hoogwaardige afbeeldingen benadrukt. Tokenisatie, waarbij afbeeldingen worden omgezet in latente representaties, vermindert de rekenkundige eisen in vergelijking met het direct verwerken van pixels en verbetert de effectiviteit en efficiëntie van het generatieproces. Eerdere methoden, zoals VQGAN, maken doorgaans gebruik van 2D latente roosters met vaste downsamplingfactoren. Deze 2D-tokenisaties hebben echter moeite met het beheren van de inherente redundanties in afbeeldingen, waarbij aangrenzende gebieden vaak overeenkomsten vertonen. Om dit probleem te overwinnen, introduceren we de Transformer-based 1-Dimensional Tokenizer (TiTok), een innovatieve aanpak die afbeeldingen tokeniseert in 1D latente sequenties. TiTok biedt een compactere latente representatie, wat resulteert in aanzienlijk efficiëntere en effectievere representaties dan conventionele technieken. Zo kan een afbeelding van 256 x 256 x 3 worden gereduceerd tot slechts 32 discrete tokens, een aanzienlijke vermindering ten opzichte van de 256 of 1024 tokens die door eerdere methoden worden verkregen. Ondanks zijn compacte aard behaalt TiTok een competitieve prestaties ten opzichte van state-of-the-art benaderingen. Specifiek behaalt TiTok, met hetzelfde generatorframework, een gFID van 1.97, wat een significante verbetering is ten opzichte van de MaskGIT-baseline met 4.21 bij de ImageNet 256 x 256 benchmark. De voordelen van TiTok worden nog duidelijker bij hogere resoluties. Bij de ImageNet 512 x 512 benchmark overtreft TiTok niet alleen de state-of-the-art diffusiemodel DiT-XL/2 (gFID 2.74 vs. 3.04), maar reduceert het ook het aantal beeldtokens met 64x, wat leidt tot een 410x sneller generatieproces. Onze best presterende variant overtreft DiT-XL/2 aanzienlijk (gFID 2.13 vs. 3.04) terwijl het nog steeds hoogwaardige samples 74x sneller genereert.
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.