Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decoding

Yao Teng, Han Shi, Xian Liu, Xuefei Ning, Guohao Dai, Yu Wang, Zhenguo Li, Xihui Liu

TL;DR

Auto-regressive text-to-image models deliver impressive generation quality but suffer from high latency due to sequential token-by-token decoding. This paper introduces Speculative Jacobi Decoding (SJD), a training-free, probabilistic parallel decoding algorithm that accelerates image generation by ~2x. By replacing deterministic convergence criteria with a probabilistic framework, SJD successfully brings parallel decoding to sampling-based generation without sacrificing visual quality or diversity.

What Problem Does This Paper Address?

Auto-regressive (AR) models have shown massive promise in text-to-image generation (e.g., Lumina-mGPT, Anole, Emu3). However, generating a single high-resolution image requires predicting hundreds or thousands of tokens sequentially. This token-by-token paradigm results in high inference latency because the model must execute a full forward pass for every single token.

While parallel decoding methods like vanilla Jacobi decoding exist to accelerate AR models without extra training, they rely on a deterministic convergence criterion. This works well for greedy decoding (picking the single most likely token), but completely breaks down when applied to sampling-based decoding (like top-K sampling). Sampling-based decoding introduces randomness, which is absolutely vital for generating diverse, high-fidelity, and structurally varied images. Without it, AR image generators produce monotonous or low-quality results.

The importance of sampling-based decoding for visual quality and diversity compared to greedy decoding.

Methods

The authors propose Speculative Jacobi Decoding (SJD), which adapts the core mechanics of speculative sampling into a training-free parallel framework:

  1. Jacobi Window (Sliding Window): Instead of decoding the entire sequence at once, SJD operates on a fixed-size sliding window of draft tokens to optimize memory usage and speed.
  2. Probabilistic Verification: In a single forward pass, the model computes conditional probabilities for a sequence of draft tokens in parallel. SJD then scans these tokens from left to right, accepting or rejecting them based on a probabilistic threshold ratio between the current and previous iterations.
  3. Calibrated Resampling & Refinement: If a token is rejected, it is resampled using a calibrated distribution. Crucially, the remaining tokens in the window are not discarded; they are continuously refined in subsequent iterations, which drives the acceleration mechanism.
  4. Spatial Locality-Aware Token Initialization: Standard Jacobi decoding initializes draft tokens uniformly at random. SJD leverages the fact that adjacent pixels in 2D images share semantic and texture properties. It introduces strategies like repeating or sampling from the left or above adjacent tokens to accelerate convergence.
Overview of one iteration of Speculative Jacobi Decoding (SJD).

Datasets

The method was evaluated using the following standard image generation benchmarks:

  • MS-COCO 2017 Validation Set: Used to evaluate both generation speedups and visual quality metrics (FID and CLIP-Score).
  • Parti-prompts: Used to measure text-to-image alignment (CLIP-Score) and latency/step acceleration.

The algorithms were tested across multiple state-of-the-art AR models, including Lumina-mGPT (7B), Anole (7B), LlamaGen, and Emu3.

Key Insights and Ideas

  • Refinement is the Real Engine: The authors discovered that simply accepting or rejecting tokens isn't enough to achieve speedups. The true acceleration comes from refining unaccepted tokens—continuously resampling them across multiple forward passes until they converge. Deactivating this refinement drops the acceleration down to almost zero.
  • Spatial Priors Matter for Simple Patterns: Initializing tokens by copying their spatial neighbors (left or above) provides a massive boost when generating images with simple or repeating structures (like 2D logos), though it has a more marginal effect on highly complex scenes.
  • Resolution Synergy: SJD scales exceptionally well with image resolution. Higher resolutions (which mean longer token sequences) yield slightly better acceleration ratios (e.g., achieving 2.43x speedup on 1024x1024 images).

Key Results

  • ~2x Speedup: SJD consistently achieves roughly a 2x reduction in both inference steps and wall-clock latency across Lumina-mGPT and Anole models.
  • Zero Quality Degradation: Quantitative metrics show that visual quality remains intact. For instance, on MS-COCO with Lumina-mGPT, the baseline FID/CLIP-Score of 30.76/31.29 shifts negligibly to 30.85/31.35 with SJD.
  • Robust to Randomness: Unlike vanilla Jacobi decoding, which fails under high randomness, SJD remains highly stable and effective across various top-K sampling values (from K=10 to K=2000).
Figure 1: We propose Speculative Jacobi Decoding, a training-free multi-token prediction algorithm, to accelerate auto-regressive text-to-image generation by reducing the number of model forward passes (denoted as steps) during inference. We perform our algorithm on Lumina-mGPT, and the reduced steps are marked in red. The original steps are marked in black.

Limitations and Future Work

  • Artifact Propagation: In highly complex scenarios with intricate details, SJD can occasionally accept a continuous sequence of draft tokens that contain visual artifacts, as the pre-trained base model isn't always robust enough to catch these errors during parallel verification.
  • Untapped Potential of Fine-Tuning: Because SJD is entirely training-free, the base models are not inherently optimized for multi-token prediction. The authors suggest that fine-tuning AR models specifically for this task could unlock even higher acceleration ratios.
  • Extension to Video: Adapting SJD to video generation is a promising future direction due to the high temporal redundancy in video data, but it will require carefully designed candidate token initialization strategies.

Summary updated

BibTeX
@inproceedings{teng2025accelerating,
  author = {Yao Teng and Han Shi and Xian Liu and Xuefei Ning and Guohao Dai and Yu Wang and Zhenguo Li and Xihui Liu},
  title = {{Accelerating Auto-regressive Text-to-Image Generation with Training-free Speculative Jacobi Decoding}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=LZfjxvqw0N},
}
Figure