Abstract
Video inpainting remains a challenging task due to the dual requirements of temporal consistency and computational efficiency. We present FloED (Flow-guided Efficient Diffusion), a novel framework that integrates a dedicated optical flow branch with a training-free latent interpolation technique. By leveraging motion guidance and reducing redundant denoising steps, FloED achieves state-of-the-art visual quality and temporal smoothness while significantly improving inference speed.
Introduction
Video inpainting—the process of removing unwanted objects or restoring missing backgrounds—has seen significant advancements with the advent of diffusion models. However, two primary bottlenecks persist: temporal inconsistency (flickering) and high computational costs due to the iterative nature of diffusion. Existing methods often struggle with "spatial-temporal disharmony," where inpainted regions fail to match the surrounding environment's lighting or texture.
FloED addresses these issues by introducing a dual-branch architecture that combines the generative capabilities of Stable Diffusion with structural guidance from optical flow.
Methodology
The FloED framework is built upon several key innovations designed to enhance both quality and efficiency.
Dual-Branch Architecture and Motion Guidance
The system utilizes a primary inpainting branch (based on Stable Diffusion and AnimateDiff) alongside a time-agnostic flow branch. This flow branch completes missing optical flow in masked regions, which is then injected into the main UNet's decoder via multi-scale flow adapters. This ensures that generated pixels adhere to the physical motion of the scene.
Anchor Frame Strategy
To establish a high-quality reference, FloED employs an "anchor frame" strategy. A single frame is first inpainted using a powerful image-based model. This frame serves as a consistent target for texture and lighting across the entire video sequence, mitigating the common issue of temporal drift in generative models.
Efficiency via Latent Interpolation
A core contribution of FloED is the Training-Free Latent Interpolation. Recognizing that adjacent video frames are highly redundant, the model performs full denoising only on even-indexed frames. For odd-indexed frames, it uses the completed optical flow to warp the latents from the previous step. This approach effectively halves the early-stage denoising workload. Additionally, a Flow Attention Cache stores expensive attention computations from the first step for reuse, further accelerating the process.
Experimental Results
FloED was evaluated on a new benchmark of 100 diverse videos, covering both object removal and background restoration tasks.
Quantitative and Qualitative Performance
The model achieved a PSNR of 29.17, significantly outperforming competitors like CoCoCo (23.08). It also demonstrated a lower flow warping error ($E_{warp}$), indicating superior temporal smoothness. Qualitative results show that FloED maintains high fidelity in complex scenes with varying camera speeds.
Efficiency and User Preference
The optimization techniques resulted in a 13.4% speedup per frame. In user studies, FloED was preferred over 56% of the time for object removal and over 62% for background restoration, highlighting its practical effectiveness.
Conclusion
FloED represents a significant step forward in video inpainting by treating optical flow as both a structural guide and a computational shortcut. While the reliance on pre-completed flow from external models like RAFT presents a potential bottleneck if initial estimations are poor, the framework's ability to achieve high-quality, flicker-free results efficiently makes it a robust solution for modern video editing tasks. Future work will explore tighter integration of flow estimation within the diffusion process.
Summary updated