Relightful Video Portrait Harmonization

Jun Myeong Choi, Jae Shin Yoon, Luchao Qi, Roni Sengupta, Joon-Young Lee

TL;DR

HarmoVid is a novel video diffusion framework that seamlessly harmonizes the lighting, color, and shadows of a foreground subject to match a new background video. By introducing a specialized lighting deflickering network and a dual-path training strategy, it overcomes the severe lack of paired real-world video training data to deliver state-of-the-art, temporally consistent video relighting.

HarmoVid framework aligns lighting between foreground and background.

What Problem Does This Paper Address?

Compositing a foreground video object (like a person) into a new background video realistically requires video harmonization—matching the foreground's illumination, color tone, and shadows to the new environment.

While image harmonization has come a long way, extending it to video introduces a massive hurdle: temporal consistency. If you apply an image-based harmonization model frame-by-frame, the subtle differences in how each frame is processed cause distracting visual flickering and shadow jitters.

Why not just train a deep learning model on a massive video dataset? Because paired real-world video data does not exist. It is practically impossible to record a human actor performing the exact same motion under dozens of different real-world lighting conditions. Purely synthetic data can be generated at scale, but it fails to capture the complex, subtle lighting-appearance interactions and realistic temporal behaviors of the real world.

Methods

The authors tackle this data scarcity problem with a clever three-step data synthesis and training pipeline:

The three-step pipeline for data synthesis and training.
  1. Expressive Paired Video Dataset Generation: They composite real foreground portrait videos onto diverse, synthetically generated background videos. They apply an off-the-shelf image harmonization model frame-by-frame to create an initial "pseudo-paired" dataset. As expected, this dataset suffers from severe temporal flickering.
  2. Lighting Deflickering Network: To "upgrade" this dataset, they train a specialized deflickering network based on a 3D latent diffusion transformer architecture (adapted from CogVideoX). Unlike standard video deflickerers that only smooth out global frame brightness, this network is designed to stabilize both global color transitions and complex local lighting variations (like moving cast shadows).
  3. Video Harmonization Network (HarmoVid): The final HarmoVid model uses the same 3D latent diffusion architecture but learns via a dual-path training strategy to bridge the real and synthetic domains:
  4. Real $\rightarrow$ Synthetic Path: Takes real foregrounds and synthetic backgrounds to generate harmonized synthetic videos, preserving the model's expressive relighting capabilities.
  5. Synthetic $\rightarrow$ Real Path: Takes synthetic foregrounds and real backgrounds to reconstruct a harmonized real video. This forces the model to inherit the physical plausibility and temporal smoothness of real-world video.

Additionally, they introduce Asymmetric Alpha Mask Conditioning. During the Synthetic $\rightarrow$ Real training path, they swap out harsh binary masks for smooth "pseudo-alpha" maps, teaching the network how to handle soft, natural transitions around tricky boundaries like hair.

Datasets

  • Training Data: The authors curated a dataset of 10,000 portrait videos from stock video sources. They used Grounded-SAM-2 to automatically segment the human subjects and extract foreground masks.
  • Evaluation Data: They reserved a subset of 200 videos for testing. To perform quantitative evaluations, they created two synthetic test sets by applying color Look-Up Tables (LUTs) to the foregrounds—one applied uniformly across all frames (to test harmonization quality) and one applied randomly per frame (to simulate severe flickering).

Key Insights and Ideas

  • Deflickering as a Data-Upgrading Tool: Instead of trying to fix flickering during the final harmonization training, the authors used a dedicated network to clean up their synthetic training data first. High-quality data yields a high-quality model.
  • The Dual-Path Synergy: Synthetic data provides expressiveness (a wide variety of lighting conditions), while real data provides physics and stability (natural shadows and smooth transitions). Combining both in separate training paths allows the model to capture the best of both worlds.
  • Boundary Awareness via Alpha Blending: By training with pseudo-alpha maps on real videos, HarmoVid becomes highly robust to imperfect masks during inference, avoiding the harsh, unnatural edges common in older compositing methods.

Key Results

HarmoVid significantly outperforms existing image-based and video-based state-of-the-art methods (including IC-Light, Relightful Harmonization, RelightVid, and Light-A-Video) across both spatial and temporal metrics.

  • Quantitative Quality: HarmoVid achieved a PSNR of 17.91 (outperforming the next best method's 15.89) and a significantly lower LPIPS (0.0554), indicating much higher perceptual fidelity.
  • Temporal Stability: It achieved the lowest Motion Preservation discrepancy (0.5264), proving it maintains smooth, realistic motion dynamics without introducing artifacts.
  • User Study: In a study with 33 participants, HarmoVid was overwhelmingly preferred, capturing 82% preference for temporal consistency and 72% for overall harmonization quality.
Qualitative comparison showing HarmoVid's superior shadow rendering and boundary blending.

Crucially, even though it was trained exclusively on human portraits, the model demonstrates excellent zero-shot generalization to non-portrait objects, such as animals.

HarmoVid generalizes effectively to non-portrait foreground objects.

Limitations and Future Work

While the paper demonstrates remarkable results, a few limitations are apparent:

  • Long Video Constraints: For videos longer than 85 frames, the model must rely on Temporal MultiDiffusion during inference to process chunks of video. While effective, this adds computational overhead and could potentially introduce long-horizon drift.
  • Upstream Dependencies: The quality of the dataset generation still bootstraps off the performance of an underlying image harmonization model and text-to-video generator; improvements in those foundational models will be necessary to scale HarmoVid's capabilities further.

Summary updated

BibTeX
@inproceedings{choi2026relightful,
  author = {Jun Myeong Choi and Jae Shin Yoon and Luchao Qi and Roni Sengupta and Joon-Young Lee},
  title = {{Relightful Video Portrait Harmonization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=lBioME6awj},
}
Figure