Microsoft Visual C++ Redist error

Installing and setting up FaceSwap
Forum rules
Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.
User avatar
funkytownn
Posts: 1
Joined: Thu Oct 29, 2020 5:08 pm

Re: Microsoft Visual C++ Redist error

Post by funkytownn »

Had the same DLL-error for a while in all tensorflow-related installs.
It's because of having an older CPU (I have an i7 870) with no AVX2 support.

To fix it use : https://github.com/fo40225/tensorflow-windows-wheel
I installed the cuda102cudnn76sse2 wheel with conda and Faceswap is working now!


User avatar
torzdf
Posts: 1011
Joined: Fri Jul 12, 2019 12:53 am
Answers: 128
Has thanked: 28 times
Been thanked: 193 times

Re: Microsoft Visual C++ Redist error

Post by torzdf »

Thanks for this, this is useful information. Hopefully others can confirm whether this fixes their issue.

My word is final


User avatar
rusphenomen12
Posts: 1
Joined: Fri Oct 30, 2020 6:46 pm

Re: Microsoft Visual C++ Redist error

Post by rusphenomen12 »

Has anyone found a solution?


User avatar
martmah
Posts: 2
Joined: Fri Oct 23, 2020 7:34 am

Re: Microsoft Visual C++ Redist error

Post by martmah »

funkytownn wrote: Thu Oct 29, 2020 5:14 pm

Had the same DLL-error for a while in all tensorflow-related installs.
It's because of having an older CPU (I have an i7 870) with no AVX2 support.

To fix it use : https://github.com/fo40225/tensorflow-windows-wheel
I installed the cuda102cudnn76sse2 wheel with conda and Faceswap is working now!

First of all thank you for the instructions. Does the order of installing things matter. Can i first install faceswap and then cuda102cudnn76sse2? And how do i install it? Do i just need to install this cuda102cudnn76sse2 or all these what are there where this link you shared takes us? Thank you in advance.


User avatar
bignose
Posts: 1
Joined: Sun Nov 15, 2020 4:56 pm
Been thanked: 1 time

Re: Microsoft Visual C++ Redist error

Post by bignose »

Hi guys! Might have the solution. I thought i had the same issues; checked the anaconda prompt log, tensorflow stuff etc. went back to the visual C++ page https://support.microsoft.com/en-us/hel ... -downloads and downloaded " x64: vc_redist.x64.exe "

i realized earlier i had hastily downloaded the 86 one :| well now i can finally run faceswap!

sorry if this isn't the solution for u. hopefully the next fella doesn't make the same mistake i did :D


User avatar
torzdf
Posts: 1011
Joined: Fri Jul 12, 2019 12:53 am
Answers: 128
Has thanked: 28 times
Been thanked: 193 times

Re: Microsoft Visual C++ Redist error

Post by torzdf »

martmah wrote: Fri Nov 06, 2020 8:20 am
funkytownn wrote: Thu Oct 29, 2020 5:14 pm

Had the same DLL-error for a while in all tensorflow-related installs.
It's because of having an older CPU (I have an i7 870) with no AVX2 support.

To fix it use : https://github.com/fo40225/tensorflow-windows-wheel
I installed the cuda102cudnn76sse2 wheel with conda and Faceswap is working now!

First of all thank you for the instructions. Does the order of installing things matter. Can i first install faceswap and then cuda102cudnn76sse2? And how do i install it? Do i just need to install this cuda102cudnn76sse2 or all these what are there where this link you shared takes us? Thank you in advance.

This issue tends to only happen on Windows, as we cannot currently use Conda to install Tensorflow under Windows, as they do not have a compatible release yet.

To install a custom Tensorflow wheel that does not require AVX, do the following:

  • Check if you CPU supports AVX/AVX2 instruction sets (google it). If it does, then this will not fix your issue and you will be wasting your time.

  • Download and install Faceswap as usual (if not done already). The below instructions assume that you installed with the default settings. If you changed your environment name at install time, then please update the commands accordingly.

  • Download this version of Tensorflow (you need all 3 parts downloaded to the same folder):
    https://github.com/fo40225/tensorflow-w ... udnn76sse2

  • Open the file that ends with .001 with 7zip and drag the contents to somewhere easy to access. (NB: Only do this with the file that ends with .001. 7zip will automatically build the file from the other parts).

  • Start an Anaconda prompt by going Start > Anaconda Prompt (from the windows start menu)

  • Activate your faceswap environment with the following command (once done, the cli should have (faceswap) displayed at the start:

    Code: Select all

    conda activate faceswap
  • The custom version of Tensorflow requires a different version of Cuda/cuDNN, so we need to remove our installed version, and install the correct version. We can do this with one command:

    Code: Select all

    conda install cudatoolkit=10.2
  • Remove the installed version of Tensorflow:

    Code: Select all

    pip uninstall tensorflow-gpu -y
  • Go to the location that you extracted your custom Tensorflow Wheel to in Windows Explorer. Hold down shift, right click the file and select Copy as path

  • Go back to the Anaconda Prompt window and enter pip install and paste the contents of the clipboard to the end of this line. (It should read something like pip install C:\<tensorflow_path\tensorflow-2.2.0-cp38-none-win_amd64.whl). Hit Enter to run the command and install.

This should have replaced the version of Tensorflow you are using, and you should be good to go.

My word is final


Post Reply