Training-Free Hidden-State Refinement for Flow-Matching Image Generators
Yuanyi Yan1, Xinzhe Rao1, Canyu Shen2, Yang Chen1, Yunlu Chen3, Meng Tang4, Teng Long5, Vincent Tao Hu1
- 1Huazhong University of Science and Technology
- 2Tongji University
- 3King Abdullah University of Science and Technology
- 4University of California, Merced
- 5University of Amsterdam
Accepted at AAAI 2027

Abstract
We study how to spend additional inference-time computation inside a frozen flow-matching image denoiser, without changing its weights or outer sampler. The framework repeats selected transformer layers and exposes independent controls over token scope, layer depth, sampling progress, loop count, and prediction-space guidance. Across Scale-RAE and RAEv2 generators, the method improves prompt alignment and image-quality metrics while offering useful quality–latency trade-offs.
Key Results
+0.1110
GenEval
0.4622 → 0.5732 with Dense Loop Guidance on DiT2.4B
+0.0312
DPG-Bench
0.7727 → 0.8039 with Dense Loop Guidance on DiT2.4B
13.79%
Lower latency
Sparse versus Dense Token Loop on DiT9.8B
0
Training updates
Weights, conditioning, autoencoder, and sampler stay frozen
Method

Dense and Sparse Token Loop
Repeat each layer in a transformer-layer window for every token, or focus repeated computation on a subset while retaining full-token attention context.
Sampling-Progress Gating
Activate internal loops only during chosen denoising calls; the strongest shared setting concentrates them in the early half of sampling.
Layer Range and Loop Budget
Choose where repeated updates occur and distribute a total loop strength across a controllable number of inner evaluations.
Loop Guidance
Combine ordinary and looped vector-field predictions, using their difference as a prediction-space correction direction.
Results
The tables follow the revised manuscript. Quality scores average seeds 42, 43, and 44 for DiT2.4B and the 615M proxy. DiT9.8B uses seed 42. GenEval uses GPU evaluation for DiT2.4B and the proxy, and the original CPU evaluation for DiT9.8B. Batch-1 generation-call time includes text forward passes and all denoising with GPU synchronization. It excludes loading, tokenization, image decoding, and file writing. Measurements use two H100s for DiT9.8B and one for each other model.
Direct looping across three RAE-based generators
| Model | Method | GenEval ↑ | DPG-Bench ↑ | ImageReward ↑ | Time (s/image) ↓ |
|---|---|---|---|---|---|
| Scale-RAE DiT2.4B | w/o Loop | 0.4622 | 0.7727 | 0.1649 | 1.2719 |
| Dense Token Loop (Ours) | 0.5582 | 0.8023 | 0.5182 | 2.1331 | |
| Sparse Token Loop (Ours) | 0.5426 | 0.7981 | 0.4756 | 1.9043 | |
| Scale-RAE DiT9.8B | w/o Loop | 0.5321 | 0.8003 | 0.4609 | 1.5609 |
| Dense Token Loop (Ours) | 0.5977 | 0.8178 | 0.7211 | 2.6177 | |
| Sparse Token Loop (Ours) | 0.5857 | 0.8206 | 0.6365 | 2.2566 | |
| RAEv2 SigLIP2-B proxy (615M) | w/o Loop | 0.3599 | 0.7220 | -0.2635 | 0.8184 |
| Dense Token Loop (Ours) | 0.3759 | 0.7290 | -0.1804 | 1.1273 | |
| Sparse Token Loop (Ours) | 0.3653 | 0.7260 | -0.2160 | 1.2203 |
Loop Guidance improves both primary metrics
| Model | Loop Guidance | GenEval | DPG-Bench | Time (s/image) |
|---|---|---|---|---|
| Scale-RAE DiT2.4B | Dense (g = 2.8) | 0.4622 → 0.5732 | 0.7727 → 0.8039 | 1.2719 → 3.2343 |
| Scale-RAE DiT9.8B | Dense (g = 6.0) | 0.5321 → 0.6432 | 0.8003 → 0.8264 | 1.5609 → 3.9644 |
| RAEv2 SigLIP2-B proxy (615M) | Dense (g = 9.0) | 0.3599 → 0.4384 | 0.7220 → 0.7456 | 0.8184 → 1.5187 |
| RAEv2 SigLIP2-B proxy (615M) | Sparse (g = 6.0) | 0.3599 → 0.4126 | 0.7220 → 0.7394 | 0.8184 → 1.6151 |
Each cell shows the no-loop baseline followed by the loop-guided result. Loop Guidance times include both prediction paths.
Qualitative Comparisons
Prompt- and seed-matched samples on Scale-RAE Qwen7B / DiT9.8B compare the ordinary path, Dense Token Loop, and Loop Guidance. Expand either benchmark gallery to inspect the full set shown here.
GenEval gallery · 8 comparisons








DPG-Bench gallery · 9 comparisons









Scope and Limitations
Improvements are strongest for one- and two-subject prompts, where looping often repairs malformed structure and attribute binding. Aggregate GenEval2 does not improve, so hidden-state refinement alone does not solve difficult counting or crowded multi-object composition.
Reproducibility
The public repository contains the runtime, four backend adapters, exact presets, 2,418 ordered benchmark prompts, aggregate results, CPU-only tests, and generation, export, and aggregation utilities.
Browse the code and reproduction guide →Citation
@misc{yan2026trainingfree,
title={Training-Free Hidden-State Refinement for Flow-Matching Image Generators},
author={Yan, Yuanyi and Rao, Xinzhe and Shen, Canyu and Chen, Yang and Chen, Yunlu and Tang, Meng and Long, Teng and Hu, Vincent Tao},
year={2026},
eprint={2608.29160},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2608.29160}
}