Table of Contents
Fetching ...

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 addresses the scalability bottleneck of Visual Autoregressive models by pruning high-frequency tokens at large-scale steps and restoring pruned information through cached maps. It introduces Pivotal Token Selection to identify essential tokens via a DC-based high-frequency proxy and Cached Token Restoration to interpolate and reinsert pruned outputs using previous-scale caches. The approach yields substantial speedups (up to 2.7×) with minimal accuracy loss and enables zero-shot 2K image generation on a single 3090 GPU with modest memory (~15 GB). Demonstrated as a training-free, plug-and-play enhancement, FastVAR offers a practical route to scalable, high-resolution VAR-based image synthesis. Its results suggest meaningful impact for efficient high-resolution generation in VAR architectures and related token-based models.

Abstract

Visual Autoregressive (VAR) modeling has gained popularity for its shift towards next-scale prediction. However, existing VAR paradigms process the entire token map at each scale step, leading to the complexity and runtime scaling dramatically with image resolution. To address this challenge, we propose FastVAR, a post-training acceleration method for efficient resolution scaling with VARs. Our key finding is that the majority of latency arises from the large-scale step where most tokens have already converged. Leveraging this observation, we develop the cached token pruning strategy that only forwards pivotal tokens for scale-specific modeling while using cached tokens from previous scale steps to restore the pruned slots. This significantly reduces the number of forwarded tokens and improves the efficiency at larger resolutions. Experiments show the proposed FastVAR can further speedup FlashAttention-accelerated VAR by 2.7$\times$ with negligible performance drop of <1%. We further extend FastVAR to zero-shot generation of higher resolution images. In particular, FastVAR can generate one 2K image with 15GB memory footprints in 1.5s on a single NVIDIA 3090 GPU. Code is available at https://github.com/csguoh/FastVAR.

FastVAR: Linear Visual Autoregressive Modeling via Cached Token Pruning

TL;DR

FastVAR addresses the scalability bottleneck of Visual Autoregressive models by pruning high-frequency tokens at large-scale steps and restoring pruned information through cached maps. It introduces Pivotal Token Selection to identify essential tokens via a DC-based high-frequency proxy and Cached Token Restoration to interpolate and reinsert pruned outputs using previous-scale caches. The approach yields substantial speedups (up to 2.7×) with minimal accuracy loss and enables zero-shot 2K image generation on a single 3090 GPU with modest memory (~15 GB). Demonstrated as a training-free, plug-and-play enhancement, FastVAR offers a practical route to scalable, high-resolution VAR-based image synthesis. Its results suggest meaningful impact for efficient high-resolution generation in VAR architectures and related token-based models.

Abstract

Visual Autoregressive (VAR) modeling has gained popularity for its shift towards next-scale prediction. However, existing VAR paradigms process the entire token map at each scale step, leading to the complexity and runtime scaling dramatically with image resolution. To address this challenge, we propose FastVAR, a post-training acceleration method for efficient resolution scaling with VARs. Our key finding is that the majority of latency arises from the large-scale step where most tokens have already converged. Leveraging this observation, we develop the cached token pruning strategy that only forwards pivotal tokens for scale-specific modeling while using cached tokens from previous scale steps to restore the pruned slots. This significantly reduces the number of forwarded tokens and improves the efficiency at larger resolutions. Experiments show the proposed FastVAR can further speedup FlashAttention-accelerated VAR by 2.7 with negligible performance drop of <1%. We further extend FastVAR to zero-shot generation of higher resolution images. In particular, FastVAR can generate one 2K image with 15GB memory footprints in 1.5s on a single NVIDIA 3090 GPU. Code is available at https://github.com/csguoh/FastVAR.

Paper Structure

This paper contains 20 sections, 6 equations, 15 figures, 9 tables.

Figures (15)

  • Figure 1: Our FastVAR can generate one 2K image using one NVIDIA 3090 GPU, while existing baseline fails due to out of memory.
  • Figure 2: FastVAR exhibits promising resolution scalability, and can achieve noticeable speedup with negligible performance drop.
  • Figure 3: (a) We resize different $\Tilde{r}_k$ 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,\cdots, k\}$, and the column is queries of the $k$-th scale step.
  • Figure 4: (a) We keep the Structure Construction Stage as standard VAR and additionally store token maps at the $(K-N)$-th step as the cache. Then the Texture Filling Stage applies FastVAR to process only pivotal tokens for fast inference. (b) For Attention or FFN layers using FastVAR, we first employ the Pivotal Token Selection (PTS) for token reduction. After the model forward, we develop the Cached Token Restoration (CTR) to restore the original token numbers using the caches from the previous scale step.
  • Figure 5: Qualitative comparison between the original baselines and our proposed FastVAR on 1024$\times$1024 image generation. Our FastVAR achieves significant speedups, e.g., 2.7$\times$ on Infinity han2024infinity, while keeping high-quality results similar to the original model.
  • ...and 10 more figures