Manuscript Offprint

arXiv:2608.29160

Training-Free Hidden-State Refinement for Flow-Matching Image Generators

Yuanyi Yan, Xinzhe Rao, Canyu Shen, Yang Chen, Yunlu Chen, Meng Tang, Teng Long, Vincent Tao Hu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Yuanyi Yan 1^{1}, Xinzhe Rao 1^{1}, Canyu Shen 2^{2}, Yang Chen 1^{1}

Yunlu Chen 3^{3}, Meng Tang 4^{4}, Teng Long 5^{5}, Vincent Tao Hu 1^{1}

1^{1}Huazhong University of Science and Technology

2^{2}Tongji University

3^{3}King Abdullah University of Science and Technology

4^{4}University of California, Merced

5^{5}University of Amsterdam

Project Page

Figure

Dense Token Loop

Sparse Token Loop

w/o Loop

label: sampling steps/loop count

Figure

Time per image (s) ↓\downarrow

Time per image (s) ↓\downarrow

Figure 1: Looping inside the denoiser produces cleaner images and better quality–time trade-offs. Left: matched Scale-RAE prompts compare the no-loop baseline, Dense Token Loop, and Loop Guidance. Right: Dense and Sparse Token Loop improve GenEval and DPG-Bench over no-loop baselines with more outer sampling steps, at comparable or lower generation time; point labels denote sampling steps over loop count.

Abstract

We aim to improve frozen flow-matching image generators by adding inference computation inside the denoiser, without changing model weights or the outer sampler. Existing generators usually spend extra test-time computation by increasing the number of sampling steps, which repeatedly evaluates the entire denoiser and couples quality gains to sampler cost. A key challenge is how to use extra computation inside a frozen transformer denoiser: the method must decide which tokens, layers, and sampling times receive repeated updates while preserving the original generation pipeline. We introduce a training-free looping framework that repeatedly applies selected transformer layers inside each denoising call. Dense and Sparse Token Loop vary the token scope; Sampling-Progress Gating and the loop layer range specify when and where looping is active; loop count and strength control the repeated updates; and Loop Guidance combines ordinary and looped vector-field predictions. Across two Scale-RAE model scales, loop variants improve primary and auxiliary quality metrics with competitive quality-efficiency trade-offs. Loop Guidance further improves both primary metrics across all three tested models; on Scale-RAE DiT2.4B, it raises GenEval from 0.4471 to 0.5691 and DPG-Bench from 0.7656 to 0.8053. Code will be released.

Introduction

Flow matching has become a central formulation for modern generative modeling because it learns a time-dependent vector field that transports a simple base distribution to data

(Lipman et al. 2023; Liu, Gong, and Liu 2023). Its progress in image generation has come from a broad design space, including noise schedules and preconditioning (Karras et al. 2022), transformer backbones (Peebles and Xie 2023; Ma et al. 2024; Esser et al. 2024), guidance mechanisms (Dhariwal and Nichol 2021; Ho and Salimans 2022; Hu et al. 2023a; Karras et al. 2024), inference-time scaling (Ma et al. 2025), and latent representations, from latent diffusion autoencoders to RAEs (Rombach et al. 2022; Tong et al. 2026; Singh et al. 2026). These advances raise a practical question: beyond changing the sampler, architecture, or training objective, can a frozen flow-matching generator benefit from additional computation inside its denoiser?

In parallel, looped transformer computation has re-emerged as a way to spend extra computation through repeated hidden-state updates. Universal and looped transformers study recurrence as a mechanism for iterative refinement, algorithm learning, and latent reasoning (Dehghani et al. 2019; Giannou et al. 2023; Yang et al. 2024; Saunshi et al. 2025). More recent training-free looped transformers suggest that pretrained pre-norm transformers can sometimes benefit from repeated layer evaluations without updating weights (Chen et al. 2026). However, it remains unclear how such hidden-state looping should be used inside flow-matching image generators, where denoising time, layer depth, token routing, and guidance all interact.

Our training-free inference-time approach repeatedly applies selected transformer layers inside a frozen flow-matching denoiser, while leaving the model weights, text conditioning, latent autoencoder, and outer sampler unchanged. We organize the design around four questions: what is recomputed, when looping is active, where it is applied, and how its effect is controlled. Dense Token Loop repeats transformer-layer computation for all tokens, whereas Sparse Token Loop limits repetition to a subset of tokens to reduce computation. Sampling-Progress Gating specifies the active interval along sampling progress, and the loop layer range specifies where looping occurs. Loop count and strength control the repeated updates, while Loop Guidance determines how ordinary and looped vector-field predictions are combined.

Figure 1 presents prompt-matched qualitative comparisons and quality–efficiency trade-offs. The examples suggest that our approach primarily corrects subject-level structure: malformed or incomplete shapes become more coherent, spurious parts are suppressed, and object identities, attributes, and simple counts are represented more faithfully. The efficiency plots further show that internal layer looping reaches higher GenEval and DPG-Bench scores than increasing only the number of outer sampling steps, at comparable or lower generation time.

Our contributions are:

• We formulate internal transformer-layer looping as a training-free mechanism for allocating additional inference compute within frozen flow-matching image generators.

• We organize internal loop design by what, when, and where computation is repeated: Dense and Sparse Token Loop operate on all or selected tokens, Sampling-Progress Gating sets the active sampling interval, and the loop layer range sets the repeated layers.

• We introduce Loop Guidance as an orthogonal prediction-space mechanism that controls how the loop-induced correction is applied by combining ordinary and looped vector-field predictions.

• We evaluate and analyze the loop design on Scale-RAE and RAEv2 through ablations of loop count, layer range, sampling-progress interval, sparsifier design, and guidance.

References (53)