InstantEdit: Text-Guided Few-Step Image Editing with Piecewise Rectified Flow

Yiming Gong, Zhen Zhu, Minjia Zhang

TL;DR

This paper introduces InstantEdit, a novel method for fast, text-guided image editing that achieves high-quality results in just a few steps. By leveraging the RectifiedFlow framework and introducing new inversion and regeneration strategies, InstantEdit significantly speeds up the editing process while maintaining excellent image consistency and prompt alignment.

What Problem Does This Paper Address?

Text-guided image editing, powered by diffusion models, has become a powerful tool for creative expression. However, these models are computationally expensive, requiring many steps for both image inversion (mapping an image into the model's latent space) and regeneration (editing the image based on a text prompt). This high computational cost creates a significant barrier to real-time, interactive editing. While "few-step" diffusion models offer faster generation, applying them to text-guided editing presents challenges: inaccurate inversion trajectories with few steps and insufficient editability, leading to edits that loosely follow the desired prompt. This paper aims to bridge this gap by developing a fast and accurate few-step text-guided image editing method that preserves critical content while adhering closely to textual instructions.

Methods

InstantEdit builds upon the RectifiedFlow framework, which uses straight sampling trajectories to improve inversion accuracy. The core contributions are:

  • Piecewise Rectified Flow Inversion (PerRFI): This novel inversion strategy leverages the straightened trajectories of RectifiedFlow models to achieve more accurate inversions with fewer steps. It's inspired by existing RectifiedFlow approaches but adapted for the few-step editing scenario.
  • Inversion Latent Injection (ILI): To ensure coherent and detailed regeneration, ILI reuses latent information obtained during the PerRFI inversion process. This helps to anchor the regeneration at each step, preventing error accumulation and improving faithfulness to the original image.
  • Disentangled Prompt Guidance (DPG): This technique balances editability with detail preservation. It explicitly computes and scales orthogonal components between target-prompted and source-prompted conditions to provide more accurate guidance. Optionally, an attention-guided masking mechanism can be employed to automatically identify and emphasize regions relevant to the target edit.
  • Canny-Conditioned ControlNet: To further preserve structural cues and suppress artifacts, a Canny-edge-conditioned ControlNet is integrated. This plug-and-play module provides explicit structural guidance during both inversion and regeneration with minimal computational overhead.

Datasets

The paper evaluates its method on the PIE image editing dataset. This dataset is described as a benchmark focusing on 9 editing types, including changing objects, adding/deleting objects, and modifying content, pose, color, material, background, and style.

Key Insights and Ideas

  • Straight trajectories are key: The paper's central insight is that the straight sampling trajectories of RectifiedFlow models are crucial for achieving accurate inversions in few-step editing. This contrasts with traditional diffusion model inversion methods that can suffer from significant errors with limited steps.
  • Reusing inversion information matters: Simply regenerating from a single inverted latent is insufficient. ILI's approach of reusing intermediate latents from the inversion process significantly improves regeneration quality and consistency.
  • Disentangling prompts is vital for control: The DPG method highlights that simply scaling prompt differences can lead to undesirable changes. By disentangling the target and source prompt signals, better control and preservation of the original image are achieved.
  • Structural guidance is a powerful addition: Integrating Canny edges via ControlNet provides a simple yet effective way to maintain structural integrity, a common challenge in image editing.

Key Results

  • Efficiency: InstantEdit achieves editing in just 8 NFE (Number of Function Evaluations), positioning it as a fast few-step editing method.
  • Quantitative Performance: On the PIE benchmark, InstantEdit surpasses other few-step editing frameworks and achieves comparable or better results than multi-step methods in terms of editability and consistency. For example, in the few-step scenario, it achieves a CLIPScore of 26.28 for alignment and 86.44 for consistency (SSIM).
  • Qualitative Performance: Visual examples demonstrate that InstantEdit produces edits that align well with the editing prompt while maintaining high consistency with the original image, often outperforming other methods in terms of realism and artifact reduction.
  • User Study: A user study with 37 participants showed that InstantEdit was the most frequently selected method, indicating strong user preference for its visual quality and editing capabilities.

Limitations and Future Work

  • Inversion Overhead: While fast, InstantEdit still has a small time overhead compared to methods like InfEdit and TurboEdit due to its inversion process.
  • Moderate Edits: The method is primarily constrained to moderate edits. Large structural changes, such as significant pose modifications, remain challenging and may require more complex techniques or additional guidance signals.
  • Future Directions: The authors plan to explore more flexible and faster text-guided image editing by addressing the limitations mentioned above. This includes investigating methods for handling larger structural changes and incorporating more advanced guidance signals like drag points and regions.

Summary updated

BibTeX
@inproceedings{gong2025instantedit,
  author = {Yiming Gong and Zhen Zhu and Minjia Zhang},
  title = {{InstantEdit: Text-Guided Few-Step Image Editing with Piecewise Rectified Flow}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure