Page 1 of 1
Error opening FaceSwap
Posted: Mon Sep 07, 2020 12:30 am
by Theunamedone
Guys I successfully installed FaceSwap on my windows 10 with radeon card however when clicking on open the app it opens a ready cmd jenela and then closes and the program does not open.
Could someone please help me?
faceswap_gui.log
Code: Select all
09/06/2020 21:28:22 MainProcess MainThread logger log_setup INFO Log level set to: INFO
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR There was an error importing Tensorflow. This is most likely because you do not have TensorFlow installed, or you are trying to run tensorflow-gpu on a system without an Nvidia graphics card. Original import error: Traceback (most recent call last):
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR File "C:\Users\Kleber\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR from tensorflow.python.pywrap_tensorflow_internal import *
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR File "C:\Users\Kleber\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR _pywrap_tensorflow_internal = swig_import_helper()
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR File "C:\Users\Kleber\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR File "C:\Users\Kleber\MiniConda3\envs\faceswap\lib\imp.py", line 242, in load_module
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR return load_dynamic(name, filename, file)
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR File "C:\Users\Kleber\MiniConda3\envs\faceswap\lib\imp.py", line 342, in load_dynamic
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR return _load(spec)
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR ImportError: DLL load failed while importing _pywrap_tensorflow_internal: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR Failed to load the native TensorFlow runtime.
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR See https://www.tensorflow.org/install/errors
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR for some common reasons and solutions. Include the entire stack trace
09/06/2020 21:28:23 MainProcess MainThread launcher execute_script ERROR above this error message when asking for help.
Re: Error opening FaceSwap
Posted: Mon Sep 07, 2020 3:49 am
by bryanlyon
The first suggestion is always app.php/faqpage#f1r1 . This will usually solve installation problems.
Re: Error opening FaceSwap
Posted: Mon Sep 07, 2020 6:24 am
by Theunamedone
Re: Error opening FaceSwap
Posted: Tue Sep 08, 2020 5:57 am
by bryanlyon
After that, since this problem is in Tensorflow I suggest reading the link included there https://www.tensorflow.org/install/errors In particular the ones labelled as "ModuleNotFoundError: No module named 'tensorflow.python._pywrap_tensorflow_internal'" and "ImportError: DLL load failed: The specified module could not be found."
Re: Error opening FaceSwap
Posted: Wed Sep 09, 2020 11:23 pm
by kellurian
Bryan,
I am also having this exact same issue. It was working fine, then I did the update option in the gui, which I think updated the tensorflow to 2.2 and since then it won't load and I get the exact same error message. I also did all the recommended removals. I couldn't find an answer on the tensorflow board...
Re: Error opening FaceSwap
Posted: Thu Sep 10, 2020 3:58 am
by kellurian
Ok, I think I found the answer at the tensorflow board. It has to do with visual c++ for visual studio. I think the latest iteration of tensorflow, 2.1 or higher, requires these specific updates to work correctly. You can download it here: https://support.microsoft.com/en-us/hel ... -downloads
Its under "Visual Studio 2015, 2017 and 2019" and download the x64 link. Reboot and it should work, or at least did for me.
Re: Error opening FaceSwap
Posted: Thu Sep 10, 2020 3:05 pm
by Anand
kellurian wrote: ↑Thu Sep 10, 2020 3:58 am
Ok, I think I found the answer at the tensorflow board. It has to do with visual c++ for visual studio. .....
THANK YOU. Your solution totally worked for me. I registered and logged in specifically to thank you. 
Re: Error opening FaceSwap
Posted: Thu Sep 10, 2020 9:57 pm
by torzdf
Solved literally 2 posts down:
viewtopic.php?f=4&t=932
Failed to load the native TensorFlow runtime. (Tried many things already)
Posted: Sat Sep 25, 2021 7:02 pm
by Joons9000
Error:
I have keep on getting errors regarding the TensorFlow importation upon clicking the desktop icon for it.
What I have done:
I have uninstalled and reinstalled visual studio 2013 2015 2017 2019.
I have tried installing an older version of TensorFlow to no avail.
I installed anaconda and installed tensorflow through there.
I tried to install tensorflow-directml, also didnt work.
Restarted computer, didnt work.
System Info:
Using Windows 10 64bit, Python 3.9 and also I installed the tensorflow through anaconda. (AMD GPU)
Error Itself:
Code: Select all
C:\Users\David\faceswap>"C:\Users\David\Miniconda3\scripts\activate.bat" && conda activate "faceswap" && python "C:\Users\David\faceswap/faceswap.py" gui
Setting Faceswap backend to AMD
09/25/2021 11:52:00 INFO Log level set to: INFO
09/25/2021 11:52:07 ERROR A DLL library file failed to load. Make sure that you have Microsoft Visual C++ Redistributable (2015, 2017, 2019) installed for your machine from: https://support.microsoft.com/en-gb/help/2977003. Original error: Traceback (most recent call last):
File "C:\Users\David\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\David\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\David\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Users\David\MiniConda3\envs\faceswap\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "C:\Users\David\MiniConda3\envs\faceswap\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
09/25/2021 11:52:07 INFO Press "ENTER" to dismiss the message and close FaceSwap
Re: Error opening FaceSwap
Posted: Mon Sep 27, 2021 9:18 am
by torzdf
There are many reasons this can occur. Check this thread first.
The candidate most likely in this case though, is that your CPU does not support AVX instructions.
There are ways around this. You can see here for a recent discussion around a similar issue in our Discord:
https://discord.com/channels/4419893984 ... 6721560576