Table of Contents
Fetching ...

FlashEdit: Decoupling Speed, Structure, and Semantics for Precise Image Editing

Junyi Wu, Zhiteng Li, Haotong Qin, Xiaohong Liu, Linghe Kong, Yulun Zhang, Xiaokang Yang

TL;DR

FlashEdit tackles the latency-accuracy trade-off in text-guided image editing by decoupling control at temporal, spatial, and semantic levels. It introduces OSIE for one-step inversion and editing, BG-Shield to preserve the background, and SSCA to constrain attention and prevent semantic leakage. The approach delivers real-time edits (under 0.2 seconds) with improved background consistency and structural integrity, achieving over 150x speedup over prior multi-step methods. Ablation and quantitative results on PieBench demonstrate the complementary value of the three components, and the work highlights a practical path to interactive diffusion-based editing.

Abstract

Text-guided image editing with diffusion models has achieved remarkable quality but suffers from prohibitive latency, hindering real-world applications. We introduce FlashEdit, a novel framework designed to enable high-fidelity, real-time image editing. Its efficiency stems from three key innovations: (1) a One-Step Inversion-and-Editing (OSIE) pipeline that bypasses costly iterative processes; (2) a Background Shield (BG-Shield) technique that guarantees background preservation by selectively modifying features only within the edit region; and (3) a Sparsified Spatial Cross-Attention (SSCA) mechanism that ensures precise, localized edits by suppressing semantic leakage to the background. Extensive experiments demonstrate that FlashEdit maintains superior background consistency and structural integrity, while performing edits in under 0.2 seconds, which is an over 150$\times$ speedup compared to prior multi-step methods. Our code will be made publicly available at https://github.com/JunyiWuCode/FlashEdit.

FlashEdit: Decoupling Speed, Structure, and Semantics for Precise Image Editing

TL;DR

FlashEdit tackles the latency-accuracy trade-off in text-guided image editing by decoupling control at temporal, spatial, and semantic levels. It introduces OSIE for one-step inversion and editing, BG-Shield to preserve the background, and SSCA to constrain attention and prevent semantic leakage. The approach delivers real-time edits (under 0.2 seconds) with improved background consistency and structural integrity, achieving over 150x speedup over prior multi-step methods. Ablation and quantitative results on PieBench demonstrate the complementary value of the three components, and the work highlights a practical path to interactive diffusion-based editing.

Abstract

Text-guided image editing with diffusion models has achieved remarkable quality but suffers from prohibitive latency, hindering real-world applications. We introduce FlashEdit, a novel framework designed to enable high-fidelity, real-time image editing. Its efficiency stems from three key innovations: (1) a One-Step Inversion-and-Editing (OSIE) pipeline that bypasses costly iterative processes; (2) a Background Shield (BG-Shield) technique that guarantees background preservation by selectively modifying features only within the edit region; and (3) a Sparsified Spatial Cross-Attention (SSCA) mechanism that ensures precise, localized edits by suppressing semantic leakage to the background. Extensive experiments demonstrate that FlashEdit maintains superior background consistency and structural integrity, while performing edits in under 0.2 seconds, which is an over 150 speedup compared to prior multi-step methods. Our code will be made publicly available at https://github.com/JunyiWuCode/FlashEdit.

Paper Structure

This paper contains 14 sections, 12 equations, 4 figures, 3 tables.

Figures (4)

  • Figure 1: Overview of our One-Step Inversion-and-Editing framework, which introduces a direct image conditioning branch, trained via a two-stage "Anchor-and-Refine" strategy that uses direct supervision for synthetic data (Stage 1) and a teacher-student objective for real images (Stage 2).
  • Figure 2: Illustration of our Background Shield (BG-Shield) mechanism. The top of the figure illustrates the problem of background inconsistency in standard editing, while the bottom details the pipeline of our method designed to solve it.
  • Figure 3: Illustration of our Sparsified Spatial Cross-Attention (SSCA) method resolving semantic entanglement. The top row demonstrates how standard attention fails on precise edits, resulting in edit attenuation and attribute leakage. The bottom row details our SSCA mechanism, which prevents this by computing attention only over a subset of relevant text tokens to ensure a clean edit.
  • Figure 4: Qualitative comparison of editing results. Each row corresponds to a unique editing task, with the source image displayed in the first column and the source/target prompts listed below.