Table of Contents
Fetching ...

SmartFreeEdit: Mask-Free Spatial-Aware Image Editing with Complex Instruction Understanding

Qianqian Sun, Jixiang Luo, Dell Zhang, Xuelong Li

TL;DR

SmartFreeEdit tackles the challenge of spatial reasoning in instruction-driven image editing by fusing a multimodal large language model with a hypergraph-enhanced inpainting module. The framework comprises an MLLM-driven Promptist, a Reasoning Segmentation module that generates semantic masks using a <seg> token, and a Hypergraph-based inpainting network (HyPConv) that preserves global image structure. Key contributions include region-aware tokens, a reasoning segmentation pipeline for implicit instructions, and a hypergraph-augmented inpainting mechanism that improves semantic coherence across complex scenes. Experiments on Reason-Edit and BrushBench demonstrate superior editing accuracy and visual quality, illustrating improved global consistency and robust adherence to natural-language prompts. The approach promises scalable, mask-free editing suitable for real-world complex scenes, with code released at the project repository.

Abstract

Recent advancements in image editing have utilized large-scale multimodal models to enable intuitive, natural instruction-driven interactions. However, conventional methods still face significant challenges, particularly in spatial reasoning, precise region segmentation, and maintaining semantic consistency, especially in complex scenes. To overcome these challenges, we introduce SmartFreeEdit, a novel end-to-end framework that integrates a multimodal large language model (MLLM) with a hypergraph-enhanced inpainting architecture, enabling precise, mask-free image editing guided exclusively by natural language instructions. The key innovations of SmartFreeEdit include:(1)the introduction of region aware tokens and a mask embedding paradigm that enhance the spatial understanding of complex scenes;(2) a reasoning segmentation pipeline designed to optimize the generation of editing masks based on natural language instructions;and (3) a hypergraph-augmented inpainting module that ensures the preservation of both structural integrity and semantic coherence during complex edits, overcoming the limitations of local-based image generation. Extensive experiments on the Reason-Edit benchmark demonstrate that SmartFreeEdit surpasses current state-of-the-art methods across multiple evaluation metrics, including segmentation accuracy, instruction adherence, and visual quality preservation, while addressing the issue of local information focus and improving global consistency in the edited image. Our project will be available at https://github.com/smileformylove/SmartFreeEdit.

SmartFreeEdit: Mask-Free Spatial-Aware Image Editing with Complex Instruction Understanding

TL;DR

SmartFreeEdit tackles the challenge of spatial reasoning in instruction-driven image editing by fusing a multimodal large language model with a hypergraph-enhanced inpainting module. The framework comprises an MLLM-driven Promptist, a Reasoning Segmentation module that generates semantic masks using a <seg> token, and a Hypergraph-based inpainting network (HyPConv) that preserves global image structure. Key contributions include region-aware tokens, a reasoning segmentation pipeline for implicit instructions, and a hypergraph-augmented inpainting mechanism that improves semantic coherence across complex scenes. Experiments on Reason-Edit and BrushBench demonstrate superior editing accuracy and visual quality, illustrating improved global consistency and robust adherence to natural-language prompts. The approach promises scalable, mask-free editing suitable for real-world complex scenes, with code released at the project repository.

Abstract

Recent advancements in image editing have utilized large-scale multimodal models to enable intuitive, natural instruction-driven interactions. However, conventional methods still face significant challenges, particularly in spatial reasoning, precise region segmentation, and maintaining semantic consistency, especially in complex scenes. To overcome these challenges, we introduce SmartFreeEdit, a novel end-to-end framework that integrates a multimodal large language model (MLLM) with a hypergraph-enhanced inpainting architecture, enabling precise, mask-free image editing guided exclusively by natural language instructions. The key innovations of SmartFreeEdit include:(1)the introduction of region aware tokens and a mask embedding paradigm that enhance the spatial understanding of complex scenes;(2) a reasoning segmentation pipeline designed to optimize the generation of editing masks based on natural language instructions;and (3) a hypergraph-augmented inpainting module that ensures the preservation of both structural integrity and semantic coherence during complex edits, overcoming the limitations of local-based image generation. Extensive experiments on the Reason-Edit benchmark demonstrate that SmartFreeEdit surpasses current state-of-the-art methods across multiple evaluation metrics, including segmentation accuracy, instruction adherence, and visual quality preservation, while addressing the issue of local information focus and improving global consistency in the edited image. Our project will be available at https://github.com/smileformylove/SmartFreeEdit.

Paper Structure

This paper contains 16 sections, 5 equations, 5 figures, 3 tables.

Figures (5)

  • Figure 1: We propose SmartFreeEdit to address the challenge of reasoning instructions and segmentations in image editing, thereby enhancing the practicality of AI editing. Our method effectively handles some semantic editing operations, including adding, removing, changing objects, background changing and global editing.
  • Figure 2: Architecture Overview of SmartFreeEdit for Reasoning Complex Scenarios Instruction-Based Editing. Our SmartFreeEdit consists of three key components: 1) An MLLM-driven Promptist that decomposes instructions into Editing Objects, Category, and Target Prompt. 2) Reasoning Segmentation converts the prompt into an inference query and generates reasoning masks. 3) An Inpainting-based Image Editor using the hypergraph computation module to enhance global image structure understanding for more accurate edits.
  • Figure 3: The Proposed Architecture of Hypergraph Module in Encoder for Image Inpainting. The masked image is processed through convolutional layers, residual blocks, and a downsampling block, followed by a hypergraph module that aggregates contextual information through hypergraph convolution (HyPConv). The resulting latent distribution is used for image restoration.
  • Figure 4: Qualitative comparisons of SmartFreeEdit on Reason-Edit with previous instruction-based image editing methods including InstructPix2Pix (IP2P), InstructDiffusion(IDiff), MagicBrush, BrushEdit, SmartEdit(13B) and latest Gemini 2.0 Flash. Mask-free methods don't require additional mask input, where we take these methods with same instructions as baselines for comparison and our approach demonstrates superior editing capabilities in complex scenarios.
  • Figure 5: Quanlitative comparisons of the performance of SmartFreeEdit and previous image inpainting methods in nature images. The comparison includes Blended-Diffusion (BLD), Stable Diffusion Inpainting (SDI), HD-Painter (HDP), ControlNet Inpainting (CNI), and the optimized BrushNetX in BrushEdit.