Page 1 of 1

[SOLVED] FaceSwap not using GPU. "cudnn64_8.dll" not found. CUDA setup failed.

Posted: Tue Jan 07, 2025 12:11 am
by localxboy

Hi! ;)

I'm kind of new to the stuff, so excuse me for not understanding things.

  • (Also worth mentioning. I have kinda old gaming laptop (Lenovo with NV GTX1050 4GB and i5-8300H Turbo 3,9)

What I did:

  • 1. Installed FaceSwap app through original x64 installer. (Selected NVidia Support)
  • 2. Extracted faces, etc.
  • 3. Launched Training
  • 4. GPU Usage 2%, Rate: 7 EG/s like it's a joke.
  • 5. Installed (Globally) lastest cudatoolkit, lastest cudnn, & lastest compatible tensorflow (Bc FaceSwap didn't want to install them)
  • 6. Reinstalled FaceSwap and Conda
  • 7. Training. 2%. Same thing.
  • 8. Uninstalled FaceSwap
  • 9. Did a clear installation of FaceSwap by that guide: NB: It is imperative...
  • 10. Training once again, all the same.

FaceSwap installation log:

► Show Spoiler

GPU-Z
Image
Image

FaceSwap System Info

► Show Spoiler

Training Launch Log

► Show Spoiler

It says "Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found", but as you can see, other libraries loaded just fine. And you can clearly see presence of "cudnn64_8.dll" library in CUDNN main folder. I've even added the folder to the path.
Image

I did Cuda installations by following this guide: https://support.echoview.com/WebHelp/_I ... ibrary.htm

I guess I need a help in CUDNN 8.1 on my windows machine. Because faceswap can't see the dll i've installed on my own.

Thank you in advance.

► Show Spoiler

Re: FaceSwap not using my GPU. 1050. "cudnn64_8.dll" not found.

Posted: Wed Jan 08, 2025 3:48 pm
by Andentze

4. GPU Usage 2%, Rate: 7 EG/s like it's a joke.

Seems like you're using Task Manager to monitor usage, which can work... ...if you set one of the tabs to "CUDA usage"...

Second of all, it is recommended you delete ALL global cuda/cudnn installs and reboot your system before trying to install Faceswap again.
Sending faceswap_setup.log(located at your faceswap folder) would help us locate the issue with cuda/cudnn installs with conda, since the install log you attached isn't verbose enough. But it very well might be a conflict between your install and conda's attempt to install.

All of that is located at FAQ's and Install Guide so make sure you give those a read or two.


Re: FaceSwap not using my GPU. 1050. "cudnn64_8.dll" not found.

Posted: Wed Jan 08, 2025 4:51 pm
by localxboy
Andentze wrote: Wed Jan 08, 2025 3:48 pm

4. GPU Usage 2%, Rate: 7 EG/s like it's a joke.

Seems like you're using Task Manager to monitor usage, which can work... ...if you set one of the tabs to "CUDA usage"...

Second of all, it is recommended you delete ALL global cuda/cudnn installs and reboot your system before trying to install Faceswap again.
Sending faceswap_setup.log(located at your faceswap folder) would help us locate the issue with cuda/cudnn installs with conda, since the install log you attached isn't verbose enough. But it very well might be a conflict between your install and conda's attempt to install.

All of that is located at FAQ's and Install Guide so make sure you give those a read or two.

No, I was using Task Manager to show that my CPU usage is at 100%.
But for monitoring GPU I use GPU-Z usage was 2%.

When I was installing FaceSwap the first time I had basically clean windows installation (I didn't do any CUDA and TF installations), no CUDA installs at all. And the only moment i've installed CUDA and CUDNN globally it's when FaceSwap didn't want to install 'em on it's own.

The setup log file: https://system.tips/text/view?q=fnxyvxec


Re: FaceSwap not using my GPU. 1050. "cudnn64_8.dll" not found.

Posted: Wed Jan 08, 2025 6:03 pm
by localxboy

SOLVED!

If you have a problem like me where the CUDA and CUDNN can't be installed by FaceSwap installer you should try doing...

  1. Go to Control Panel -> Apps -> Check for presence and delete "NVIDIA Frameview", "NVIDIA Nsight", "NVIDIA Cuda"
  2. Run "pip list" from your CMD. Check if tensorflow is installed and remove it through "pip uninstall tensorflow" (+every package containing that name)

Code: Select all

pip uninstall tensorflow, tensorboard, tensorboard-data-server, tensorflow-estimator, tensorflow-intel, tensorflow-io-gcs-filesystem, tensorboard-plugin-wit -y

or

pip uninstall tensorflow -y
pip uninstall tensorboard -y
pip uninstall tensorboard-data-server -y
pip uninstall tensorflow-estimator -y
pip uninstall tensorflow-intel -y
pip uninstall tensorflow-io-gcs-filesystem -y
pip uninstall tensorboard-plugin-wit -y

Then:

  1. Go to your FaceSwap direcory (/Users/<name>/FaceSwap), and check the setup log, CTRL+F and search for "CUDA", then find the right version of CUDA and CUDNN to install, e.g. "cudatoolkit = 11.2", "cudnn = 8.1"
  2. In the same log file search for "tensorflow" version, mine was 2.10.0
  3. Install it, CMD -> "pip install tensorflow==2.10.0"
  4. Download the right CUDA and CUDNN versions

Links:
CUDA: https://developer.nvidia.com/cuda-toolkit-archive
CUDNN: https://developer.nvidia.com/rdp/cudnn-archive (for windows download x86)

  1. Install CUDA. Choose "Custom Installation" when prompted. Uncheck "Visual Studio Integration" and "GF" installation as in screenshots.
    Image
    Image

  2. Install CUDNN. Download the CUDNN archive and extract it to path "C:\Program Files\NVIDIA\GPU Computing Toolkit\CUDNN\v8.1" replace "v8.1" with your version. Choose to replace if prompted.
    Image

Looks like this is it. Have fun! ;) <3


Re: FaceSwap not using my GPU. 1050. "cudnn64_8.dll" not found.

Posted: Wed Jan 08, 2025 6:06 pm
by localxboy

Laptop 1050 can run 150 EG/s, that's actually not bad at all ;)

Image


Re: [SOLVED] FaceSwap not using GPU. "cudnn64_8.dll" not found. CUDA setup failed.

Posted: Sun Jan 12, 2025 6:03 am
by ht1529

How about if I am using RTX GeForce 3070 while my GPU usage is 1%/ CPU 100%, should I install Cuda and cudnn, then repeat what you did? I know nothing about the cuda and cudnn :(


Re: [SOLVED] FaceSwap not using GPU. "cudnn64_8.dll" not found. CUDA setup failed.

Posted: Wed Feb 26, 2025 9:10 pm
by sreyes00

Hi Localxboy?
I followed all the instructions but in the last post, when I open the task manager I cannot check the CUDA graphics like yours, is that becuase the cuda wasn´t installed properly?
I have a RTX 3080 Ti

Thanks!


Re: [SOLVED] FaceSwap not using GPU. "cudnn64_8.dll" not found. CUDA setup failed.

Posted: Fri Feb 28, 2025 3:27 pm
by coconut

I registered to express my gratitude. The method is very effective. This is very effective.
One thing to note is that the conda environment for installing tensorflow needs to be the faceswap environment in miniconda.
If you have multiple condas, you may need to win + s to search for "miniconda", and then run "conda activate faceswap" in the prompt, and then install tensorflow. Another tip, you may need to reinstall faceswap:D


Re: [SOLVED] FaceSwap not using GPU. "cudnn64_8.dll" not found. CUDA setup failed.

Posted: Sun Mar 02, 2025 5:20 pm
by PikachuR

I'm having the same issue while installing. Your solution is very helpful!
Do you know I should install faceswap first then install older cuda and cudnn?
Or should I uninstall faceswap first and then install older cuda and cudnn?


Re: [SOLVED] FaceSwap not using GPU. "cudnn64_8.dll" not found. CUDA setup failed.

Posted: Mon Mar 31, 2025 5:48 am
by EW20

I had this same problem and solved it a different way. At least it worked on my system.

I had the same issue when outputting system information, neither CUDAToolkit or cuDNN were listed as packages in the environment. The installer is having trouble with this recently, not sure if a new Nvidia driver isn't quite compatible with older CUDA versions (although it should be). It was clear in my install log that there was an error and it wasn't installed. I had no other global cuda versions installed.

All I did was this:

I navigated to C:\users\*username*\miniconda3\condabin in elevated command prompt
(this is with standard windows installation, if you specified a different directory it will be there)

then I verified that the faceswap environment was present by typing

conda env list

You should see something like:

conda environments:

#
base C:\Users\*username\MiniConda3
faceswap C:\Users\*username
\MiniConda3\envs\faceswap

next, I activated the faceswap environment with

conda activate faceswap

If you list the environments after this you should see an asterix by faceswap indicating it's active

Then I manually installed the toolkit and cuDNN with

conda install conda-forge::cudatoolkit=11.2.2
conda install conda-forge::cudnn=8.1.0.77

I restarted, and after this, both the toolkit and cudnn showed up in my system info as packages in the environment, and faceswap started using my GPU.