Dynamic Prompt Optimizing for Text-to-Image Generation

Wenyi Mo, Tianyu Zhang, Yalong Bai, Bing Su, Ji-Rong Wen +1 more
2/9/2026

No official code found. Best implementation: Mowenyii/PAE (87 stars, last commit 2024-07-13).

Abstract

Text-to-image generative models, specifically those based on diffusion models like Imagen and Stable Diffusion, have made substantial advancements. Recently, there has been a surge of interest in the delicate refinement of text prompts. Users assign weights or alter the injection time steps of certain words in the text prompts to improve the quality of generated images. However, the success of fine-control prompts depends on the accuracy of the text prompts and the careful selection of weights and time steps, which requires significant manual intervention. To address this, we introduce the Prompt Auto-Editing (PAE) method. Besides refining the original prompts for image generation, we further employ an online reinforcement learning strategy to explore the weights and injection time steps of each word, leading to the dynamic fine-control prompts. The re-wardfunction during training encourages the model to consider aesthetic score, semantic consistency, and user prefer-ences. Experimental results demonstrate that our proposed method effectively improves the original prompts, generating visually more appealing images while maintaining semantic alignment. Code is available at this https URL.

View on arXivView PDF

Code Implementations(1)

Mowenyii/PAECommunity100%

[CVPR 2024] Dynamic Prompt Optimizing for Text-to-Image Generation

879Shell, PythonMar 14, 20242 years ago

Similar Papers

Cite this paper

@article{mo2026dynamic,
  title  = {Dynamic Prompt Optimizing for Text-to-Image Generation},
  author = {Wenyi Mo and Tianyu Zhang and Yalong Bai and Bing Su and Ji-Rong Wen and Qing Yang},
  year   = {2026},
  eprint = {2404.04095},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2404.04095},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.04095.svg)](https://codeofpaper.com/paper/2404.04095)

Discussion