Autoregressive (AR) image generators are powerful in principle but inflexible in practice: training with a fixed raster-scan order hardcodes a single factorization of the image distribution into the model, leaving it unable to inpaint, outpaint, or edit at inference time. Existing solutions, including the modern discrete-diffusion family, train from scratch on a mixture of token orderings, paying roughly 3x the compute of standard raster-scan training; discrete diffusion further sacrifices compatibility with the AR inference ecosystem (KV caching, vLLM) by construction. We argue that this cost is unnecessary. A pretrained raster-scan AR model has already learned the joint distribution over image tokens; what it lacks is not knowledge but the ability to express that knowledge through non-sequential conditional pathways. We propose a recipe for adapting pretrained raster-scan models into any-order generators using two components: future-aware positional embeddings that resolve a target-position identifiability problem at negligible overhead, and an ordering curriculum that traces a stable optimization path from the pretrained solution to a good any-order basin. Applied to four base models across two architectures and two scales (LlamaGen-L/XL, RAR-L/XL), the recipe substantially outperforms MaskGIT on ImageNet inpainting (FID 6.21 vs. 10.44) and outpainting, is competitive with MAR-L, trades a 1.2-1.9 increase in class-conditional FID for this flexibility, and costs 13-33% additional compute beyond pretraining, while leaving the standard AR inference stack untouched. Inpainting, outpainting, and editing, our results suggest, need not be added to autoregressive image models. They can be unlocked from the ones that exist. Code is available at https://github.com/Ordered-AR/unlockedadaptation.
Figures & tables
Figure 1: A single autoregressive image model, adapted from a pretrained raster-scan generator, performs inpainting (left), region-conditioned editing (center), and outpainting (right) without task-specific training, sampler modification, or auxiliary networks. The “Pretrained (raster)” column shows the same LlamaGen-L [ 1 ] model from which our model is adapted, prompted to perform the same tasks under the natural raster-scan generation procedure. Failure modes in this column reflect the structural incapacity of fixed-order AR models to condition on non-contiguous context, not weak performance at a shared task. After adaptation (“Ours”), the same weights produce coherent results across all three capabilities, varying only in which tokens are observed at inference time. Quantitative comparisons against MaskGIT [ 2 ] on inpainting and outpainting are reported in Section 4 .
Type
Model
#Para.
FID ↓
IS ↑
Precision ↑
Recall ↑
Steps
Diffusion
ADM [ 40 ]
554M
4.59
186.70
0.82
0.523
250
LDM-4 [ 43 ]
400M
3.60
247.7
–
–
250
DiT-XL [ 37 ]
675M
2.27
278.2
0.83
0.57
250
Bi-directional AR
MaskGIT-re [ 2 ]
227M
6.80
214.0
0.82
0.51
8
TiTok-S-128 [ 44 ]
287M
1.97
281.8
–
–
64
Causal AR
VAR [ 4 ]
600M
2.57
302.6
0.83
0.56
10
Table 1: Class-conditional generation on ImageNet 256×256 . Our adapted models (rows marked Ours ) trade a 1.17 – 1.93 FID increase relative to the pretrained raster-scan baselines they are adapted from for full any-order capability (Section 4.3 ). ∗ Reported by the original paper.
Figure 2: Class-conditional generation after adaptation, further accelerated by parallel decoding. Top: pretrained LlamaGen-L (raster). Middle: our adapted model with sequential decoding. Bottom: our adapted model with parallel decoding (64 steps, 4× fewer forward passes).
Model
Total epochs
Pretrained + adapted ↓
Random init ↓
LlamaGen-L
400 ( 300+100 )
4.24
5.60
LlamaGen-XL
125 ( 100+25 )
3.91
4.81
Table 2: Value of pretraining: FID at matched total epochs with the same architecture and curriculum.
Figure 5
Inpainting
Outpainting
Method
FID ↓
IS ↑
Prec. ↑
Rec. ↑
FID ↓
IS ↑
Prec. ↑
Rec. ↑
MaskGIT (cosine)
10.44
116.2
0.680
0.575
12.17
107.0
0.664
0.631
MaskGIT (Halton)
7.82
123.5
0.581
0.575
7.91
119.1
0.691
0.612
MAR-L
6.63
134.2
0.696
0.598
6.86
127.2
0.736
0.649
Ours
6.21
157.0
0.710
0.598
5.84
159.4
0.720
0.637
Table 3: Inpainting and outpainting on ImageNet 256×256 , evaluated on 50,000 samples with TF-Inception. Inpainting uses center masks; outpainting extends a centered 128×128 crop to full resolution. Lower is better for FID; higher for IS, Precision, Recall.
Method
LPIPS ↓
PSNR ↑
SSIM ↑
MaskGIT (cosine)
0.234
19.20±3.60
0.484±0.21
MaskGIT (Halton)
0.196
18.20±3.50
0.452±0.23
MAR-L
0.174
20.15±4.60
0.550±0.20
Ours
0.125
24.65±3.34
0.682±0.17
Table 4: Reference-based completion metrics. LPIPS: random region covering 30 – 50% of 5,000 held-out images. PSNR/SSIM (mean ± std): generated region of the 50,000 center-mask inpainting examples.
Variant
FID ↓
IS ↑
Prec. ↑
Rec. ↑
No curriculum ( α=1 from step 0 )
5.86
191.27
0.78
0.51
Ours (linear curriculum)
4.24
231.62
0.83
0.52
Table 5: Effect of the ordering curriculum on LlamaGen-L. Adapting with α=1 from step zero (no curriculum) leaves the model in a partially adapted state across all metrics; the linear curriculum used in our main results recovers the gap.
Method
Train cost
Any-order
KV cache
vLLM
LlamaGen pretraining [ 1 ] (raster only)
1×
✗
✓
✓
RandAR [ 18 ] (from scratch)
3×
✓
✓
✗
RAR [ 5 ] (from scratch)
4×
✗
✓
✓
Discrete diffusion [ 2 ]
3×
✓
✗
✗
Ours (LlamaGen-XL + adaptation)
1.25×
✓
✓
✓
Table 6: Training and inference compatibility relative to standard AR pretraining. Our adaptation recipe achieves any-order generation at ≈1.25× the cost of standard pretraining (LlamaGen-XL), while preserving compatibility with the AR inference ecosystem.
Generation steps
576
192
128
64
FID ↓
3.91
4.12
4.81
5.03
Table 7: Parallel decoding on LlamaGen-XL: generation steps vs. class-conditional FID.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
LlamaGen-L
LlamaGen-XL
RAR-L
RAR-XL
Optimization
Optimizer
AdamW
AdamW
AdamW
AdamW
(β1,β2)
(0.9,0.95)
(0.9,0.95)
(0.9,0.95)
(0.9,0.95)
Weight decay
0.05
0.05
0.05
0.05
Base learning rate
1×10−4
1×10−4
5×10−5
5×10−5
Embedding-table LR multiplier
10×
10×
10×
10×
Appendix
Table 8: Adaptation hyperparameters by base model. Notation matches Section 3 .
Class-conditional generative models have emerged as accurate and robust classifiers, with diffusion models demonstrating clear advantages over other visual generative paradigms, including autoregressive (AR) models. In this work, we revisit visual AR-based generative classifiers and identify an important limitation of prior approaches: their reliance on a fixed token order, which imposes a restrictive inductive bias for image understanding. We observe that single-order predictions rely more on partial discriminative cues, while averaging over multiple token orders provides a more comprehensive signal. Based on this insight, we leverage recent any-order AR models to estimate order-marginalized predictions, unlocking the high classification potential of AR models. Our approach consistently outperforms diffusion-based classifiers across diverse image classification benchmarks, while being up to 25x more efficient. Compared to state-of-the-art self-supervised discriminative models, our method delivers competitive classification performance - a notable achievement for generative classifiers.
Large-scale autoregressive models have demonstrated remarkable capabilities in image generation. However, their sequential raster-scan decoding relies on strictly next-token prediction, making inference prohibitively expensive. Existing acceleration methods typically either introduce entirely new generation paradigms that necessitate costly pre-training from scratch, or enable parallel generation at the expense of a training-inference gap or altered prediction objectives. In this paper, we introduce FlashAR, a lightweight post-training adaptation framework that efficiently adapts a pre-trained raster-scan autoregressive model into a highly parallel generator based on two-way next-token prediction. Our key insight is that effective adaptation should minimize modifications to the pre-trained model's original training objective to preserve its learned prior. Accordingly, we retain the original AR head as a horizontal head for row-wise prediction and introduce a complementary, lightweight vertical head for column-wise prediction. To facilitate efficient adaptation, we branch the vertical head from an intermediate layer rather than the final layer, bypassing the inherent horizontal head bias. Moreover, since horizontal and vertical predictions capture complementary dependencies whose relative importance varies across target positions, we employ a learnable fusion gate to dynamically combine the two predictions at each position. To further reduce adaptation cost, we propose a two-stage adaptation pipeline: the vertical head is first initialized through adaptation from the pre-trained autoregressive model before jointly fine-tuned with backbone to adapt to the new decoding paradigm. Extensive experiments on LlamaGen and Emu3.5 show that FlashAR achieves up to a 22.9x speedup for 512x512 image generation through a lightweight post-training with merely 0.05% of the original training data.
Junkang Zhou, Yefei He, Feng Chen +2
Zhejiang University, China · University of Adelaide, Australia
Autoregressive image modeling relies on visual tokenizers to compress images into compact latent representations. We design an end-to-end training pipeline that jointly optimizes reconstruction and generation, enabling direct supervision from generation results to the tokenizer. This contrasts with prior two-stage approaches that train tokenizers and generative models separately. We further investigate leveraging vision foundation models to improve 1D tokenizers for autoregressive modeling. Our autoregressive generative model achieves strong empirical results, including a state-of-the-art FID score of 1.48 without guidance on ImageNet 256x256 generation.
Wenda Chu, Bingliang Zhang, Jiaqi Han +4
ByteDance Seed · California Institute of Technology · Stanford University