FlowPortal: Residual-Corrected Flow for Training-Free Video Relighting and Background Replacement

Wenshuo Gao, Junyi Fan, Jiangyue Zeng, Shuai Yang · DOI

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.

FlowPortal enables high-fidelity video relighting and background replacement across diverse subjects.

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:

  1. Reference Frame: An initial frame relit using an image-based model (IC-Light).
  2. Structural Condition: Geometry-locking maps such as Depth, Canny, or HED edges.
  3. 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.

Example of complex backlighting and structural preservation in a boxing sequence.

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

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
69-pair real-world video-clip and relighting-prompt test setFlowPortalCLIP-T0.3271split: test · backbone=clip
Source quote
L313: FlowPortal (Ours) │ 0.3271 │ 0.9828 │ 0.8804 │ 0.8944 │ 41.2044 │ 0.7328 │ 57.4 │ 58.4 │ 52.2 │ 54.2
69-pair real-world video-clip and relighting-prompt test setFlowPortalStructural Cons.0.8804split: test · backbone=clip
Source quote
L313: FlowPortal (Ours) │ 0.3271 │ 0.9828 │ 0.8804 │ 0.8944 │ 41.2044 │ 0.7328 │ 57.4 │ 58.4 │ 52.2 │ 54.2
69-pair real-world video-clip and relighting-prompt test setFlowPortalMotion Cons.0.8944split: test · backbone=clip
Source quote
L313: FlowPortal (Ours) │ 0.3271 │ 0.9828 │ 0.8804 │ 0.8944 │ 41.2044 │ 0.7328 │ 57.4 │ 58.4 │ 52.2 │ 54.2
69-pair real-world video-clip and relighting-prompt test setFlowPortalDetail Cons.41.2044split: test · backbone=clip
Source quote
L313: FlowPortal (Ours) │ 0.3271 │ 0.9828 │ 0.8804 │ 0.8944 │ 41.2044 │ 0.7328 │ 57.4 │ 58.4 │ 52.2 │ 54.2
BibTeX
@inproceedings{gao2026flowportal,
  author = {Wenshuo Gao and Junyi Fan and Jiangyue Zeng and Shuai Yang},
  title = {{FlowPortal: Residual-Corrected Flow for Training-Free Video Relighting and Background Replacement}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=eOkaVskOPQ},
}
Figure