XQ-GAN: An Open-source Image Tokenization Framework for Autoregressive Generation

Xiang Li, Kai Qiu, Hao Chen, Jason Kuen, Jiuxiang Gu +3 more
12/2/2024
cs.CV

No official code found. Best implementation: lxa9867/ImageFolder (307 stars, last commit 2025-04-25).

Abstract

Image tokenizers play a critical role in shaping the performance of subsequent generative models. Since the introduction of VQ-GAN, discrete image tokenization has undergone remarkable advancements. Improvements in architecture, quantization techniques, and training recipes have significantly enhanced both image reconstruction and the downstream generation quality. In this paper, we present XQ-GAN, an image tokenization framework designed for both image reconstruction and generation tasks. Our framework integrates state-of-the-art quantization techniques, including vector quantization (VQ), residual quantization (RQ), multi-scale residual quantization (MSVQ), product quantization (PQ), lookup-free quantization (LFQ), and binary spherical quantization (BSQ), within a highly flexible and customizable training environment. On the standard ImageNet 256x256 benchmark, our released model achieves an rFID of 0.64, significantly surpassing MAGVIT-v2 (0.9 rFID) and VAR (0.9 rFID). Furthermore, we demonstrate that using XQ-GAN as a tokenizer improves gFID metrics alongside rFID. For instance, with the same VAR architecture, XQ-GAN+VAR achieves a gFID of 2.6, outperforming VAR's 3.3 gFID by a notable margin. To support further research, we provide pre-trained weights of different image tokenizers for the community to directly train the subsequent generative models on it or fine-tune for specialized tasks.

View on arXivView PDF

Code Implementations(1)

lxa9867/ImageFolderCommunity100%

High-performance Image Tokenizers for VAR and AR

3077PythonSep 29, 20241 years agoNOASSERTION
autoregressive-modelsconditional-generationdiffusion-modelsefficient-tokenizerimage-generation+5 more

Similar Papers

Cite this paper

@article{li2024xqgan,
  title  = {XQ-GAN: An Open-source Image Tokenization Framework for Autoregressive Generation},
  author = {Xiang Li and Kai Qiu and Hao Chen and Jason Kuen and Jiuxiang Gu and Jindong Wang and Zhe Lin and Bhiksha Raj},
  year   = {2024},
  eprint = {2412.01762},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.01762v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.01762.svg)](https://codeofpaper.com/paper/2412.01762)

Discussion