Retrofitting Any-Order Generation into Pretrained AR Image Models for 13-33% Extra Compute
Fine-tuning adds inpainting and outpainting to pretrained raster-scan AR image models for 13-33% extra compute, beating MaskGIT at FID 6.21 vs. 10.44.
The standard assumption is that autoregressive image models and flexible editing are incompatible by design. Training fixes a single token ordering, so inpainting or outpainting has meant either a purpose-built masked model or an any-order method trained from scratch. The paper puts those from-scratch methods at roughly 3x the compute of standard raster-scan training, and discrete diffusion gives up the AR inference ecosystem, KV caching and vLLM included, by construction. This paper shows a pretrained raster-scan model can learn any-order generation with a short fine-tune instead.
A pretrained raster-scan AR model has already learned the joint distribution over image tokens. The raster ordering constrains how that knowledge gets expressed at inference time; the knowledge itself does not depend on it. The gap is one of routing: the model cannot condition on arbitrary visible tokens to predict arbitrary missing ones, because its positional machinery cannot identify which target slot it is filling when the order changes.
The adaptation recipe addresses this with two components. First, future-aware positional embeddings replace the standard raster-scan positions with a scheme that explicitly encodes where a token sits relative to the tokens still to come, resolving what the paper calls a target-position identifiability problem. Without this, any-order fine-tuning is trying to write to an address the model cannot read. Second, an ordering curriculum starts the fine-tuning close to the raster-scan solution and gradually widens the distribution of orderings seen during training, tracing a stable path toward an any-order basin instead of jumping directly to random permutations and destabilizing the pretrained weights.
Think of the curriculum as a trust-region argument applied to token ordering instead of parameter updates. The pretrained model is already at a good point in weight space. The goal is to expand what it can express without moving far from that point. The positional embedding fix is the prerequisite; the curriculum is the optimizer's guardrail.
Applied to four base models, LlamaGen-L, LlamaGen-XL, RAR-L, and RAR-XL, the adapted models beat MaskGIT on ImageNet inpainting with an FID of 6.21 against 10.44, match or exceed MAR-L on outpainting, and accept a 1.2 to 1.9 FID increase on standard class-conditional generation as the cost of flexibility. The adaptation costs 13 to 33% additional compute beyond the original pretraining run. Because the model stays autoregressive, the standard AR inference stack, including KV caching and vLLM, still applies. For teams maintaining AR image generation infrastructure, the takeaway is direct: editing and inpainting capabilities are already latent in your pretrained checkpoints, and a modest fine-tuning budget is enough to surface them.
We're thinking: This changes how practitioners should weigh the AR-versus-diffusion decision. We have watched teams pick discrete diffusion or masked generative models specifically because they wanted editing flexibility, and accept the retraining cost and the inference stack incompatibility as unavoidable. This work makes that tradeoff look like a false choice. If a raster-scan AR model's joint distribution already encodes what conditional generation in arbitrary orders needs, then much of the split between "generative models" and "editing models" comes from training objectives rather than from a capability boundary. The 1.2 to 1.9 FID penalty on class-conditional generation is real, and teams should measure it against their use case, but it is a smaller tax than rebuilding the inference stack from scratch.
Key takeaways:
- Future-aware positional embeddings fix a token-identity routing failure in raster-scan models, and an ordering curriculum stabilizes fine-tuning by starting near the pretrained solution and widening the ordering distribution gradually.
- Adapted models reach FID 6.21 on ImageNet inpainting versus MaskGIT's 10.44, at 13-33% additional compute over pretraining, with a 1.2-1.9 FID regression on standard class-conditional generation as the main caveat.
- Teams running pretrained AR image models who need inpainting or outpainting should evaluate this adaptation path before committing to a discrete-diffusion retrain or a masked-order model from scratch.
Source: Unlocking Any-Order Generation in Pretrained Autoregressive Image Models