Fast Inference of Visual Autoregressive Model with Adjacency-Adaptive Dynamical Draft Trees
Haodong Lei, Hongsong Wang, Xin Geng, Liang Wang, Pan Zhou
TL;DR
This work tackles the slow inference of visual autoregressive models by adapting speculative decoding to the spatially heterogeneous nature of images. It introduces ADT-Tree, an adjacency-adaptive dynamical draft-tree framework that initializes draft trees from adjacent tokens and then dynamically adjusts depth and width based on observed acceptance rates, balancing computation and accuracy. Two-phase design—Adjacent Initialization and Bisectional Dynamic Adaptation—enables deeper trees in simple regions and wider trees in complex ones, achieving up to 3.13× speedups (MSCOCO2017) and 3.05× (PartiPrompts) while preserving image quality, and it can integrate with relaxed sampling approaches like LANTERN. The approach is evaluated on large text-conditioned image-generation benchmarks, showing robust acceleration with minimal quality loss and offering a practical, plug-and-play acceleration for visual AR models.
Abstract
Autoregressive (AR) image models achieve diffusion-level quality but suffer from sequential inference, requiring approximately 2,000 steps for a 576x576 image. Speculative decoding with draft trees accelerates LLMs yet underperforms on visual AR models due to spatially varying token prediction difficulty. We identify a key obstacle in applying speculative decoding to visual AR models: inconsistent acceptance rates across draft trees due to varying prediction difficulties in different image regions. We propose Adjacency-Adaptive Dynamical Draft Trees (ADT-Tree), an adjacency-adaptive dynamic draft tree that dynamically adjusts draft tree depth and width by leveraging adjacent token states and prior acceptance rates. ADT-Tree initializes via horizontal adjacency, then refines depth/width via bisectional adaptation, yielding deeper trees in simple regions and wider trees in complex ones. The empirical evaluations on MS-COCO 2017 and PartiPrompts demonstrate that ADT-Tree achieves speedups of 3.13xand 3.05x, respectively. Moreover, it integrates seamlessly with relaxed sampling methods such as LANTERN, enabling further acceleration. Code is available at https://github.com/Haodong-Lei-Ray/ADT-Tree.
