Abstract: Rectified flow models have achieved remarkable performance in image and video generation tasks. However, existing numerical solvers face a trade-off between fast sampling and high-accuracy solutions, limiting their effectiveness in downstream applications such as reconstruction and editing. To address this challenge, we propose leveraging the Adams-Bashforth-Moulton (ABM) predictor-corrector method to enhance the accuracy of ODE solving in rectified flow models. Specifically, we introduce ABM-Solver, which integrates a multi-step predictor-corrector approach to reduce local truncation errors and employs Adaptive Step Size Adjustment to improve sampling speed. Furthermore, to effectively preserve non-edited regions while facilitating semantic modifications, we introduce a Mask Guided Feature Injection module. We estimate self-similarity to generate a spatial mask that differentiates preserved regions from those available for editing. Extensive experiments on multiple high-resolution image datasets validate that ABM-Solver significantly improves inversion precision and editing quality, outperforming existing solvers without requiring additional training or optimization.
Introduction
While diffusion models have revolutionized image generation, they often struggle with inversion—the process of mapping a real image back into a noise representation so it can be edited. Rectified Flow (ReFlow) models simplify this by using deterministic Ordinary Differential Equations (ODEs) to create "straight-line" paths between noise and data.
However, standard numerical solvers (like Euler or Midpoint methods) face a significant trade-off: fast sampling leads to high discretization errors, while high accuracy requires excessive computational steps. These errors accumulate during inversion, leading to "drift" where the reconstructed image loses the fine details or structural integrity of the original. This makes precise semantic editing—such as changing a "corgi" to a "tiger" while keeping the background identical—extremely difficult.
Methodology
To address these limitations, the authors propose a two-pronged solution: the ABM-Solver and the Mask Guided Feature Injection (MGFI) module.
ABM-Solver (Adams-Bashforth-Moulton)
Instead of a simple single-step lookahead, this method utilizes a linear multi-step predictor-corrector framework.
- Predictor: The Adams-Bashforth step estimates the next state based on a weighted sum of previous gradients.
- Corrector: The Adams-Moulton step refines that estimate by incorporating the gradient at the newly predicted state. This implicit corrector step acts as a stabilizer, preventing the "error explosion" often seen in long-horizon inversion tasks.
- Adaptive Step Size Adjustment (ASSA): The solver dynamically adjusts the integration step size based on local truncation error estimates. It takes larger steps in "smooth" regions of the flow and smaller, more precise steps in high-curvature regions, optimizing both speed and accuracy.
Mask Guided Feature Injection (MGFI)
To ensure that edits only affect the intended areas, the authors analyze the spatial consistency of Attention Values (V) between the inversion and sampling stages. By computing a pixel-wise cosine similarity map, the model identifies regions that should remain unchanged. This map generates a spatial mask that guides the fusion of features, "injecting" original structural details back into the non-edited regions of the generated image. This approach highlights that Attention Values are critical for maintaining structural integrity.
Experiments and Results
The researchers evaluated their method on high-resolution benchmarks, including PIE-Bench (700 images across 10 editing tasks) and the DCI Dataset (for quantitative reconstruction experiments).
Quantitative Performance
- Reconstruction: On the DCI dataset, ABM-Solver achieved a PSNR of 20.66 and an LPIPS of 0.1309 using only 15 steps. This significantly outperformed DDIM-Inversion, which required 50 steps to reach lower scores.
- Editing Quality: On PIE-Bench, the method achieved the highest Background Preservation (PSNR: 24.60) and CLIP Similarity (27.31), indicating superior adherence to text prompts while maintaining the original background.
Qualitative Fidelity
Visual results demonstrate that ABM-Solver avoids the "ghosting" or structural warping common in other methods when performing complex edits, such as changing a stream to a road or a cat to a tiger.
Conclusion
The ABM-Solver introduces a high-order numerical approach to Rectified Flow models, significantly improving image inversion and editing without requiring additional training. By achieving a global error of $O(\Delta t^2)$—a significant improvement over the $O(\Delta t)$ error of standard Euler methods—it provides a robust framework for high-fidelity image manipulation. Future work may extend this logic to video generation models, where temporal consistency makes inversion errors even more critical.
Summary updated