On Discrete Prompt Optimization for Diffusion Models
Ruochen Wang, Ting Liu, Cho-Jui Hsieh, Boqing Gong

TL;DR
This paper presents a novel gradient-based framework for optimizing discrete prompts in text-to-image diffusion models, addressing challenges of large search space and gradient computation, leading to improved prompt quality.
Contribution
It introduces a method to efficiently optimize discrete prompts by restricting the search space and proposing a new gradient approximation technique.
Findings
Enhanced prompts significantly improve image faithfulness.
Method can also generate adversarial prompts to disrupt image quality.
Effective in diverse prompt sources like DiffusionDB, ChatGPT, and COCO.
Abstract
This paper introduces the first gradient-based framework for prompt optimization in text-to-image diffusion models. We formulate prompt engineering as a discrete optimization problem over the language space. Two major challenges arise in efficiently finding a solution to this problem: (1) Enormous Domain Space: Setting the domain to the entire language space poses significant difficulty to the optimization process. (2) Text Gradient: Efficiently computing the text gradient is challenging, as it requires backpropagating through the inference steps of the diffusion model and a non-differentiable embedding lookup table. Beyond the problem formulation, our main technical contributions lie in solving the above challenges. First, we design a family of dynamically generated compact subspaces comprised of only the most relevant words to user input, substantially restricting the domain space.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMatrix Theory and Algorithms · Model Reduction and Neural Networks
MethodsDiffusion
