Taming Rectified Flow for Inversion and Editing

Jiangshan Wang, Junfu Pu, Zhongang Qi, J. Guo, Yue Ma, Nisha Huang, Yuxin Chen, Xiu Li, Ying Shan

arXiv:2411.04746 · 2026-07-27 공개 · arXiv · PDF

diffusion-transformer image-editing video-editing rectified-flow ode-solver feature-sharing inversion taylor-expansion

Abstract

Rectified-flow-based diffusion transformers like FLUX and OpenSora have demonstrated outstanding performance in the field of image and video generation. Despite their robust generative capabilities, these models often struggle with inversion inaccuracies, which could further limit their effectiveness in downstream tasks such as image and video editing. To address this issue, we propose RF-Solver, a novel training-free sampler that effectively enhances inversion precision by mitigating the errors in the ODE-solving process of rectified flow. Specifically, we derive the exact formulation of the rectified flow ODE and apply the high-order Taylor expansion to estimate its nonlinear components, significantly enhancing the precision of ODE solutions at each timestep. Building upon RF-Solver, we further propose RF-Edit, a general feature-sharing-based framework for image and video editing. By incorporating self-attention features from the inversion process into the editing process, RF-Edit effectively preserves the structural information of the source image or video while achieving high-quality editing results. Our approach is compatible with any pre-trained rectified-flow-based models for image and video tasks, requiring no additional training or optimization. Extensive experiments across generation, inversion, and editing tasks in both image and video modalities demonstrate the superiority and versatility of our method. The source code is available at https://github.com/wangjiangshan0725/RF-Solver-Edit.

한국어 요약

한 줄 요약

RF-Solver와 RF-Edit을 제안하여, Rectified Flow 기반 모델의 인버전 정확도와 편집 성능을 훈련 없이 향상시킨다.

핵심 기여도

핵심 아이디어

기존 Rectified Flow 모델은 ODE 해결 과정에서 누적 오류로 인해 인버전 정확도가 낮아, 편집 성능에 제한이 있었다. 이를 해결하기 위해, RF-Solver는 ODE의 정확한 수식을 유도하고, 고차 Taylor 전개를 통해 비선형 성분을 추정함으로써 각 타임스텝에서의 오류를 줄였다. 이는 기존 Euler 방법 대비 더 정밀한 ODE 해결을 가능하게 한다.

RF-Edit은 인버전 과정에서 self-attention의 value 특성(𝒱)을 저장하고, 편집 과정에서 해당 특성을 활용함으로써 원본 구조를 유지하면서도 편집 품질을 향상시킨다. 특히, FLUX와 OpenSora의 DiT 구조를 백본으로 사용하여 이미지와 영상 편집에 모두 적용 가능하다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용