From Inpainting to Editing: Unlocking Robust Mask-Free Visual Dubbing via Generative Bootstrapping

Xu He, Haoxian Zhang, Hejia Chen, Changyuan Zheng, Liyang Chen, Songlin Tang, Jiehui Huang, Xiaoqiang Liu, Pengfei Wan, Zhiyong Wu

TL;DR

X-Dub introduces a novel two-stage "generative bootstrapping" framework that unlocks high-fidelity, mask-free visual dubbing using Diffusion Transformers (DiTs). By repurposing a traditional mask-based inpainting model purely to generate high-quality pseudo-paired training data, it trains a robust video-to-video editing model that utilizes the full spatiotemporal context of the input video. This completely eliminates the identity drift, lip leakage, and occlusion artifacts typical of traditional mask-guided methods.

What Problem Does This Paper Address?

Visual dubbing—the task of altering a speaker's lip movements in an existing video to match a new audio track—suffers from a fundamental data scarcity problem: it is virtually impossible to collect pairs of real-world videos where the speaker, pose, background, and lighting are completely identical, differing only in lip motion.

To circumvent this, existing state-of-the-art methods rely on mask-guided inpainting. They mask out the mouth region during training and force the model to reconstruct it based on audio. However, this approach introduces severe limitations:

  1. Spatiotemporal Disruption: Masking destroys the local context, forcing the model to hallucinate details like shifting shadows, lighting, or facial occlusions, which leads to identity drift and visual artifacts.
  2. Lip-Shape Leakage: Information often leaks through mask boundaries or adjacent facial movements (like the jaw and cheeks), causing the model to take visual-to-visual shortcuts instead of truly aligning the lips to the audio.

Methods

X-Dub shifts the paradigm from inpainting (filling in a hole) to editing (transforming a complete video) via a two-stage pipeline:

Figure 2. Overview of X-Dub. Stage I (Data Construction): We formulate a mask-guided inpainter as a data generator to create pseudo-paired data (identical context, altered lips) via a dedicated curation pipeline. Stage II (Mask-Free Dubbing): These pairs bootstrap a mask-free video dubber that learns to dub directly from complete video inputs, overcoming mask limitations. Crucially, our multi-phase strategy disentangles training by aligning specific diffusion phases with structure, lip, and texture objectives.
  • Stage I: Pseudo-Paired Data Construction: The authors train a specialized mask-guided inpainting model ($G_{mask}$) on large-scale unlabeled data. Instead of using this model for final inference, it is used exclusively as a data generator. By feeding it alternative speech tracks from the same speaker, they synthesize dubbed counterparts ($V_{syn}$) of real videos ($V_{real}$), creating a massive, photorealistic dataset of pseudo-paired videos.
  • Stage II: Mask-Free Video Dubbing: A mask-free editing model ($G_{free}$) is trained to reconstruct the authentic source video ($V_{real}$) from its synthetic counterpart ($V_{syn}$), conditioned on the original speech. Because it takes the full, unmasked video as input, it naturally retains global structure, background consistency, and fine textures.

To make this architecture work seamlessly, the authors introduced two key technical innovations:

  • Timestep-Adaptive Multi-Phase Learning: Balancing global structure, lip sync, and fine textures simultaneously often causes training to collapse. Capitalizing on the inherent frequency bias of diffusion models, the authors decoupled training into three progressive phases using lightweight LoRA experts: high-noise timesteps focus on global structure, mid-noise timesteps optimize lip motion (supervised by an auxiliary SyncNet loss), and low-noise timesteps refine fine textures and identity details.
  • Token-Based Reference Conditioning: Instead of rigidly fusing reference frames via channel concatenation (which harms lip flexibility), X-Dub patchifies and concatenates reference and target video latents along the frame axis, allowing the DiT's 3D self-attention mechanism to dynamically transfer identity traits without disturbing lip movements.
Figure 3. Conditioning structure. References (sparse frames for inpainter; full video for editor) are concatenated with the target for 3D self-attention, while audio is injected via cross-attention.

Datasets

  • HDTF (High-Definition Talking Face): Used as a standard academic dataset for quantitative evaluation.
  • 3D Talking Head Rendering Data: 10 hours of perfectly aligned talking head data generated via Unreal Engine (MetaHuman) to anchor precise lip edits during training.
  • X-DubBench: A new, highly challenging benchmark introduced by the authors to evaluate dubbing in the wild. It consists of 440 video-audio pairs featuring real-world and AI-generated content, complex motions, heavy occlusions, stylized/non-human characters (e.g., cartoon animals, mecha robots), and multi-lingual audio (including both speech and singing).

Key Insights and Ideas

  • Shifting the Burden of Masking: Instead of forcing the model to handle messy mask constraints during unpredictable final inference, X-Dub pushes masking entirely into a controlled data-preparation phase where imperfections can be filtered out using automated quality metrics.
  • The Student Surpasses the Teacher: A fascinating "self-bootstrapping" effect occurs in Stage II. Because the mask-free model ($G_{free}$) uses the pristine real video as its target supervision, it learns to treat the synthesis artifacts of the data generator ($G_{mask}$) as noise to be suppressed. As a result, the final model actually delivers better lip sync and identity preservation than the data it was trained on.
  • Divide and Conquer via Noise Levels: Trying to optimize pixel-level texture details at the same time as macro-level head poses creates conflicting gradient objectives. Specializing LoRA experts to activate only within specific diffusion timestep windows provides a elegant solution to this optimization bottleneck.

Key Results

  • State-of-the-Art Performance: On the standard HDTF dataset, X-Dub significantly outperformed existing diffusion and GAN-based baselines, achieving a 12.6% reduction in Frechet Inception Distance (FID) and a 4.3% improvement in identity retention (CSIM).
  • Extreme Robustness: On the diverse X-DubBench, X-Dub achieved a 96.4% generation success rate, whereas traditional mask-based methods frequently suffered from severe visual collapse or runtime failures due to missing face landmarks on stylized or heavily occluded characters.
  • Eliminating Lip Leakage: Qualitatively, X-Dub completely eliminates the common "open-mouth artifact" during silent pauses, a notorious issue in mask-based pipelines where the model fails to realize the speaker has stopped talking.

Limitations and Future Work

  • Inference Speed: As a Diffusion Transformer model, X-Dub is computationally heavier than lightweight GAN-based approaches (like Wav2Lip). Processing a 3-second video takes roughly 60 seconds on a single NVIDIA A100 GPU using 50 denoising steps. While the authors demonstrated that this can be optimized down to ~25 seconds by pruning denoising steps to 25 and using test-time caching (e.g., TeaCache), real-time deployment remains a challenge.
  • Safety and Misuse Risks: The exceptional photorealism and identity-preservation capabilities of X-Dub heighten concerns regarding deepfakes and unauthorized identity impersonation. The authors emphasize the need for the research community to develop robust detection mechanisms alongside these generation frameworks.

Summary updated

BibTeX
@inproceedings{he2026from,
  author = {Xu He and Haoxian Zhang and Hejia Chen and Changyuan Zheng and Liyang Chen and Songlin Tang and Jiehui Huang and Xiaoqiang Liu and Pengfei Wan and Zhiyong Wu},
  title = {{From Inpainting to Editing: Unlocking Robust Mask-Free Visual Dubbing via Generative Bootstrapping}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=PfhSH42cCy},
}
Figure