FlexVAR: Flexible Visual Autoregressive Modeling without Residual Prediction

Siyu Jiao, Gengwei Zhang, Yinlong Qian, Jiancheng Huang, Yao Zhao, Humphrey Shi, Lin Ma, Yunchao Wei, Zequn Jie

Introduction

Autoregressive (AR) models, which power Large Language Models, have recently been adapted for computer vision through the Visual Autoregressive (VAR) paradigm. Unlike traditional pixel-by-pixel AR models, VAR models predict images scale-by-scale, starting from low-resolution thumbnails and progressively adding detail. However, existing VAR models are constrained by a "rigid step design" because they predict residuals—the differences between scales. This dependency ties the model to its training configuration, limiting its ability to generate images at arbitrary resolutions or adjust inference steps for better quality.

Methods: From Residuals to Ground-Truth Prediction

FlexVAR addresses these limitations by replacing residual prediction with direct Ground-Truth (GT) prediction at every scale. This shift ensures that every intermediate stage of the generation process results in a semantically coherent, albeit lower-resolution, image.

Comparison between traditional VAR (residual modeling) and FlexVAR (image modeling).

To enable this flexibility, the authors introduced three primary technical innovations:

  1. Scalable VQVAE Tokenizer: A new tokenizer trained with multi-scale constraints to maintain reconstruction fidelity across varying resolutions.
  2. Scalable 2D Positional Embeddings: Learnable queries initialized with sin-cosine weights that can be dynamically upsampled or downsampled to match any resolution or aspect ratio at inference time.
  3. Scale-Agnostic Step Sampling: During training, the model randomly samples between 6 and 10 steps and various scale sizes, teaching it to perceive visual data at any granularity.

Key Insights

The transition from modeling residuals to modeling images provides several advantages:

  • Semantic Coherence: Predicting actual image features (GT) rather than mathematical biases (residuals) makes the learning process more intuitive and ensures intermediate steps are plausible images.
  • Zero-Shot Versatility: By decoupling the model from a fixed grid, FlexVAR exhibits emergent flexibility. A model trained on 256x256 images can generate panoramic or high-resolution images (e.g., 512x512) simply by adjusting positional embeddings.
  • Dynamic Inference: Users can optimize for speed with fewer steps or for quality with more steps without needing to retrain the model.

Key Results

FlexVAR demonstrates state-of-the-art performance across multiple benchmarks. The FlexVAR-d24 (1.0B parameter) model achieved a 2.08 FID on ImageNet 256x256, surpassing both the original VAR and leading diffusion models like DiT.

FlexVAR's ability to generate images across diverse resolutions and aspect ratios.

Furthermore, in zero-shot evaluations on ImageNet 512x512, FlexVAR achieved a competitive 4.43 FID, outperforming many models specifically trained for that resolution. The model also excels in multi-task scenarios, performing in-painting, out-painting, and image refinement without any additional fine-tuning.

Limitations and Future Work

While FlexVAR breaks the rigid grid of traditional VAR, it faces a "Resolution Ceiling." When generating images at significantly higher resolutions than those seen during training (e.g., 3x scaling), artifacts like wavy textures can appear. This is likely due to the homogeneity of the ImageNet dataset. Future research will focus on training FlexVAR on more diverse, high-resolution datasets to further push the boundaries of zero-shot synthesis.

Summary updated

BibTeX
@inproceedings{jiao2025flexvar,
  author = {Siyu Jiao and Gengwei Zhang and Yinlong Qian and Jiancheng Huang and Yao Zhao and Humphrey Shi and Lin Ma and Yunchao Wei and ZEQUN JIE},
  title = {{FlexVAR: Flexible Visual Autoregressive Modeling without Residual Prediction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=1qKvZX4qnp},
}
Figure