This guide walks you through cloning the repository, downloading the required model files, creating a virtual environment, installing dependencies, and running your first face swap. The entire process takes around ten minutes on a machine with a stable internet connection. CPU-only mode works without any GPU drivers, though a discrete GPU significantly improves real-time performance.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hacksider/Deep-Live-Cam/llms.txt
Use this file to discover all available pages before exploring further.
Deep-Live-Cam requires Python 3.11. Newer versions such as 3.13 are not supported, and versions below 3.9 are rejected at startup. On macOS, always invoke Python as
python3.11 if multiple versions are installed.Prerequisites
Before you begin, make sure the following tools are installed and available on yourPATH:
- Python 3.11 — python.org/downloads
- pip — bundled with Python 3.11
- git — git-scm.com
- ffmpeg — required for all video operations; Deep-Live-Cam will refuse to start without it
- Windows
- macOS
- Linux
Install ffmpeg with the one-liner from the README:Also install Visual Studio 2022 C++ Build Tools — several native Python packages require them to compile.
Setup steps
Download the models
Deep-Live-Cam needs two ONNX model files. Download both from HuggingFace and place them in the
models/ folder inside the repository:- GFPGANv1.4.onnx — face enhancement model
- inswapper_128_fp16.onnx — face swap model
All models are also listed at huggingface.co/hacksider/deep-live-cam if you need to re-download or add extras later.
Create a virtual environment
A virtual environment prevents dependency conflicts with other Python projects. Create and activate one now:Your shell prompt should now show
- Windows
- macOS
- Linux
(venv) to confirm the environment is active.Install dependencies
With the virtual environment active, install all required packages from Key packages installed include
requirements.txt:insightface==0.7.3, onnxruntime, opencv-python==4.10.0.84, opennsfw2==0.10.2, and PySide6 for the GUI. The exact runtime variant of ONNX Runtime is selected automatically based on your platform:- Apple Silicon (arm64):
onnxruntime-silicon==1.16.3 - Windows / Linux:
onnxruntime-gpu==1.23.2
Basic GUI usage
Once the window is open, you have two modes: Webcam mode (real-time)- Click Select a face and choose a source image containing the face you want to use.
- Select which camera to use from the camera dropdown.
- Click Live.
- Wait 10–30 seconds for the preview to appear.
- Use a screen capture tool such as OBS to capture the preview window for streaming or recording.
- Click Select a face and choose your source face image.
- Click Select a target and choose the image or video file you want to process.
- Click Start.
- The output file is saved in a directory named after the target file.
To change the source face during a live session, simply select a new image — the swap updates immediately without restarting.
CLI mode
Passing-s, -t, and -o arguments bypasses the GUI entirely and runs in headless mode:
| Flag | Description |
|---|---|
--execution-provider cuda | Use NVIDIA GPU |
--many-faces | Swap every detected face in the frame |
--mouth-mask | Preserve original mouth movements |
--map-faces | Use per-subject face mapping |
--keep-fps | Keep the original frame rate of the target video |
--keep-audio | Preserve original audio (default: true) |
--frame-processor face_enhancer | Add GFPGAN face enhancement to the pipeline |