Skip to content

HxgxJdhsns/deepfake-3.1

Repository files navigation

Deep-Fake-Cam

Benji special

This deepfake software is designed to be a productive tool for the AI-generated media industry. It can assist artists in animating custom characters, creating engaging content, and even using models for clothing design.

I am aware of the potential for unethical applications and are committed to preventative measures. A built-in check prevents the program from processing inappropriate media (nudity, graphic content, sensitive material like war footage, etc.). We will continue to develop this project responsibly, adhering to the law and ethics. We may shut down the project or add watermarks if legally required.

  • Ethical Use: Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online.

  • Content Restrictions: The software includes built-in checks to prevent processing inappropriate media, such as nudity, graphic content, or sensitive material.

  • Legal Compliance: We adhere to all relevant laws and ethical guidelines. If legally required, we may shut down the project or add watermarks to the output.

  • User Responsibility: We are not responsible for end-user actions. Users must ensure their use of the software aligns with ethical standards and legal requirements.

By using this software, you agree to these terms and commit to using it in a manner that respects the rights and dignity of others.

Exclusive v2.0 Quick Start - Pre-built (Windows)

This is the fastest build you can get if you have a discrete NVIDIA or AMD GPU.
These Pre-builts are perfect for non-technical users or those who don't have time to, or can't manually install all the requirements. Just a heads-up: this is an open-source project, so you can also install it manually. This will be 60 days ahead on the open source version.

TLDR; Live Deepfake in just 3 Clicks

easysteps

  1. Select a face
  2. Select which camera to use
  3. Press live!

4. Install Dependencies

I highly recommend using a venv to avoid issues.

For Windows:

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

For Linux:

# Ensure you use the installed Python 3.10
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

For macOS:

Apple Silicon (M1/M2/M3) requires specific setup:

# Install Python 3.10 (specific version is important)
brew install python@3.10

# Install tkinter package (required for the GUI)
brew install python-tk@3.10

# Create and activate virtual environment with Python 3.10
python3.10 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

** In case something goes wrong and you need to reinstall the virtual environment **

# Deactivate the virtual environment
rm -rf venv

# Reinstall the virtual environment
python -m venv venv
source venv/bin/activate

# install the dependencies again
pip install -r requirements.txt

Run: If you don't have a GPU, you can run Deep-Live-Cam using python run.py. Note that initial execution will download models (~300MB).

GPU Acceleration

CUDA Execution Provider (Nvidia)

  1. Install CUDA Toolkit 11.8.0
  2. Install dependencies:
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.16.3
  1. Usage:
python run.py --execution-provider cuda

CoreML Execution Provider (Apple Silicon)

Apple Silicon (M1/M2/M3) specific installation:

  1. Make sure you've completed the macOS setup above using Python 3.10.
  2. Install dependencies:
pip uninstall onnxruntime onnxruntime-silicon
pip install onnxruntime-silicon==1.13.1
  1. Usage (important: specify Python 3.10):
python3.10 run.py --execution-provider coreml

Important Notes for macOS:

  • You must use Python 3.10, not newer versions like 3.11 or 3.13
  • Always run with python3.10 command not just python if you have multiple Python versions installed
  • If you get error about _tkinter missing, reinstall the tkinter package: brew reinstall python-tk@3.10
  • If you get model loading errors, check that your models are in the correct folder
  • If you encounter conflicts with other Python versions, consider uninstalling them:
    # List all installed Python versions
    brew list | grep python
    
    # Uninstall conflicting versions if needed
    brew uninstall --ignore-dependencies python@3.11 python@3.13
    
    # Keep only Python 3.10
    brew cleanup

CoreML Execution Provider (Apple Legacy)

  1. Install dependencies:
pip uninstall onnxruntime onnxruntime-coreml
pip install onnxruntime-coreml==1.13.1
  1. Usage:
python run.py --execution-provider coreml

DirectML Execution Provider (Windows)

  1. Install dependencies:
pip uninstall onnxruntime onnxruntime-directml
pip install onnxruntime-directml==1.15.1
  1. Usage:
python run.py --execution-provider directml

OpenVINO™ Execution Provider (Intel)

  1. Install dependencies:
pip uninstall onnxruntime onnxruntime-openvino
pip install onnxruntime-openvino==1.15.0
  1. Usage:
python run.py --execution-provider openvino

Usage

1. Image/Video Mode

  • Execute python run.py.
  • Choose a source face image and a target image/video.
  • Click "Start".
  • The output will be saved in a directory named after the target video.

2. Webcam Mode

  • Execute python run.py.
  • Select a source face image.
  • Click "Live".
  • Wait for the preview to appear (10-30 seconds).
  • Use a screen capture tool like OBS to stream.
  • To change the face, select a new source image.

Thank you - Benji