Abstract
DreamSwapV is a novel, end-to-end diffusion framework designed for seamless subject swapping in videos using a single reference image and a mask. By framing subject swapping as a video inpainting task, the model effectively blends new subjects into existing environments. The framework introduces an adaptive mask strategy to prevent shape leakage and a condition fusion module for efficient feature injection. Evaluated on the new DreamSwapV-Benchmark, the method outperforms existing state-of-the-art models in visual fidelity and temporal consistency.
Introduction
The ability to edit subjects within a video—such as changing a character's clothing or swapping a handheld object—while preserving motion and background is a highly sought-after capability in AI video generation. Current approaches typically fall into two categories: domain-specific tools which lack versatility, and general-purpose editors which often struggle with fine details or require intensive per-subject fine-tuning. DreamSwapV bridges this gap by providing a subject-agnostic, tuning-free framework for high-quality video editing.
Methodology
DreamSwapV is built upon the Wan2.1 Diffusion Transformer (DiT) and treats the swapping process as a video inpainting problem. By masking the original subject, the model is tasked with reconstructing the region using a target reference image. This approach ensures the model inherently learns to respect the boundaries and lighting of the original scene.
Key Technical Innovations
- Condition Fusion Module: Rather than employing a separate, computationally heavy network like ReferenceNet, DreamSwapV concatenates reference latents directly in the temporal dimension. This approach minimizes overhead and prevents spatial-temporal misalignment.
- Adaptive Mask Strategy: To avoid "shape leakage"—where the new subject is constrained by the old subject's silhouette—the model uses grid-based mask augmentation. The grid size is scaled inversely to the subject's size, ensuring fine control for large subjects and flexibility for small ones.
- Shape Augmentation and Tunnel Inpainting: Random geometric shapes are added to mask edges during training to improve background reconstruction. For small objects, "tunnel inpainting" crops a tight region around the mask during inference to focus the model's attention, supported by a specialized loss function.
Experiments and Results
The authors introduced the DreamSwapV-Benchmark, featuring 100 videos and 167 subject instances across various complexities. In quantitative evaluations, DreamSwapV achieved a leading VBench Average of 80.44% and a Total Average of 71.41%. Qualitative user studies further confirmed its superiority in reference detail preservation, subject-environment interaction, and visual fidelity compared to models like Kling 1.6 and AnyV2V. Unlike some commercial models that may regenerate entire backgrounds, DreamSwapV consistently maintains the original video context while executing the swap.
Conclusion
DreamSwapV provides a robust, extensible foundation for video subject swapping. While challenges remain in handling extreme domain gaps between reference images and video contexts, the framework's reliance on a strong inpainting foundation makes it a versatile tool for various video editing tasks, including virtual try-on and object addition. Future work may focus on improving handling for disparate reference-to-video scales.
Summary updated