Idea2Img: Iterative Self-refinement with GPT-4V for Automatic Image Design and Generation

Zhengyuan Yang, Jianfeng Wang, Linjie Li, Kevin Lin, Chung-Ching Lin, Zicheng Liu, Lijuan Wang

Abstract

Idea2Img is an agentic framework that leverages Large Multimodal Models (LMMs), specifically GPT-4V, to automate the complex process of text-to-image (T2I) prompt engineering. By implementing a multimodal iterative self-refinement loop, the system mimics human trial-and-error to generate high-quality images from complex, interleaved text-and-image "IDEAs." Experimental results demonstrate that Idea2Img significantly outperforms manual prompting and single-shot LMM outputs across a wide range of design tasks, effectively acting as an autonomous "model prober" for black-box T2I systems.

Introduction: The Challenge of Prompt Engineering

While text-to-image (T2I) models like Stable Diffusion and DALL-E are revolutionary, they are notoriously "finicky." Users often struggle with "prompt engineering" to translate a high-level idea into a specific string of text that the model understands.

Current T2I systems face three major hurdles:

  1. Instruction Following: They struggle with design-centric commands (e.g., "make a logo for a 2024 conference").
  2. Multimodal Inputs: They cannot easily process "interleaved" ideas (e.g., "make a dog that looks like this image, but in that art style").
  3. The "Black Box" Nature: Different models have different quirks. A prompt that works for SDXL might fail for DeepFloyd IF.

Humans solve this by iterating: we generate an image, see what’s wrong, and tweak the prompt. The authors of Idea2Img ask: Can a Large Multimodal Model (LMM) act as an autonomous agent to handle this tedious iteration for us?

The Idea2Img Framework

The researchers developed a closed-loop system centered around GPT-4V(ision) acting as the "brain" and a standard T2I model acting as the "tool." The framework consists of three main roles:

  1. Prompt Generation: GPT-4V takes the user's "IDEA" (which can be text, images, or both) and generates $N$ detailed T2I prompts.
  2. Draft Image Selection: After the T2I model generates $N$ draft images, GPT-4V inspects them all and selects the one that best matches the original IDEA.
  3. Feedback Reflection: GPT-4V compares the selected draft to the user's IDEA, identifies discrepancies (e.g., "the dog is the wrong breed" or "the text is missing"), and provides directional feedback for the next round.
The Idea2Img framework uses GPT-4V to iteratively refine prompts through a feedback loop and a memory module.

Crucially, the system includes a Memory Module. This stores the history of prompts, images, and feedback, allowing the agent to "learn" the specific characteristics and limitations of the T2I model it is currently probing. This iterative process continues until a maximum number of iterations is reached or a satisfactory image is produced.

Datasets and Evaluation

To test the system, the authors introduced a new evaluation set of 104 challenging multimodal IDEA samples.

  • Composition: 33 text-only queries, 43 queries with a single reference image, and 28 queries with multiple reference images.
  • Complexity: These aren't simple prompts; they include instructional text (e.g., "a logo for commercial advertising") and complex spatial/attribute requirements that typically cause zero-shot T2I models to fail.

Key Insights and Results

The researchers conducted a comprehensive user preference study comparing Idea2Img against manual human prompts and single-round LMM prompts. For SDXL, the iterative self-refined prompts were preferred 56.7% of the time, compared to only 13.5% for manual prompts and 29.8% for the initial LMM round.

Qualitative comparison showing Idea2Img's superiority over standard T2I models across diverse tasks like style transfer, scene text, and knowledge-based generation.

Major Findings:

  • LMM as a "Model Prober": GPT-4V can autonomously discover the "hidden vocabulary" of a T2I model. By looking at failed drafts, it realizes which words the model ignores and adjusts its strategy in the next iteration.
  • The Power of Selection: T2I models often produce "bad images from good prompts." By having GPT-4V generate multiple drafts and select the best one, the system filters out "quality noise" that would otherwise derail the refinement process.
  • Stronger Models Benefit More: A surprising finding was that more capable T2I models (like SDXL) saw a higher performance boost from iteration (+26.9%) than weaker models. This suggests that as T2I models become better at following instructions, the value of an agentic "refiner" actually increases.

Limitations and Future Work

Despite its success, Idea2Img faces challenges regarding latency and cost. Because the system requires multiple calls to both GPT-4V and a T2I model, it is significantly slower and more expensive than single-shot generation. Furthermore, the agent is still limited by the underlying T2I model's physical capabilities; if a model cannot render text correctly, refinement can only do so much.

Future work may involve extending this "self-refinement" logic to other domains, such as autonomous GUI navigation or using multiple specialized generative tools (e.g., combining ControlNet with Inpainting) in a single workflow.

Summary updated

BibTeX
@inproceedings{yang2024idea,
  author = {Zhengyuan Yang and Jianfeng Wang and Linjie Li and Kevin Lin and Chung-Ching Lin and Zicheng Liu and Lijuan Wang},
  title = {{Idea2Img: Iterative Self-refinement with GPT-4V for Automatic Image Design and Generation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72920-1\_10},
}
Figure