🤖 AI Summary
Visual autoregressive (VAR) models face a quadratic computational complexity bottleneck in high-resolution image generation. This paper proposes a post-training acceleration method: a cache-based dynamic token pruning mechanism that leverages converged tokens from coarser scales to fill pruned positions at finer scales, enabling resolution-agnostic inference while preserving the linear autoregressive modeling structure. Key contributions include: (i) the first cache-driven token importance scoring scheme; (ii) a FlashAttention-optimized VAR architecture; and (iii) a zero-shot cross-resolution generation adaptation technique. On a single RTX 3090 GPU, our method generates 2K-resolution images in just 1.5 seconds (2.7× speedup), with only 15 GB VRAM usage and negligible PSNR degradation (<0.1 dB). Moreover, it supports zero-shot super-resolution without fine-tuning.
📝 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$ imes$ 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.