Test-time Prompt Refinement for Text-to-Image Models

Mohammed Abdul Hafeez Khan, Yash Jain, Siddhartha Bhattacharyya, Vibhav VineetarXiv 2025 · DOI

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 →

BenchmarkMethodMetricScoreProtocol / Evidence
GenEvalFlux w/ TIROverall Score71.27+6.41 vs baselineImage Generation · test-time · method=TIR
Source quote
L196: \quad w/ TIR │ 49.00 │ 71.25 │ 98.75 │ 80.81 │ 47.00 │ 80.85 │ 71.27 (\textbf{\textcolor{darkgreen}{+6.41}})
GenEvalDALL-E 3 w/ TIROverall Score68.04+3.18 vs baselineImage Generation · test-time · method=TIR
Source quote
L198: \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)
BenchmarkMethodMetricScoreProtocol / Evidence
GenEvalFlux baselineOverall Score64.86Image Generation
Source quote
L195: Flux~\cite{flux2024} │ 19.00 │ 68.75 │ 100.00 │ 75.76 │ 48.00 │ 77.66 │ 64.86
GenEvalDALL-E 3 baselineOverall Score60.37Image Generation
Source quote
L197: 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},
}

Loading related content...

Figure