近期文本到图像扩散模型的进展已取得令人瞩目的图像生成能力。然而,利用期望属性(例如美学质量、用户意图)控制生成过程仍然具有挑战性,而这些属性可以表示为黑盒奖励函数。本文聚焦于提示词适配,即将原始提示词精炼为模型偏好的提示词,以生成期望图像。尽管先前工作使用强化学习(RL)优化提示词,但我们观察到,应用RL往往会导致生成相似的后缀和确定性的行为。为此,我们提出Prompt Adaptation with GFlowNets(PAG),这是一种将提示词适配构建为概率推断问题的新颖方法。我们的关键洞见是,利用Generative Flow Networks(GFlowNets,生成流网络)能够使我们从奖励最大化转向从未归一化密度函数中采样,从而实现高质量且多样的提示词生成。然而,我们发现朴素应用GFlowNets会遭遇模式崩溃,并揭示了一个此前被忽视的现象:模型中神经可塑性的渐进丧失,而序列提示词生成中低效的信用分配又使这一问题加剧。为应对这一关键挑战,我们在PAG中开发了一种系统化方法,包含流重激活、奖励优先采样以及用于提示词适配的奖励分解。大量实验验证,PAG成功学会了为文本到图像生成采样有效且多样的提示词。我们还表明,PAG在各种奖励函数上表现出强鲁棒性,并且具备向不同文本到图像模型迁移的能力。
英文摘要:
Recent advances in text-to-image diffusion models have achieved impressive image generation capabilities. However, it remains challenging to control the generation process with desired properties (e.g., aesthetic quality, user intention), which can be expressed as black-box reward functions. In this paper, we focus on prompt adaptation, which refines the original prompt into model-preferred prompts to generate desired images. While prior work uses reinforcement learning (RL) to optimize prompts, we observe that applying RL often results in generating similar postfixes and deterministic behaviors. To this end, we introduce \textbf{P}rompt \textbf{A}daptation with \textbf{G}FlowNets (\textbf{PAG}), a novel approach that frames prompt adaptation as a probabilistic inference problem. Our key insight is that leveraging Generative Flow Networks (GFlowNets) allows us to shift from reward maximization to sampling from an unnormalized density function, enabling both high-quality and diverse prompt generation. However, we identify that a naive application of GFlowNets suffers from mode collapse and uncovers a previously overlooked phenomenon: the progressive loss of neural plasticity in the model, which is compounded by inefficient credit assignment in sequential prompt generation. To address this critical challenge, we develop a systematic approach in PAG with flow reactivation, reward-prioritized sampling, and reward decomposition for prompt adaptation. Extensive experiments validate that PAG successfully learns to sample effective and diverse prompts for text-to-image generation. We also show that PAG exhibits strong robustness across various reward functions and transferability to different text-to-image models.
DyArtbank: Diverse Artistic Style Transfer via Pre-trained Stable Diffusion and Dynamic Style Prompt Artbank
College of Computer Science and Technology, Zhejiang University(浙江大学计算机科学与技术学院);Department of Computer Science, City University of Hong Kong(香港城市大学计算机科学系)
EDITOR: Effective and Interpretable Prompt Inversion for Text-to-Image Diffusion Models
University of Massachusetts, Amherst(马萨诸塞大学阿姆赫斯特分校);Georgia Institute of Technology(佐治亚理工学院);Rutgers University(罗格斯大学);University of Utah(犹他大学);Dolby Laboratories(杜比实验室)
PromptSafe: Gated Prompt Tuning for Safe Text-to-Image Generation
Beihang University(北航);Beijing University of Posts and Telecommunications(北京邮电大学);Taishan University(泰山大学);Nanyang Technological University(南洋理工大学);Henan University of Science and Technology(河南科技大学)
TextTIGER: Text-based Intelligent Generation with Entity Prompt Refinement for Text-to-Image Generation
Nara Institute of Science and Technology(奈良科学技術研究所);The University of Tokyo(东京大学);Chungnam National University(Chungnam国立大学);Institute of Science Tokyo(东京科学研究所)
T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy
South China University of Technology(华南理工大学);International Digital Economy Academy (IDEA)(国际数字经济学院);The Hong Kong University of Science and Technology(香港科技大学);Tsinghua University(清华大学)
LDEPrompt: Layer-importance guided Dual Expandable Prompt Pool for Pre-trained Model-based Class-Incremental Learning
School of Information and Communication Engineering, BUPT(北京邮电大学信息与通信工程学院);Engineering Research Center for Information Network, Ministry of Education(教育部信息网络工程研究中心)