FastVAR: Linear Visual Autoregressive Modeling via Cached Token Pruning

Hang Guo, Yawei Li, Taolin Zhang, Jiangshan Wang, Tao Dai, Shu-Tao Xia, Luca Benini

TL;DR

FastVAR is a training-free, plug-and-play acceleration method that overcomes the resolution-scaling bottleneck in Visual Autoregressive (VAR) models. By pruning redundant low-frequency tokens at large-scale steps and restoring them using early-scale caches, it delivers up to a 2.7$\times$ speedup with negligible performance loss, enabling zero-shot 2K image generation on a single consumer GPU.

What Problem Does This Paper Address?

While traditional autoregressive visual models generate images token-by-token (which is notoriously slow), Visual Autoregressive (VAR) modeling recently shifted the paradigm to next-scale prediction. This allows models to generate images in far fewer steps.

However, VAR models suffer from a major flaw: they must process the entire token map at every single scale step. As image resolution increases, the number of tokens grows quadratically ($O(n^2)$), causing the computational complexity of the attention layers to explode at an $O(n^4)$ rate. This super-linear scaling makes generating high-resolution images (such as 2K) prohibitively slow or completely impossible due to Out-Of-Memory (OOM) errors on standard consumer hardware.

Methods

To break this complexity wall, the authors introduce FastVAR, a post-training acceleration framework that implements cached token pruning.

The generation process is divided into two phases:

  1. Structure Construction Stage: Processes small-scale steps to establish the image's layout. This stage is kept entirely intact to preserve structural integrity. The output of the final layer here is saved as a cache.
  2. Texture Filling Stage: Processes large-scale steps where token pruning is applied using two novel components:
  3. Pivotal Token Selection (PTS): A frequency-based scoring mechanism. Because computing Fast Fourier Transforms (FFTs) inside transformer layers is expensive, PTS approximates high-frequency components directly in the spatial domain by subtracting the spatially global average pooled feature (the DC component) from the token map. Only the top-$K$ high-frequency "pivotal" tokens are forwarded.
  4. Cached Token Restoration (CTR): Pruning tokens breaks the 2D lattice structure required by subsequent layers. CTR restores the original token count by upsampling the token map cached from the Structure Construction stage and inserting the forwarded pivotal tokens back into their original slots.

Datasets

The authors evaluated FastVAR across several prominent benchmarks to validate both semantic consistency and perceptual quality:

  • GenEval: Used to measure high-level text-to-image semantic alignment.
  • MJHQ30K: Used to evaluate high-quality perceptual image generation.
  • ImageNet (256$\times$256): Used for class-conditional generation verification.
  • HPSv2.1 & ImageReward: Used as additional human-preference alignment benchmarks.

Key Insights and Ideas

The design of FastVAR hinges on three core observations made by analyzing pre-trained VAR models:

  • Large Scales are the Bottleneck but are Robust: Profiling revealed that the final two large-scale steps account for over 60% of total inference runtime. Crucially, these steps are highly resilient to token dropping compared to earlier steps.
  • Details Matter Late: As shown via Fourier analysis, early scale steps construct the low-frequency layout (the "sketch"), while large-scale steps primarily fill in high-frequency textures (the "details"). Once the layout converges, processing low-frequency tokens in later stages becomes redundant.
Figure 3. (a) We resize different ˜rk to the same size for better presentation. (b) Each curve represents the frequency characteristics of a certain-scale token map. (c) The row represents keys of scale steps {1, 2, · · · , k}, and the column is queries of the k-th scale step.
  • Cross-Scale Attention Sparsity: Visualizing attention maps revealed strong diagonal sparsity across scales. This means a token at a large scale strongly correlates with its exact spatial counterpart in previous, smaller scales—justifying the use of a simple spatial cache to fill in pruned token slots.

Key Results

FastVAR demonstrates exceptional efficiency gains with almost no impact on image quality:

  • Substantial Speedups: When integrated with FlashAttention, FastVAR accelerates the Infinity baseline by 2.7$\times$ and the HART baseline by 1.5$\times$, keeping the performance drop under 1%.
  • Memory Reduction: It reduces the GPU memory footprint by 22.2% (down to 14.7GB) for standard 1024$\times$1024 image generation.
  • Breaking the 2K Barrier: While standard VAR baselines crash due to OOM errors when attempting ultra-high resolutions, FastVAR successfully generates a 2K image in just 1.5 seconds using only 15GB of VRAM on a single NVIDIA 3090 GPU.
Figure 2. FastVAR exhibits promising resolution scalability, and can achieve noticeable speedup with negligible performance drop.

Limitations and Future Work

The authors note that FastVAR primarily targets large-scale steps, meaning its acceleration benefits are minimal for low-resolution image generation where small scales dominate.

For future work, they suggest exploring more fine-grained, layer-wise, or adaptive pruning ratios rather than relying on a manual progressive schedule. Additionally, exploring how FastVAR can complement other acceleration paradigms, such as network quantization, remains an open and promising direction.

Summary updated

BibTeX
@inproceedings{guo2025fastvar,
  author = {Hang Guo and Yawei Li and Taolin Zhang and Jiangshan Wang and Tao Dai and Shu-Tao Xia and Luca Benini},
  title = {{FastVAR: Linear Visual Autoregressive Modeling via Cached Token Pruning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure