[Guide] Using Faceswap on Nvidia RTX 30xx cards (2024)

Table of Contents
Setup Faceswap Tensorflow References

Cuda 11.2/cuDNN 8.1 support has now been added to the default installer, so 30xx cards should just work.

Some caveats: The reason for the delay is that I have been waiting for Conda to release Tensorflow with Cuda 11.1+ support. We use Conda to handle the Cuda/cuDNN requirements as it makes setting up Faceswap for the end user far easier. However, this has taken a long time, and now they have finally started releasing 30xx supporting versions, it appears that their releases are thoroughly broken. With this in mind, I needed to look to go another way.

I do not currently own a 30xx card, thanks to the chip shortage and the insane prices that these cards are going for, therefore I have not been able to test that the latest implementation works on the latest Nvidia cards. There shouldn't be an issue, but you can never be sure.

Instructions for upgrading:

  • Uninstall any system installed versions of Cuda and cuDNN from your machine prior to proceeding.
  • Download the latest installer from our releases page
  • Delete your existing Faceswap folder and then Install the latest version.

Please post any issues to this thread

The below instructions were issued prior to implementing Tensorflow 2.6 support. They are no longer updated and should not be followed. They are left here in case you have problems and wish to attempt to manually install Cuda and cuDNN

First up, this is entirely unsupported, and you are on your own. These instructions are here as a courtesy whilst we wait for upstream (Conda mainly) to update it's packages for the latest GPU support.

You will not receive official support for this kind of setup, so please don't ask for it. Official support will come when upstream catches up. You should keep all comments, feedback, bugs and suggestions to this thread in the hope that others will be able to help you and the devs can pick up on bugs.

This solution is not automatic, there will be manual and command line work involved. These instructions are untested and just reeled off from the top of my head. If you have suggestions for changes please post them.

Another thing to bear in mind is that officially the minimum Cuda version required for 30xx cards is 11.1 (https://www.phoronix.com/scan.php?page= ... 1-Released), however the latest Tensorflow version has been compiled for 11.0 (https://www.tensorflow.org/install/source#gpu). These instructions will allow you to run the 11.0 version of Tensorflow (as per the official release). This may or may not bring with it issues for 30xx cards. Please do report them here.

To use a version for Cuda 11.1 then you will need to compile Tensorflow yourself, which is well outside of the scope of these instructions. (Compiling Tensorflow from source: https://www.tensorflow.org/install/source). Alternatively you could try some pre-compiled wheels (Google is your friend. your mileage may vary), although we cannot vouch for 3rd party compiled versions of Tensorflow.

Setup

  1. Remove any and all versions of Cuda and cuDNN from your PC.
  2. Install Cuda Tool Kit 11.0 from https://developer.nvidia.com/cuda-11.0-download-archive.
  3. Install cuDNN 8.0 for Cuda Tool Kit 11.0 from https://developer.nvidia.com/cudnn-download-survey. (NB: I cannot provide a direct link as you need to log in, make sure you download the correct cuDNN version (8.0) for the correct Cuda version (11.0)).

Faceswap

  1. Download the latest Faceswap installer (do not try to upgrade your existing Faceswap install).
  2. Select "CPU" when asked which version of Faceswap you want to install. This is very important as it will ensure we use the Cuda version we installed in the last step.
  3. Run the installer and let it complete.
  4. Delete the file <faceswap folder>/config/.faceswap (alternatively you can edit this file and change the word cpu to nvidia)

Tensorflow

We have to remove the CPU version of Tensorflow we installed and replace it with a version compatible with 30xx cards. I will assume Linux users are comfortable with entering a Conda environment, so these instructions are for Windows:

  1. Go Start > Anaconda Prompt.
  2. Enter the following commands to activate the faceswap environment, remove Tensorflow cpu and install Tensorflow-GPU. (Change the name faceswap in the first command if you selected a different environment name when installing):

    Code: Select all

    conda activate faceswapconda remove tensorflowpip install tensorflow-gpu==2.4

We now have Faceswap, Cuda and Tensorflow installed. Opening Faceswap should see you running tf.2.4 for 30xx cards.

Please post issues and bugs here. We will not provide setup support, but bugs and issues will help us to remedy asap.

[Guide] Using Faceswap on Nvidia RTX 30xx cards (2024)

References

Top Articles
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 6639

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.