Test-time Prompt Refinement for Text-to-Image Models
Abstract
Text-to-image (T2I) generation models have made significant strides but still struggle with prompt sensitivity: even minor changes in prompt wording can yield inconsistent or inaccurate outputs. To address this challenge, we introduce a closed-loop, test-time prompt refinement framework that requires no additional training of the underlying T2I model, termed TIR. In our approach, each generation step is followed by a refinement step, where a pretrained multimodal large language model (MLLM) analyzes the output image and the user's prompt. The MLLM detects misalignments (e.g., missing objects, incorrect attributes) and produces a refined and physically grounded prompt for the next round of image generation. By iteratively refining the prompt and verifying alignment between the prompt and the image, TIR corrects errors, mirroring the iterative refinement process of human artists. We demonstrate that this closed-loop strategy improves alignment and visual coherence across multiple benchmark datasets, all while maintaining plug-and-play integration with black-box T2I models. Code is available at https://github.com/hafeezkhan909/Test-time-Image-Refinement.
Empirical ResultsBrowse all benchmarks →
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| GenEval | Flux w/ TIR | Overall Score | 71.27+6.41 vs baseline | Image Generation · test-time · method=TIRSource quoteL196: \quad w/ TIR │ 49.00 │ 71.25 │ 98.75 │ 80.81 │ 47.00 │ 80.85 │ 71.27 (\textbf{\textcolor{darkgreen}{+6.41}}) |
| GenEval | DALL-E 3 w/ TIR | Overall Score | 68.04+3.18 vs baseline | Image Generation · test-time · method=TIRSource quoteL198: \quad w/ TIR │ 45.00 │ 60.00 │ 96.25 │ 82.83 │ 38.00 │ 86.17 │ 68.04 (\textbf{\textcolor{darkgreen}{+7.67}}) |
Reported baseline / comparator measurements (2)
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| GenEval | Flux baseline | Overall Score | 64.86 | Image GenerationSource quoteL195: Flux~\cite{flux2024} │ 19.00 │ 68.75 │ 100.00 │ 75.76 │ 48.00 │ 77.66 │ 64.86 |
| GenEval | DALL-E 3 baseline | Overall Score | 60.37 | Image GenerationSource quoteL197: DALL-E 3~\cite{dalle3} │ 34.00 │ 48.75 │ 96.25 │ 77.78 │ 31.00 │ 74.47 │ 60.37 |
BibTeX
@misc{khan2025test,
author = {Mohammed Abdul Hafeez Khan and Yash Jain and Siddhartha Bhattacharyya and Vibhav Vineet},
title = {{Test-time Prompt Refinement for Text-to-Image Models}},
year = {2025},
eprint = {2507.22076},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2507.22076},
}Ask Althea to put this paper to the test.
Loading related content...