Installing Faceswap on Linux is a breeze. The Linux installer installs everything you need except for your Graphics drivers.
We recommend using a lightweight Distribution (such as Xubuntu) but the installer should work fine on all Linux flavors.
If you are using a Graphics card (which is highly recommended. Faceswapping on CPU is incredibly slow), then make sure your drivers are up to date.
Download the Faceswap Installer
Open up a terminal emulator, navigate to the download location then enter the following command as a normal user (do not execute this command as sudo or root):
Code: Select all
bash ./faceswap_setup_x64.sh
The Faceswap Logo will display followed by some information. Make sure you read it thoroughly (specifically the part about user permissions on destination folders) then press Enter to continue.
Conda
Faceswap uses Conda as it handles the installation of all prerequisites (git, Cuda, Tensorflow etc) and contains them within their own environment, away from the rest of your system.If an existing Conda install is found you will be asked if you want to use it. You should select Yes. These next options will only be displayed if an existing Conda install was not found, or if you select No to using the existing Conda install.
The default install location for Conda will be fine in 99% of cases. If you do wish to install it elsewhere, then make sure that:
Your user has permissions to write to the location you select.
There are no spaces in the location that you provide (this is a Conda limitation and is outside of our control).
If you are happy with the default location then just press Enter
You will be asked if you want to add Conda to PATH. This is up to you, but it will make life easier if you say Yes. It basically means that you will have access to the
conda
command from the command line, and won't need to search for the executable inside theminiconda3
folder. Hit Enter to select the default value or press n if you don't want Conda added to your path.Faceswap is run inside a "virtual environment". This is a Python environment that is kept separate from the rest of your system to avoid conflicts. The environment needs a name. The default should be fine, but if you have multiple installs then you will want to set a specific environment name here. NB: If an environment already exists with the name you select then it will be deleted (you will be notified if this will occur prior to commencing install). Press Enter to use the default
faceswap
or enter your preferred name here.
Faceswap
The location that you want Faceswap installed to. The default will be fine in 99% of cases, but as with the Conda install, if you do select a different location, then make sure your user has permission to write to it. NB: If a folder pre-exists at the location given, then it will be deleted (you will be notified if this will occur prior to commencing install). Press Enter to use the default location or enter your preferred location here.
Faceswap can be run on Nvidia or AMD GPUs or on CPU. The software it installs varies depending on what you select here, so make sure you select the correct option for your system.
- AMD Users:
- ROCm is the preferred method, but requires that a compatible version of ROCm is installed on your system. The Faceswap installer cannot take care of this for you.
- Unfortunately ROCm will only work on newer GPUs. It is hard to find a list of supported GPUs, but from experience anything HAWAII (that's the R9 range) or before will not work, anything Navi might work, anything later should work.
- The version of ROCm you install is important, as it must be compatible with the version of Tensorflow that faceswap will install. As the version of tensorflow changes, so will the required ROCm version. The easiest way to find out which ROCm versions are supported by faceswap is to look at this line from Faceswap's setup script. An example of this can be seen below:
Note: whilst the ROCm requirement was correct at the time of writing, it is highly unlikely to be correct now, so you should check the actual version currently supported..
In the above example, this shows that Faceswap is running Tensorflow 2.10.x and supports ROCm from 5.2.0 to 5.4.0 - If you think your card is ROCm 5 compatible, then you can follow the ROCm installation instructions here: https://docs.amd.com/category/ROCm%E2%84%A2%20v5.x.
- ROCm is the preferred method, but requires that a compatible version of ROCm is installed on your system. The Faceswap installer cannot take care of this for you.
Enter 1 for Nvidia, 2 for AMD (ROCm) or 3 for CPU
- AMD Users:
Post Install Actions
If you are running a Desktop Environment you will be given the option to create a Desktop shortcut to enter the GUI. This makes opening Faceswap a lot easier, so unless you have a good reason not to, you should select Y here.
Finally you will be able to review your options. If you are happy press Y to proceed with the install, or press Enter to abort.
The installer will proceed to download the resources it needs from the internet and install as per your options. After a period of time Faceswap installation will complete and you will be ready to launch.