Skip to content
DeepFaceLab utilizes deep learning to recognize and swap faces in pictures and videos.
Branch: master
Clone or download
Pull request Compare This branch is 43 commits ahead, 37 commits behind iperov:master.
Latest commit c8372d0 Mar 30, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github upd Jan 24, 2019
converters fix conversion speed Mar 28, 2019
doc upd manual Mar 29, 2019
facelib refactoring Mar 26, 2019
imagelib Converter: added Apply super resolution? (y/n skip:n) : , Enhance det… Mar 28, 2019
interact upd for Colab (iperov#206) Mar 26, 2019
joblib refactorings, optimizations Mar 21, 2019
localization DockerFile for Mac users to run DeepfaceLab with CPU Mode (iperov#95) Jan 1, 2019
mainscripts Merge remote-tracking branch 'upstream/master' Mar 30, 2019
mathlib removing trailing spaces Mar 19, 2019
models Converter: added Apply super resolution? (y/n skip:n) : , Enhance det… Mar 28, 2019
nnlib changing SubpixelUpscaler to variable H,W dims, Mar 28, 2019
samplelib rename samples to samplelib Mar 27, 2019
CODEGUIDELINES Rename to Mar 12, 2019
LICENSE Update Mar 30, 2019 fix Mar 26, 2019
requirements-colab.txt upd for Colab (iperov#206) Mar 26, 2019

Installation for Ubuntu 16.04

An installation script has been created to automatically install all of the required dependencies for Ubuntu 16.04. Clone the repository and run from the root directory of DeepFaceLab_Linux.

Installation for Ubuntu 18.04

Add NVIDIA package repositories

sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys
sudo apt-get update

Install NVIDIA Video Driver

sudo apt-get install --no-install-recommends nvidia-driver-418

Reboot your system.

Easy Method

Install Anaconda3

Download the installer Install Anaconda3 and choose the defaults. You will also need to add conda to your path so you can complete the final steps.

Install DeepFaceLab

conda create -y -n deepfacelab python=3.6.6 cudatoolkit=9.0 cudnn=7.3.1
conda activate deepfacelab
git clone
cd DeepFaceLab_Linux
python -m pip install -r requirements-cuda.txt

Harder Alternate Method

For this method, we will create an Ubuntu 16.04 container on your system. In order to do this, we will need to install and configure LXD.

sudo snap install lxd
sudo lxd init
sudo adduser "$USER" lxd

Reboot or logout so the new group membership can take effect

After you have finished installing and configuring lxd to your needs. We will now need to create the container.

echo "root:$UID:1" | sudo tee -a /etc/subuid /etc/subgid #Only run once and never again!
wget #Thanks to Simos Xenitellis for his GUI LXC profile!
lxc profile create gui
cat lxdguiprofile.txt | lxc profile edit gui
lxc launch --profile default --profile gui ubuntu:16.04 deepfacelab
# Wait 30s so the environment can fully setup without issue.
# Logging in before the inital setup is done can cause problems.
# The next command will fix the DeepFaceLab GUI to allow it to show up correctly.
lxc exec deepfacelab -- sh -c "echo 'export QT_X11_NO_MITSHM=1' >> /home/ubuntu/.bashrc"

You can now access your container at any time with the following command

lxc exec deepfacelab -- su ubuntu

While in the container, change to your home directory with cd ~\ and then run the installation instructions for Ubuntu 16.04 and you will have created an identical environment.

WARNING: Make sure you install the same video driver in the container as installed in the host!

You can’t perform that action at this time.