Overview
Rectified Flow (RF) models have emerged as powerful alternatives to traditional diffusion models for image generation. However, mapping real images back into noise for editing—a process known as inversion—often suffers from compounding approximation errors. This paper introduces two "free lunch" (training-free) methods: Proximal-Mean Inversion (PMI) and mimic-CFG. These plug-and-play techniques correct the model's velocity field on the fly, significantly boosting image reconstruction and editing quality while requiring fewer computational steps.
The Challenge: Unstable Velocity in Inversion
To edit a real image using modern generative models (like Stable Diffusion 3.5 or Flux), you must first reverse-engineer the generation process. You take the real image and map it backward into a latent noise representation.
In RF models, this is achieved by following a learned "velocity field" backward. Because we lack access to the exact latent variables during this reverse process, we rely on approximations. Unfortunately, these tiny approximation errors compound at every timestep. Eventually, the velocity field becomes unstable, and the trajectory drifts into low-density, unrealistic regions of the data distribution. When you try to generate an edited image from this corrupted noise, the result is poor image reconstruction and messy edits that fail to preserve the original image's structure.
The Solution: PMI and mimic-CFG
The authors propose two lightweight, training-free interventions that can be seamlessly plugged into existing ODE solvers (like Euler, Heun, or FireFlow):
- Proximal-Mean Inversion (PMI): During the inversion process, the predicted velocity often gets perturbed by errors. PMI applies a gradient correction that nudges the current velocity toward a running average of past velocities. It uses a proximal optimization objective to balance local consistency (staying close to the last step) and global consistency (moving toward the historical average). To prevent the correction from pushing the trajectory into unrealistic data regions, the update is mathematically constrained within a theoretically derived "spherical Gaussian" radius.
- mimic-CFG: During the generation/editing phase, the authors introduce a technique inspired by Classifier-Free Guidance (CFG). It projects the current predicted velocity onto the historical average direction. By interpolating between the current velocity and this projection, the model strikes a highly controllable balance between making the requested semantic edits and preserving the original image's background and structure.
Key Insights
- Velocity disruption is the root culprit: The instability in RF inversion isn't just random noise; it's a fundamental disruption of the near-constant velocity field that RF models are explicitly trained to maintain.
- Averaging acts as an anchor: Using a running average of past velocities acts as a powerful stabilizing anchor. It prevents compounding local errors from throwing the entire inversion trajectory off course.
- CFG math works for trajectory correction: By treating the projected average velocity as an "unconditional" baseline and the current velocity as a "conditional" signal, the authors cleverly repurpose the math of CFG to control editing strength—without actually needing auxiliary models or unconditional text prompts.
Results and Performance
The methods were evaluated primarily on the PIE-Bench dataset (700 images across 10 editing categories) using state-of-the-art RF models like Flux.1-dev, Stable Diffusion 3.5, and SDXL-Turbo.
- Superior Reconstruction: Across multiple solvers, adding PMI consistently improved reconstruction metrics. For example, when added to the RF-Solver, PSNR improved by 1.55 and SSIM increased, while error metrics (MSE/LPIPS) dropped significantly.
- Better Edits with Fewer Steps: The proposed methods achieve state-of-the-art editing quality with drastically fewer Neural Function Evaluations (NFEs). For instance, FireFlow combined with PMI achieved better structural preservation and CLIP similarity at just 18 NFEs, compared to baseline solvers that required 50-60 NFEs to reach similar quality.
- Zero Overhead: Because the methods only involve lightweight vector math on the velocity field, they require zero additional training, no extra neural network passes, and add virtually no time to the inference process.
Limitations and Future Work
While highly effective, the current method relies on a simple summation-based running average. The authors note this might propagate early noise equally with later, more accurate steps. In their appendices, they briefly tested an Exponential Moving Average (EMA) to down-weight older velocity increments, which showed promising early results, suggesting a systematic investigation of EMA for future research. Additionally, as a training-free add-on, the method inherently inherits any biases or artifacts present in the underlying pre-trained generative models.
Summary updated