TL;DR
Current video generative models struggle with realistic object insertion and layer decomposition because they lack an explicit understanding of video layers and their physical interactions (like shadows and reflections). To solve this, the authors introduce TriLayer, a first-of-its-kind dataset of aligned video triplets (composite, background, and RGBA foreground), alongside DBL-Diffusion, a dual-branch diffusion framework that jointly models scene appearance and layer structure. This explicit layer modeling approach yields state-of-the-art results, enabling highly realistic video object insertion and clean layer separation.
What Problem Does This Paper Address?
Whether you want to seamlessly insert a dynamic object into a video clip or cleanly extract an object to swap the background, video editing requires a deep understanding of layers. However, most modern generative video models operate entirely within the flat RGB domain. Without an explicit concept of foreground, background, and their physical interactions, existing methods suffer from major drawbacks:
- Object Insertion: Inpainting-based methods implicitly force the object into a masked region, frequently distorting the surrounding background and failing to generate realistic, object-induced effects like shadows or reflections outside the mask.
- Layer Decomposition: Existing separation methods rely on slow, per-scene optimization or unconstrained implicit inference, leading to unstable results and poor generalization.
The root cause of these limitations is the lack of explicit foreground-layer supervision in training data. This paper bridges the gap by providing both the necessary dataset and a novel architecture designed to handle explicit video layers.
Methods
The core architectural innovation is DBL-Diffusion (Dual-Branch Layered Diffusion), built on top of a 1.3B parameter diffusion transformer backbone (Wan2.1-VACE).
Instead of generating a single RGB video, the framework splits the task into two distinct branches:
- RGB Branch: Models scene-level appearance (e.g., the full composite or the clean background).
- RGBA Branch: Predicts the explicit foreground layer, capturing both the object's appearance and its alpha matte (transparency), which includes semi-transparent effects like smoke, reflections, and shadows.
To ensure these branches stay physically and geometrically aligned, they communicate bidirectionally via joint cross-attention at every transformer block. The authors also introduce two clever training techniques to stabilize this multi-branch setup:
- Hybrid LoRA-DoRA Training: The RGB branch operates in-domain and is tuned using standard LoRA. The RGBA branch, however, must learn out-of-domain concepts like alpha mattes and transparency. To handle this distribution shift, the authors apply DoRA (Weight-Decomposed Low-Rank Adaptation) to the RGBA branch, ensuring stable optimization.
- Disentangled Timestep Sampling: Rather than forcing both branches to share the same noise level, the model samples independent timesteps ($t_x, t_y$) for each branch within a rectified-flow framework, balancing the distinct learning dynamics of RGB appearance and RGBA structure.
The framework is instantiated into two specialized models: DBL-Insert for layered object insertion and DBL-Decompose for video layer decomposition.
Datasets
The authors introduce TriLayer, a large-scale triplet video dataset containing 3,964 fully aligned video triplets spanning 229 object categories. Each triplet contains:
- A composite video showing the final scene.
- A clean background video with the object and its visual effects entirely removed.
- An RGBA foreground video capturing the object along with its associated shadows, reflections, and transparency.
To build TriLayer, the authors developed a multi-stage pipeline combining automated vision-language model (VLM) filtering (using Qwen2.5-VL-32B), mask extraction (Grounded-SAM2), background inpainting (ROSE), and extensive human verification.
For evaluation, they also introduced LayeredVid-Benchmark, a dataset of 85 high-quality, 5-second videos (81 frames each) designed to test generalization across diverse real-world scenarios.
Key Insights and Ideas
- Disentangling Appearance from Structure: By separating the network into RGB and RGBA branches, the model doesn't have to compromise RGB texture generation to accommodate alpha channel logic. The joint cross-attention ensures that scene lighting and object geometry naturally influence one another.
- Learning Physical Interactions via Supervision: Rather than hoping a model implicitly figures out how a shadow falls on a specific background texture, providing explicit triplet data allows the network to directly learn the mapping of object-induced visual effects.
- Asymmetric Parameter Tuning: Tailoring the low-rank adaptation method (LoRA vs. DoRA) based on whether a branch is performing an in-domain or out-of-domain task is a highly effective strategy for stabilizing complex multi-branch diffusion models.
Key Results
Video Object Insertion (DBL-Insert)
DBL-Insert achieves a superior balance across text-video alignment, subject consistency, and compositing quality compared to state-of-the-art models like AnyV2V and ReVideo.
- Quantitative: It achieved the highest subject consistency scores (CLIP-I: 0.796, DINO-I: 0.747) and text-alignment scores (ViCLIP-T: 24.767).
- User Study: In a user study with 20 participants, DBL-Insert was preferred by a landslide, capturing 61.5% overall quality preference, compared to just 15.5% for the next best method (VACE-Inp).
Video Layer Decomposition (DBL-Decompose)
When separating videos into layers, DBL-Decompose significantly outperformed optimization-based baselines like Gen-Omnimatte. While traditional reconstruction-based methods sometimes score higher on strict pixel-matching metrics (like PSNR) due to direct optimization, DBL-Decompose leverages generative diffusion priors to create much more visually plausible and temporally coherent backgrounds, achieving a superior Fréchet Inception Distance (FID) of 16.340 on Kubric-BG and 14.527 on Movie-BG.
Limitations and Future Work
Despite the impressive visual fidelity, the authors note two primary limitations:
- Complex Physical Interactions: The model still occasionally struggles to perfectly capture highly dynamic motions and complex physical interactions between objects and scenes.
- Computational Overhead: The dual-branch architecture is computationally heavy. Currently, inference takes approximately one hour per video case on a single NVIDIA A100 80GB GPU.
Future work will focus on optimizing the framework's efficiency for faster inference and extending the architecture to better model complex physical dynamics.
Summary updated