用遗传算法优化扩散模型的提示词,自动生成更优图像。
Evolutionary Token-Level Prompt Optimization for Diffusion Models
- 用遗传算法直接演化文本编码的令牌向量,不依赖人工改写。
- 在36个提示上提升23.93%的综合评分,优于基线方法。
- 适用于任何带文本编码器的生成模型,可灵活扩展。
文本到图像的扩散模型生成效果强,但对提示词敏感,常需大量人工调试。为此,本文提出一种基于遗传算法(GA)的提示词优化方法,直接演化CLIP-based扩散模型所用的令牌向量。该方法优化包含美学质量(使用LAION Aesthetic Predictor V2评估)与提示-图像匹配度(通过CLIPScore衡量)的综合目标函数。在Parti Prompts (P2)数据集的36个提示上实验表明,该方法优于基准方法(包括Promptist和随机搜索),综合评分最高提升23.93%。该方法适用于具有分词文本编码器的图像生成模型,具备模块化设计,便于后续扩展,文中也讨论了其局限性与未来方向。
原文摘要 · Abstract (English)
Text-to-image diffusion models exhibit strong generative performance but remain highly sensitive to prompt formulation, often requiring extensive manual trial and error to obtain satisfactory results. This motivates the development of automated, model-agnostic prompt optimization methods that can systematically explore the conditioning space beyond conventional text rewriting. This work investigates the use of a Genetic Algorithm (GA) for prompt optimization by directly evolving the token vectors employed by CLIP-based diffusion models. The GA optimizes a fitness function that combines aesthetic quality, measured by the LAION Aesthetic Predictor V2, with prompt-image alignment, assessed via CLIPScore. Experiments on 36 prompts from the Parti Prompts (P2) dataset show that the proposed approach outperforms the baseline methods, including Promptist and random search, achieving up to a 23.93% improvement in fitness. Overall, the method is adaptable to image generation models with tokenized text encoders and provides a modular framework for future extensions, the limitations and prospects of which are discussed.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。