Latest release faceswap with server setup - training

Want to use Faceswap in The Cloud? This is not directly supported by the Devs, but you may find community support here

Forum rules

Read the FAQs and search the forum before posting a new topic.

NB: The Devs do not directly support using Cloud based services, but you can find community support here.

Please mark any answers that fixed your problems so others can find the solutions.

User avatar
Posts: 22
Joined: Tue Jun 30, 2020 3:37 pm
Has thanked: 7 times
Been thanked: 5 times

Latest release faceswap with server setup - training

Post by »

If you wonder how to train using or any cloud servers with latest faceswap or if you run across issues with r1.0 edition on cloud servers, then you are like me.

After much of research and reading, below is what got me a successful cloud training server. The configuration is for Ubuntu servers with >15Gb disk space and at least 1 NVIDIA GPU.

Step 1 : Once you ssh into the server, do an update

Code: Select all

apt-get update

Step 2: Install wget and other utils. this will help you with anaconda installation

Code: Select all

apt-get install -y wget git nano p7zip-full

Step 3 -

Code: Select all


You can get the latest release anaconda for linux from the anaconda website. Just put the download link to the .sh file in above after wget.

Ste 4 - install anaconda using the step 3 downloaded sh file. Enter yes and check installation path if you would like to change.

Code: Select all

bash <fileName>.sh

Step 5 - Initialize conda virtual environment management using

Code: Select all

source ~/.bashrc

Step 6 - Create your faceswap environment. Use any name of your choice
python version is important for the latest release. I recommend 3.7

Code: Select all

conda create --name faceswap python==3.7

Activate faceswap

Code: Select all

conda activate fswp

Step 7 - install 2.2.0 version of tensorflow gpu. this is most important

Code: Select all

conda install tensorflow-gpu==2.2.0

Stepp 8 - install other libraries. Might need for ui and few code components. better to install

Code: Select all

apt-get install -y libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6

Step 9 - Clone faceswap from repo

Code: Select all

git clone --depth 1

And then finally,

Code: Select all


You are good to go once you set the training and other options on config.


If you land up in error with a clod server coming up with a pre-existing tensorflow, then ensure version is 2.2.0.
Else uninstall the existing and install 2.2.0 and repeat from step 6

pip uninstall tensorflow-gpu
pip uninstall keras
pip install tensorflow-gpu==2.2.0
pip install keras