Real-Time One-Shot Face Swap Script
I need a custom One-Shot Face Swap solution to replace a character's face in a target video (up to 2 minutes) using exactly one source photo from a user.
Strict Quality Requirements (The End Result):
Absolute Stability: The new face must be perfectly "glued" to the character. Zero flickering, zero jitter, zero shape-shifting across frames.
Complex Dynamics: The face must remain stable during fast movements, extreme head tilts, and 90-degree profile views.
Occlusion Handling: If the character is eating, drinking, or covers their face with a hand/hair, those foreground objects must stay perfectly intact and on top of the swapped face.
Workflow & Speed Requirements:
Pre-processing (No time limit): You can take as much time as you need to pre-process, analyze, and prepare the target video before the face generation starts.
Final Generation (Must be fast): Once the target video is pre-processed and the source photo is provided, the actual generation must be fast. Target speed: 2 to 4 minutes to generate a 2-minute video on a standard GPU (like RTX 3060).
Deliverables:
Working Python scripts only.
Clear instructions on how to install dependencies and run the scripts locally.
Note: I do NOT need web apps, UI, cloud deployment, or any backend integration. Just the working scripts.