Evolving Prompts for Synthetic Image Generation with Genetic Algorithm

Khoi D. Tran, Dat Viet Bui, Ngoc Hoang Luong · 2023

The growing accessibility of text-to-image generative models necessitates the search for proper prompts to generate preference-satisfying and high-quality images. A prompt generally is a specific text input provided to the generative system to guide the production of corresponding images. However, crafting suitable prompts manually remains a non-trivial challenge. Existing automatic approaches often utilize evolutionary algorithms (EAs) to evolve a population of prompts in a generational manner until suitable prompts that can generate satisfying images can be obtained. Using a genetic algorithm (GA), EvoGen is such a prompt evolving framework with promising image generation capabilities; however, it is still not consistent in yielding desirable results. In this paper, we employ a different GA implementation for EvoGen that has an intrinsic elitism mechanism to ensure that good prompts are not accidentally discarded due to the stochastic operators of EAs. Furthermore, we consider a new cosine loss function as the fitness function that achieves faster convergence and better image guidance.

Read the paper · More papers on PaperTik