Introduction
Relighting a subject in a video while simultaneously replacing the background is a cornerstone of modern film production and creative media. The primary challenge lies in achieving "Condition Consistency": ensuring the subject appears naturally integrated into the new environment—with accurate lighting, shadows, and reflections—while maintaining the original structural integrity and temporal stability.
Existing methods typically fall into two categories. Training-based approaches require massive, difficult-to-acquire paired datasets. Conversely, training-free (zero-shot) methods often suffer from "temporal flickering" and loss of fine detail when processing videos frame-by-frame. FlowPortal addresses these issues by introducing a novel framework that disentangles structure, motion, and illumination without requiring retraining.
Methodology
FlowPortal is built upon flow-based diffusion models (specifically Wan2.1) and introduces three key innovations to ensure high-fidelity results.
Residual-Corrected Flow (RCF)
The core of the framework is the Residual-Corrected Flow mechanism. The researchers define a "Consistency Residual Velocity," which represents the mathematical discrepancy between the model's prediction of the source video and the actual source frames. By injecting this residual back into the generation flow for the target video, the model is forced to respect the original structure (e.g., facial expressions, fine movements) while adapting to the new lighting conditions.
Decoupled Condition Design
To provide a stable visual anchor, FlowPortal utilizes a trio of inputs:
- Reference Frame: An initial frame relit using an image-based model (IC-Light).
- Structural Condition: Geometry-locking maps such as Depth, Canny, or HED edges.
- Textual Condition: Prompts describing the desired lighting and environment.
High-Frequency Transfer and Masked Generation
To maintain realism, the system uses Fourier decomposition to extract high-frequency textures from the original video and transfer them to the relit version. Additionally, a masked generation approach ensures the subject is relit while the background is synthesized from scratch, preventing "ghosting" artifacts from the original scene.
Experimental Setup
The authors evaluated FlowPortal on a diverse benchmark of 69 real-world video clips, including 54 human-centric videos, 8 animal scenes, and 7 object-focused clips. Performance was compared against state-of-the-art baselines such as AnyPortal, Light-A-Video, Lumen, and TC-Light using metrics like SSIM and CLIP-I.
Results and Discussion
FlowPortal demonstrates superior performance in both structural and temporal consistency. Qualitative analysis reveals the model's ability to handle complex lighting scenarios, such as backlighting through hair or sharp shadows that align perfectly with the generated background.
Key findings include:
- Efficiency: FlowPortal processes videos in approximately 3–5 minutes on an NVIDIA A100 GPU, significantly faster than competing zero-shot methods like AnyPortal, which can take up to 30 minutes.
- Temporal Smoothness: By treating the video as a continuous flow rather than independent frames, the model eliminates the jittery lighting common in previous zero-shot attempts.
- User Preference: In a study with 24 participants, FlowPortal was overwhelmingly preferred for its relevance to prompts and lighting quality.
Conclusion
FlowPortal introduces a robust, training-free solution for video relighting by leveraging Residual-Corrected Flow. By mathematically anchoring the generation process to the original video's structure, it achieves a level of temporal stability and visual fidelity previously reserved for expensive, training-heavy models. Future work may extend this "residual-corrected" approach to other video editing tasks such as stylization and object manipulation.
Project Page: gaowenshuo.github.io/FlowPortalProject/
Summary updated