Skip to main content

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.

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.
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 your PATH:
  • Python 3.11python.org/downloads
  • pip — bundled with Python 3.11
  • gitgit-scm.com
  • ffmpeg — required for all video operations; Deep-Live-Cam will refuse to start without it
Install ffmpeg with the one-liner from the README:
iex (irm ffmpeg.tc.ht)
Also install Visual Studio 2022 C++ Build Tools — several native Python packages require them to compile.

Setup steps

1

Clone the repository

Clone the Deep-Live-Cam repository and enter the project directory:
git clone https://github.com/hacksider/Deep-Live-Cam.git
cd Deep-Live-Cam
2

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:After downloading, your directory should look like:
Deep-Live-Cam/
└── models/
    ├── GFPGANv1.4.onnx
    └── inswapper_128_fp16.onnx
All models are also listed at huggingface.co/hacksider/deep-live-cam if you need to re-download or add extras later.
3

Create a virtual environment

A virtual environment prevents dependency conflicts with other Python projects. Create and activate one now:
python -m venv venv
venv\Scripts\activate
Your shell prompt should now show (venv) to confirm the environment is active.
4

Install dependencies

With the virtual environment active, install all required packages from requirements.txt:
pip install -r requirements.txt
Key packages installed include 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
For NVIDIA GPU acceleration, install the CUDA-specific packages after the base requirements:
pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.21.0
Then launch with python run.py --execution-provider cuda.
5

Run Deep-Live-Cam

Start the application with:
python run.py
On macOS with multiple Python versions installed, use the explicit version:
python3.11 run.py
The GUI window will open. Deep-Live-Cam automatically selects the best available execution provider (CUDA > ROCM > CoreML > DirectML > CPU).
The first launch may download additional face analysis models (~300 MB). Keep your internet connection active until the GUI finishes loading.

Basic GUI usage

Once the window is open, you have two modes: Webcam mode (real-time)
  1. Click Select a face and choose a source image containing the face you want to use.
  2. Select which camera to use from the camera dropdown.
  3. Click Live.
  4. Wait 10–30 seconds for the preview to appear.
  5. Use a screen capture tool such as OBS to capture the preview window for streaming or recording.
Image / video mode (offline)
  1. Click Select a face and choose your source face image.
  2. Click Select a target and choose the image or video file you want to process.
  3. Click Start.
  4. 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:
python run.py -s path/to/source.jpg -t path/to/target.mp4 -o path/to/output.mp4
Common flags:
FlagDescription
--execution-provider cudaUse NVIDIA GPU
--many-facesSwap every detected face in the frame
--mouth-maskPreserve original mouth movements
--map-facesUse per-subject face mapping
--keep-fpsKeep the original frame rate of the target video
--keep-audioPreserve original audio (default: true)
--frame-processor face_enhancerAdd GFPGAN face enhancement to the pipeline

Build docs developers (and LLMs) love