Abstract
As the field of image generation rapidly advances, traditional diffusion models and those integrated with multimodal large language models (LLMs) still encounter limitations in interpreting complex prompts and preserving image consistency pre and post-editing. To tackle these challenges, we present an innovative image editing framework that employs the robust Chain-of-Thought (CoT) reasoning and localizing capabilities of multimodal LLMs to aid diffusion models in generating more refined images. We first meticulously design a CoT process comprising instruction decomposition, region localization, and detailed description. Subsequently, we fine-tune the LISA model, a lightweight multimodal LLM, using the CoT process of Multimodal LLMs and the mask of the edited image. By providing the diffusion models with knowledge of the generated prompt and image mask, our models generate images with a superior understanding of instructions. Through extensive experiments, our model has demonstrated superior performance in image generation, surpassing existing state-of-the-art models. Notably, our model exhibits an enhanced ability to understand complex prompts and generate corresponding images, while maintaining high fidelity and consistency in images before and after generation.
Introduction
While text-to-image models have become incredibly powerful, they still struggle with two major hurdles in image editing: complex-prompt following and image fidelity. Traditional models often conflate attributes or ignore parts of nuanced instructions, such as changing specific items for multiple subjects simultaneously. Furthermore, many current tools suffer from "feature misalignment," where the resulting image loses the essence of the original background or subject identity even if the specific edit is correct. TIE (Text-based Image Editing) addresses these challenges by bridging the gap between the high-level reasoning of language models and the pixel-level generation of diffusion models.
The TIE Framework
The core innovation of TIE is the Chain-of-Thought (CoT) Pipeline, which transforms complex text into precise image manipulations through three distinct phases:
- Instruction Decomposition: Compound commands (e.g., "Remove A and Add B") are broken down into a sequence of simpler, actionable sub-prompts.
- Region Localization: The model performs analytical reasoning to identify the exact pixels requiring modification.
- Detailed Description: The model generates a "re-prompt"—a highly detailed description of the masked area—to ensure new content harmonizes with the existing environment.
Architecturally, TIE utilizes a fine-tuned LISA (a lightweight MLLM) to output both a segmentation mask and a refined inpainting prompt. These outputs are then processed by a standard inpainting model, such as Kandinsky-2.2, to produce the final high-fidelity result.
Datasets and Training
TIE was developed using the MagicBrush dataset, a large-scale collection for instruction-guided image editing. To enable reasoning, the authors created the TIE Pipeline Dataset by extracting 1,376 samples and using GPT-4V to augment them with CoT reasoning steps. This specialized dataset allows the model to "think" before editing, leading to more accurate localization and instruction following.
Experimental Results
TIE was evaluated against both pure diffusion models and MLLM-based models. Quantitatively, TIE achieved a CLIP-T score of 0.233 and an Alignment score of 57, significantly outperforming competitors like MGM and SEED-X.
Qualitatively, TIE demonstrates a superior ability to maintain image consistency. Unlike baseline models that may alter the entire scene when asked to change a single attribute, TIE isolates the edit to the relevant region, preserving the identity of the rest of the image.
Conclusion
TIE revolutionizes text-based image editing by replacing direct embedding alignment with human-readable intermediate reasoning products. By generating precise masks and descriptive prompts, it empowers diffusion models to handle complex instructions with high fidelity. While currently limited by the granularity of available training masks and the performance of underlying inpainting models, TIE sets a new standard for instruction-following in the field of multimodal image manipulation.
Summary updated