FlashAR: Efficient Post-Training Acceleration for Autoregressive Image Generation

Junkang Zhou, Yefei He, Feng Chen, Weijie Wang, Bohan ZhuangarXiv 2026

TL;DR

FlashAR is a lightweight post-training adaptation framework that accelerates pre-trained autoregressive (AR) image generation models by up to 22.9× while using just 0.05% of the original training data. By introducing a complementary vertical prediction head branched from an intermediate layer and a learnable fusion gate, it successfully transitions slow sequential raster-scan decoding into highly parallel diagonal-step decoding without sacrificing generative quality.

What Problem Does This Paper Address?

Autoregressive models excel at high-fidelity image generation by treating images as a sequence of discrete tokens. However, standard decoding follows a strict "raster-scan" order—generating tokens sequentially from left to right, top to bottom. For an image with $H \times W$ tokens, this requires $HW$ sequential forward passes, creating a massive computational bottleneck that fails to leverage the parallel processing capabilities of modern GPUs.

Existing acceleration methods typically fall into two camps, both with major drawbacks:

  1. New Generation Paradigms (e.g., VAR, NAR): These change token prediction orders or use multi-scale generation, but they require expensive pre-training from scratch and cannot reuse existing pre-trained models.
  2. Post-Training Adaptation (e.g., Discrete Diffusion): These enable parallel generation but alter the original prediction objective, introducing a training-inference gap that can degrade image quality.

FlashAR answers a critical question: Can we transform a pre-trained raster-AR model into a highly parallel generator while inheriting its powerful generative capabilities and keeping post-training overhead minimal?

Methods

FlashAR reformulates image generation using a diagonal-step factorization approach. Instead of predicting token-by-token, it predicts all tokens along a diagonal slice ($p + q = t$) concurrently, reducing the number of sequential iterations from quadratic ($HW$) to linear ($H + W - 1$).

Overview of the FlashAR framework

To adapt a standard pre-trained AR model to this paradigm efficiently, FlashAR introduces three key components:

  1. Dual-Head Intermediate Branching: The original AR head is retained as a horizontal head for row-wise prediction. A new, lightweight vertical head is introduced for column-wise prediction. Crucially, instead of attaching this vertical head to the final layer, the authors branch it from an intermediate upper layer to bypass the strong horizontal bias inherent to the final layers of raster-scan models.
  2. Learnable Fusion Gate: Natural images are anisotropic (e.g., a pixel along a sharp horizontal edge depends more heavily on its vertical predecessor). Rather than statically averaging the horizontal and vertical predictions, FlashAR employs a learnable MLP-based fusion gate to dynamically weight and combine the two directional predictions at each target position.
  3. Two-Stage Adaptation Pipeline: To minimize adaptation costs, Stage 1 freezes the pre-trained backbone and trains only the new vertical head and gating mechanism (Branch Initialization). Stage 2 unfreezes the entire network for Joint Full Fine-Tuning to harmonize the orthogonal spatial representations.
  4. Hardware-Aware Inference: To translate this theoretical parallelism into wall-clock speedups, the authors integrate FlexAttention to dynamically compile highly sparse 2D proximity masks on the fly, eliminating memory fragmentation and maximizing GPU utilization alongside batched KV-cache updates.

Datasets

The authors evaluated FlashAR across two distinct setups:

  • ImageNet ($256 \times 256$): Used for class-conditional image generation benchmarks across multiple scales of the LlamaGen backbone (B, L, XL, XXL).
  • OpenGPT-4o-Image & ShareGPT-4o-Image: A curated compact corpus of approximately 80K text-image pairs used to adapt the massive 34-billion-parameter Emu3.5-Image backbone for text-to-image synthesis at $512 \times 512$ resolution.

Key Insights and Ideas

  • Top-Layer Specialization Bias: Linear probing experiments revealed that the deepest layers of a pre-trained raster-scan model become highly specialized to the left-to-right next-token objective, losing general semantic abstractions. Branching the vertical pathway from an intermediate layer allows it to access richer, less biased representations.
Analysis of linear probing and top-layer specialization
  • The Danger of Static Averaging: Directly averaging horizontal and vertical logits acts as a low-pass filter in probability space when heads yield conflicting distributions, leading to blurred textures. The learnable fusion gate mitigates this by dynamically arbitrating between the two signals based on spatial context.
  • Preserving Causal Priors: Minimizing modifications to the pre-trained model's original objective is key. By keeping the horizontal head intact and using a stabilized training schedule, the model safely retains its massive pre-trained generative prior while learning parallel decoding from a tiny fraction of data.

Key Results

  • Massive Speedups: On the 34B Emu3.5-Image model, FlashAR reduces the number of serial decoding steps from 1024 to 63, achieving a 22.9× wall-clock speedup for $512 \times 512$ image generation.
  • State-of-the-Art Efficiency: FlashAR-L achieves an Inception Score (IS) of 289.0 on ImageNet, surpassing NAR-L (263.9)—a model trained entirely from scratch—despite FlashAR requiring only 25 epochs of lightweight post-training.
  • Quality Retention: Compared to the original Emu3.5 baseline, FlashAR's overall GenEval score drops by a negligible 0.19 points (80.48 to 80.29) and actually improves on specific sub-metrics like Colors (+1.59) and Position (+7.00). It significantly outperforms alternative post-training methods like BlockDiffusion in both fidelity and convergence speed.
Ablation studies showing convergence and component impact

Limitations and Future Work

  • Empirical Branching Depth: Determining the optimal intermediate layer ($m$) for branching currently relies on empirical search rather than an automated or learned selection process.
  • Intra-Diagonal Conditional Independence: Generating tokens along the same anti-diagonal in strict parallel enforces conditional independence during that step, depriving tokens of intra-diagonal mutual perception.
  • Future Directions: The authors plan to explore automated architecture search for branch placement, introduce lightweight intra-step communication (e.g., iterative refinement) to restore mutual perception, and extend this diagonal-parallel paradigm to 3D spatio-temporal tasks like video autoregressive decoding.

Summary updated

BibTeX
@misc{zhou2026flashar,
  author = {Junkang Zhou and Yefei He and Feng Chen and Weijie Wang and Bohan Zhuang},
  title = {{FlashAR: Efficient Post-Training Acceleration for Autoregressive Image Generation}},
  year = {2026},
  eprint = {2605.09430},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.09430},
}
Figure