iFSQ: Improving FSQ for Image Generation with 1 Line of Code
Bin Lin, Zongjian Li, Yuwei Niu, Kaixiong Gong, Yunyang Ge, Yunlong Lin, Mingzhe Zheng, JianWei Zhang, Miles Yang, Zhao Zhong, Liefeng Bo, Li Yuan
TL;DR
This work addresses the fragmentation between autoregressive (AR) and diffusion image generation by introducing iFSQ, a distribution-aware variant of Finite Scalar Quantization that transforms the latent space into a uniform prior with a simple one-line activation change $y = 2.0 \cdot \sigma(1.6 x) - 1$. iFSQ enables a fair unified tokenizer to benchmark AR and diffusion under identical reconstruction constraints, revealing a sweet spot near $4$ bits per dimension and contrasting scaling: AR offers rapid early convergence while diffusion can achieve a higher performance ceiling with enough compute. The authors extend Representation Alignment to autoregressive models, producing LlamaGen-REPA, which accelerates the emergence of high-level semantics by aligning intermediate layers at roughly one-third of the model depth. Overall, the work provides a practical, plug-and-play tokenizer that unifies discrete and continuous representations and offers actionable insights for model choice, scaling, and alignment in image generation.
Abstract
The field of image generation is currently bifurcated into autoregressive (AR) models operating on discrete tokens and diffusion models utilizing continuous latents. This divide, rooted in the distinction between VQ-VAEs and VAEs, hinders unified modeling and fair benchmarking. Finite Scalar Quantization (FSQ) offers a theoretical bridge, yet vanilla FSQ suffers from a critical flaw: its equal-interval quantization can cause activation collapse. This mismatch forces a trade-off between reconstruction fidelity and information efficiency. In this work, we resolve this dilemma by simply replacing the activation function in original FSQ with a distribution-matching mapping to enforce a uniform prior. Termed iFSQ, this simple strategy requires just one line of code yet mathematically guarantees both optimal bin utilization and reconstruction precision. Leveraging iFSQ as a controlled benchmark, we uncover two key insights: (1) The optimal equilibrium between discrete and continuous representations lies at approximately 4 bits per dimension. (2) Under identical reconstruction constraints, AR models exhibit rapid initial convergence, whereas diffusion models achieve a superior performance ceiling, suggesting that strict sequential ordering may limit the upper bounds of generation quality. Finally, we extend our analysis by adapting Representation Alignment (REPA) to AR models, yielding LlamaGen-REPA. Codes is available at https://github.com/Tencent-Hunyuan/iFSQ
