TL;DR
Current text-to-image models often struggle with complex prompts involving multiple objects and specific spatial relationships. This paper introduces a progressive framework that uses a Large Language Model (LLM) to decompose long descriptions into a sequence of simple "synthesis, edit, and erase" steps, executed via a novel Stimulus, Response, and Fusion (SRF) latent guidance mechanism.
What Problem Does This Paper Address?
While diffusion models like Stable Diffusion have revolutionized image generation, they possess a "short-term memory" of sorts. They excel at generating one or two subjects but frequently suffer from semantic leakage or missing entities when prompts become long and complex. For instance, if you ask for a bear on the left and a mushroom on the right, the model might swap them, merge them, or forget one entirely.
Furthermore, existing methods for controlling layout often rely on "hard" manipulations of attention maps, which can lead to visual artifacts or a lack of stylistic cohesion. There is also a lack of unified frameworks that can handle both the initial synthesis of a scene and subsequent interactive editing (adding, changing, or deleting objects) in a single, seamless pipeline.
Methods
The authors propose a three-stage pipeline that treats image generation as a multi-turn conversation between an LLM and a diffusion model:
- Text Decomposition: A fine-tuned GPT model acts as a "director," breaking down a complex paragraph into a sequence of atomic commands: Synthesis (add object), Editing (change object), and Erasing (remove object).
- Operational Layouts: For synthesis steps, the framework uses GPT-4 to predict bounding boxes for new entities based on the relational descriptions in the prompt (e.g., "on the right side of the yard").
- The SRF Framework: This is the core technical contribution. Instead of forcing the model to follow a layout, it uses a "soft" approach:
- Stimulus: A soft loss function evaluates the difference between the model's current attention maps and the target layout mask.
- Response: The gradient of this loss is backpropagated to update the latent code ($z_t$), nudging the model toward the desired layout without breaking the underlying image structure.
- Fusion: To integrate the new object, the framework blends the updated latents with the background. Crucially, it uses a dynamic evolving mask that starts as a rigid box (for structure) and gradually shifts to a soft, attention-based mask (for fine details and blending).
Datasets
The researchers evaluated their method using:
- Custom Prompt Set: 500 text prompts featuring diverse objects and relationship types to test single-stage synthesis.
- SUN Database: Used to source real-world landscape images for the progressive generation and editing tasks. They collated 25 scenarios (125 images total) to test the integration of synthesis, editing, and erasing.
- Human Evaluation: Used Amazon Mechanical Turk (AMT) to rate image fidelity, relationship accuracy, and the success of editing/erasing operations.
Key Insights and Ideas
- Divide and Conquer: The fundamental "aha" moment is that diffusion models are significantly more reliable when handling 1-2 entities at a time. By sequencing the generation, the authors bypass the model's inherent capacity limits.
- Soft Direction vs. Hard Replacement: Previous works often replaced attention values directly. This paper argues that "stimulating" the latents via gradients (the "Soft Latent Direction") results in much more natural-looking images and better preservation of the background.
- LLM as a Spatial Reasoner: The paper leverages the latent spatial knowledge in LLMs (like GPT-4) to translate natural language relations ("to the left of") into concrete coordinate systems, acting as a bridge between language and vision.
Key Results
The progressive approach significantly outperformed state-of-the-art single-stage models:
- Relation Accuracy: The proposed method achieved 50.8%, more than doubling the performance of Attend-and-Excite (23.4%) and Stable Diffusion (19.8%).
- Object Recall: It successfully synthesized 64.4% of requested objects, compared to 50.3% for the best-performing baseline.
- Qualitative Superiority: As shown in Figure 6, the method avoids common pitfalls like "attribute coupling" (where a color meant for one object bleeds into another) and correctly places objects according to complex spatial instructions.
Limitations and Future Work
The authors acknowledge that their current text decomposition logic has limits. Highly nested or recursive spatial descriptions—such as "a horse under a car and between a cat and a dog"—are difficult to linearize into a simple sequence of steps.
Future work will focus on gathering more diverse training data to improve the LLM's ability to parse these complex, non-linear relationships and exploring ways to make the progressive steps even more computationally efficient.
Summary updated