Abstract
Traditional text-to-image models often struggle with complex spatial arrangements and precise object attributes. We present Generation Chain-of-Thought (GoT), a novel paradigm that empowers Multimodal Large Language Models (MLLMs) to perform explicit semantic-spatial reasoning before image synthesis. By generating a detailed reasoning chain—including natural language descriptions and bounding box coordinates—GoT guides a diffusion model to produce high-fidelity images with superior compositional accuracy. Our framework achieves state-of-the-art results on benchmarks like GenEval and Emu-Edit, demonstrating its effectiveness in complex generation, interactive design, and precise image editing.
Introduction
While current text-to-image (T2I) models like Stable Diffusion excel at generating visually stunning images, they frequently fail to follow complex instructions involving multiple objects or specific spatial relationships. This "compositional failure" stems from the lack of an explicit planning phase; these models typically map text directly to pixels without reasoning about the scene's layout.
Conversely, MLLMs possess strong reasoning and grounding capabilities but are rarely utilized as the primary engine for image synthesis. GoT bridges this gap by introducing a unified framework where an MLLM acts as a "reasoning engine" that plans the scene before a diffusion model executes the visual generation.
The GoT Framework
The GoT framework consists of two primary components: a Reasoning Engine and a Semantic-Spatial Guidance Module (SSGM).
Reasoning Engine
The backbone of GoT is Qwen2.5-VL-3B. Upon receiving a prompt, the model generates a "reasoning chain" instead of immediate pixel data. This chain includes a comprehensive description of the scene, identifies key objects, and assigns them precise spatial coordinates in (x1, y1), (x2, y2) format. This explicit planning leverages the MLLM's pre-trained grounding abilities to ensure all requested elements are accounted for and correctly positioned.
Semantic-Spatial Guidance Module (SSGM)
The SSGM serves as the interface between the MLLM's reasoning and the diffusion process, utilizing an SDXL-based model. It employs a triple-guidance strategy:
- Semantic Guidance: Uses MLLM-generated embeddings for more nuanced control than standard CLIP embeddings.
- Spatial Guidance: Translates predicted coordinates into color-coded masks, providing the diffusion model with a clear blueprint of object placement.
- Reference Guidance: Facilitates editing by incorporating the original source image to maintain visual consistency.
Interactive Generation and Editing
A significant advantage of the GoT paradigm is its support for interactive design. Users can inspect the generated reasoning chain and make manual adjustments to coordinates or attributes. For instance, changing a text description from "green apple" to "red apple" within the reasoning chain allows the model to update the image while preserving the overall composition.
Data and Training
To train GoT, the authors developed GoT-9M, a massive dataset of 9 million samples. This includes T2I data from sources like LAION-Aesthetics and JourneyDB, re-captioned to include spatial grounding, and 920k editing examples derived from OmniEdit and SEED-Edit-Multiturn. This extensive data allows the model to treat generation and editing as unified reasoning tasks.
Experimental Results
GoT demonstrates superior performance across multiple benchmarks:
- GenEval: Achieved an overall score of 0.64, surpassing SD3 (0.62) and JanusFlow (0.63). It showed particular strength in "Single Object" (0.99) and "Counting" (0.67) tasks.
- Emu-Edit: Reached a CLIP-I score of 0.864, outperforming previous state-of-the-art models like CosXL-Edit.
Qualitative evaluations confirm GoT's ability to handle complex multi-step edits and maintain scene integrity during modifications.
Conclusion
GoT introduces a powerful "Chain-of-Thought" for visual generation, proving that explicit reasoning significantly enhances the compositional quality and editability of AI-generated images. While computationally intensive, the framework sets a new standard for MLLM-driven image synthesis. Future work will explore scaling to larger MLLMs and extending the GoT paradigm to video and 3D generation.
Summary updated