Error on launch: Failed to load the native TensorFlow runtime

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.

Locked
User avatar
thegreenzebra
Posts: 2
Joined: Thu Oct 24, 2019 6:46 pm

Error on launch: Failed to load the native TensorFlow runtime

Post by thegreenzebra »

I get this error on launch:

Code: Select all

10/24/2019 20:03:40 INFO     Log level set to: INFO
10/24/2019 20:03:46 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):
10/24/2019 20:03:46 ERROR      File "C:\Users\Lenovo\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
10/24/2019 20:03:46 ERROR        from tensorflow.python.pywrap_tensorflow_internal import *
10/24/2019 20:03:46 ERROR      File "C:\Users\Lenovo\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
10/24/2019 20:03:46 ERROR        _pywrap_tensorflow_internal = swig_import_helper()
10/24/2019 20:03:46 ERROR      File "C:\Users\Lenovo\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
10/24/2019 20:03:46 ERROR        _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
10/24/2019 20:03:46 ERROR      File "C:\Users\Lenovo\MiniConda3\envs\faceswap\lib\imp.py", line 243, in load_module
10/24/2019 20:03:46 ERROR        return load_dynamic(name, filename, file)
10/24/2019 20:03:46 ERROR      File "C:\Users\Lenovo\MiniConda3\envs\faceswap\lib\imp.py", line 343, in load_dynamic
10/24/2019 20:03:46 ERROR        return _load(spec)
10/24/2019 20:03:46 ERROR    ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
10/24/2019 20:03:46 ERROR
10/24/2019 20:03:46 ERROR
10/24/2019 20:03:46 ERROR    Failed to load the native TensorFlow runtime.
10/24/2019 20:03:46 ERROR
10/24/2019 20:03:46 ERROR    See https://www.tensorflow.org/install/errors

I tried changing protobuf versions, but I returned it to the newest one at the end.

Last edited by bryanlyon on Fri Oct 25, 2019 12:05 am, edited 1 time in total.
Reason: Make Title representative of problem.
User avatar
torzdf
Posts: 2667
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: Error on launch

Post by torzdf »

This looks like a Tensorflow issue....

I would delete the faceswap folder, uninstall miniconda 3 then try running the installer again....

If you still have issues, so this FAQ:
app.php/faqpage#f1r1

My word is final

User avatar
thegreenzebra
Posts: 2
Joined: Thu Oct 24, 2019 6:46 pm

Re: Error on launch

Post by thegreenzebra »

torzdf wrote: Thu Oct 24, 2019 7:35 pm

This looks like a Tensorflow issue....

I would delete the faceswap folder, uninstall miniconda 3 then try running the installer again....

If you still have issues, so this FAQ:
app.php/faqpage#f1r1

No, the error is still here. (Although I haven't uninstalled git.)

User avatar
torzdf
Posts: 2667
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: Error on launch

Post by torzdf »

In my opinion, the most likely cause of this is a conflict with an alternative python version installed Tensorflow. If you have cleared out everything as per the FAQ point (i.e. all existing python installs and temp folders) and are still getting the error, then you're going to need to find support on a Tensorflow based forum, as it is unfortunately out of scope for Faceswap.

My word is final

User avatar
Hanrahahanrahan
Posts: 8
Joined: Sat Aug 22, 2020 1:44 pm
Has thanked: 4 times
Been thanked: 1 time

Tensorflow problems with new version: ImportError: DLL load failed while importing _pywrap_tensorflow_internal

Post by Hanrahahanrahan »

On a fresh installed Windows 10 with a Nvidia GTX 1080 Ti card in it, I can't get the new version to work. When I try to start it via the gui it closed after a second or two.

What it says in the faceswap_gui.log:

Code: Select all

08/22/2020 18:08:01 MainProcess     MainThread      logger          log_setup                 INFO     Log level set to: INFO
08/22/2020 18:08:01 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):
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\DatGuy\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR        from tensorflow.python.pywrap_tensorflow_internal import *
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\DatGuy\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR        _pywrap_tensorflow_internal = swig_import_helper()
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\DatGuy\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR        _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\DatGuy\MiniConda3\envs\faceswap\lib\imp.py", line 242, in load_module
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR        return load_dynamic(name, filename, file)
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\DatGuy\MiniConda3\envs\faceswap\lib\imp.py", line 342, in load_dynamic
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR        return _load(spec)
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR    ImportError: DLL load failed while importing _pywrap_tensorflow_internal: Das angegebene Modul wurde nicht gefunden.
08/22/2020 18:08:01 MainProcess     MainThread      launcher        execute_script            ERROR    
08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR
08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR Failed to load the native TensorFlow runtime. 08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR
08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR See https://www.tensorflow.org/install/errors 08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR
08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR for some common reasons and solutions. Include the entire stack trace 08/22/2020 18:08:01 MainProcess MainThread launcher execute_script ERROR above this error message when asking for help.

What it says during installation:

Code: Select all

(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications
(check) Setting up for: nvidia

Downloading Miniconda3...
Installing Miniconda3. This will take a few minutes...
Miniconda3 installed.
Initializing Conda...
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: C:\Users\DatGuy\MiniConda3
  added / updated specs:
    - conda
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    brotlipy-0.7.0             |py38he774522_1000         338 KB
    ca-certificates-2020.6.24  |                0         125 KB
    certifi-2020.6.20          |           py38_0         157 KB
    conda-4.8.4                |           py38_0         2.9 MB
    idna-2.10                  |             py_0          50 KB
    openssl-1.1.1g             |       he774522_1         4.8 MB
    pip-20.2.2                 |           py38_0         1.8 MB
    pycparser-2.20             |             py_2          94 KB
    pyopenssl-19.1.0           |             py_1          48 KB
    requests-2.24.0            |             py_0          56 KB
    ruamel_yaml-0.15.87        |   py38he774522_1         264 KB
    setuptools-49.6.0          |           py38_0         763 KB
    six-1.15.0                 |             py_0          13 KB
    sqlite-3.33.0              |       h2a8f88b_0         809 KB
    tqdm-4.48.2                |             py_0          63 KB
    urllib3-1.25.10            |             py_0          98 KB
    vs2015_runtime-14.16.27012 |       hf0eaf9b_3         1.2 MB
    yaml-0.2.5                 |       he774522_0          62 KB
    ------------------------------------------------------------
                                           Total:        13.5 MB
The following NEW packages will be INSTALLED:
  brotlipy           pkgs/main/win-64::brotlipy-0.7.0-py38he774522_1000
The following packages will be UPDATED:
  ca-certificates                                2020.1.1-0 --> 2020.6.24-0
  certifi                                 2020.4.5.1-py38_0 --> 2020.6.20-py38_0
  conda                                        4.8.3-py38_0 --> 4.8.4-py38_0
  idna                                             2.9-py_1 --> 2.10-py_0
  openssl                                 1.1.1g-he774522_0 --> 1.1.1g-he774522_1
  pip                                         20.0.2-py38_3 --> 20.2.2-py38_0
  pycparser                                       2.20-py_0 --> 2.20-py_2
  pyopenssl          pkgs/main/win-64::pyopenssl-19.1.0-py~ --> pkgs/main/noarch::pyopenssl-19.1.0-py_1
  requests           pkgs/main/win-64::requests-2.23.0-py3~ --> pkgs/main/noarch::requests-2.24.0-py_0
  ruamel_yaml                        0.15.87-py38he774522_0 --> 0.15.87-py38he774522_1
  setuptools                                  46.4.0-py38_0 --> 49.6.0-py38_0
  six                   pkgs/main/win-64::six-1.14.0-py38_0 --> pkgs/main/noarch::six-1.15.0-py_0
  sqlite                                  3.31.1-h2a8f88b_1 --> 3.33.0-h2a8f88b_0
  tqdm                                          4.46.0-py_0 --> 4.48.2-py_0
  urllib3            pkgs/main/win-64::urllib3-1.25.8-py38~ --> pkgs/main/noarch::urllib3-1.25.10-py_0
  vs2015_runtime                     14.16.27012-hf0eaf9b_1 --> 14.16.27012-hf0eaf9b_3
  yaml                                     0.1.7-hc54c509_2 --> 0.2.5-he774522_0
Downloading and Extracting Packages
pyopenssl-19.1.0     | 48 KB     |            |   0% pyopenssl-19.1.0     | 48 KB     | ########## | 100% 
openssl-1.1.1g       | 4.8 MB    |            |   0% openssl-1.1.1g       | 4.8 MB    | ####1      |  41% openssl-1.1.1g       | 4.8 MB    | ########## | 100% 
yaml-0.2.5           | 62 KB     |            |   0% yaml-0.2.5           | 62 KB     | ########## | 100% 
brotlipy-0.7.0       | 338 KB    |            |   0% brotlipy-0.7.0       | 338 KB    | ########## | 100% 
setuptools-49.6.0    | 763 KB    |            |   0% setuptools-49.6.0    | 763 KB    | ########## | 100% 
tqdm-4.48.2          | 63 KB     |            |   0% tqdm-4.48.2          | 63 KB     | ########## | 100% 
urllib3-1.25.10      | 98 KB     |            |   0% urllib3-1.25.10      | 98 KB     | ########## | 100% 
idna-2.10            | 50 KB     |            |   0% idna-2.10            | 50 KB     | ########## | 100% 
requests-2.24.0      | 56 KB     |            |   0% requests-2.24.0      | 56 KB     | ########## | 100% 
certifi-2020.6.20    | 157 KB    |            |   0% certifi-2020.6.20    | 157 KB    | ########## | 100% 
ca-certificates-2020 | 125 KB    |            |   0% ca-certificates-2020 | 125 KB    | ########## | 100% 
pip-20.2.2           | 1.8 MB    |            |   0% pip-20.2.2           | 1.8 MB    | ########## | 100% 
pycparser-2.20       | 94 KB     |            |   0% pycparser-2.20       | 94 KB     | ########## | 100% 
conda-4.8.4          | 2.9 MB    |            |   0% conda-4.8.4          | 2.9 MB    | #########2 |  92% conda-4.8.4          | 2.9 MB    | ########## | 100% 
sqlite-3.33.0        | 809 KB    |            |   0% sqlite-3.33.0        | 809 KB    | ########## | 100% 
six-1.15.0           | 13 KB     |            |   0% six-1.15.0           | 13 KB     | ########## | 100% 
vs2015_runtime-14.16 | 1.2 MB    |            |   0% vs2015_runtime-14.16 | 1.2 MB    | ########## | 100% 
ruamel_yaml-0.15.87  | 264 KB    |            |   0% ruamel_yaml-0.15.87  | 264 KB    | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Creating Conda Virtual Environment...
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: C:\Users\DatGuy\MiniConda3\envs\faceswap
  added / updated specs:
    - python=3.8
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    python-3.8.5               |       he1778fa_0        15.7 MB
    ------------------------------------------------------------
                                           Total:        15.7 MB
The following NEW packages will be INSTALLED:
  ca-certificates    pkgs/main/win-64::ca-certificates-2020.6.24-0
  certifi            pkgs/main/win-64::certifi-2020.6.20-py38_0
  openssl            pkgs/main/win-64::openssl-1.1.1g-he774522_1
  pip                pkgs/main/win-64::pip-20.2.2-py38_0
  python             pkgs/main/win-64::python-3.8.5-he1778fa_0
  setuptools         pkgs/main/win-64::setuptools-49.6.0-py38_0
  sqlite             pkgs/main/win-64::sqlite-3.33.0-h2a8f88b_0
  vc                 pkgs/main/win-64::vc-14.1-h0510ff6_4
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.16.27012-hf0eaf9b_3
  wheel              pkgs/main/win-64::wheel-0.34.2-py38_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py38_0
  zlib               pkgs/main/win-64::zlib-1.2.11-h62dcd97_4
Downloading and Extracting Packages
python-3.8.5         | 15.7 MB   |            |   0% python-3.8.5         | 15.7 MB   |            |   1% python-3.8.5         | 15.7 MB   | #9         |  20% python-3.8.5         | 15.7 MB   | ####       |  41% python-3.8.5         | 15.7 MB   | ######1    |  62% python-3.8.5         | 15.7 MB   | ########2  |  83% python-3.8.5         | 15.7 MB   | ########## | 100% python-3.8.5         | 15.7 MB   | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use
#
#     $ conda activate faceswap
#
# To deactivate an active environment, use
#
#     $ conda deactivate
Installing Git...
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: C:\Users\DatGuy\MiniConda3\envs\faceswap
  added / updated specs:
    - git
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    git-2.23.0                 |       h6bb4b03_0        10.5 MB
    ------------------------------------------------------------
                                           Total:        10.5 MB
The following NEW packages will be INSTALLED:
  git                pkgs/main/win-64::git-2.23.0-h6bb4b03_0
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Downloading Faceswap...
Cloning into 'C:\Users\DatGuy\faceswap'...
Setting up FaceSwap Environment... This may take a while
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
  - tensorflow-gpu[version='>=2.2.0,<2.3.0']
Current channels:
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
    https://anaconda.org
and use the search bar at the top of the page.
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: C:\Users\DatGuy\MiniConda3\envs\faceswap
  added / updated specs:
    - cudatoolkit==10.1.243
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    cudatoolkit-10.1.243       |       h74a9793_0       300.3 MB
    ------------------------------------------------------------
                                           Total:       300.3 MB
The following NEW packages will be INSTALLED:
  cudatoolkit        pkgs/main/win-64::cudatoolkit-10.1.243-h74a9793_0
Downloading and Extracting Packages
cudatoolkit-10.1.243 | 300.3 MB  |            |   0% cudatoolkit-10.1.243 | 300.3 MB  |            |   0% cudatoolkit-10.1.243 | 300.3 MB  | 1          |   1% cudatoolkit-10.1.243 | 300.3 MB  | 2          |   2% cudatoolkit-10.1.243 | 300.3 MB  | 3          |   3% cudatoolkit-10.1.243 | 300.3 MB  | 4          |   4% cudatoolkit-10.1.243 | 300.3 MB  | 5          |   5% cudatoolkit-10.1.243 | 300.3 MB  | 6          |   6% cudatoolkit-10.1.243 | 300.3 MB  | 7          |   8% cudatoolkit-10.1.243 | 300.3 MB  | 8          |   9% cudatoolkit-10.1.243 | 300.3 MB  | 9          |  10% cudatoolkit-10.1.243 | 300.3 MB  | #          |  11% cudatoolkit-10.1.243 | 300.3 MB  | #1         |  12% cudatoolkit-10.1.243 | 300.3 MB  | #3         |  13% cudatoolkit-10.1.243 | 300.3 MB  | #4         |  14% cudatoolkit-10.1.243 | 300.3 MB  | #5         |  15% cudatoolkit-10.1.243 | 300.3 MB  | #6         |  16% cudatoolkit-10.1.243 | 300.3 MB  | #7         |  17% cudatoolkit-10.1.243 | 300.3 MB  | #8         |  18% cudatoolkit-10.1
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: C:\Users\DatGuy\MiniConda3\envs\faceswap
  added / updated specs:
    - cudnn==7.6.5
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    cudnn-7.6.5                |       cuda10.1_0       179.1 MB
    ------------------------------------------------------------
                                           Total:       179.1 MB
The following NEW packages will be INSTALLED:
  cudnn              pkgs/main/win-64::cudnn-7.6.5-cuda10.1_0
Downloading and Extracting Packages
cudnn-7.6.5          | 179.1 MB  |            |   0% cudnn-7.6.5          | 179.1 MB  |            |   0% cudnn-7.6.5          | 179.1 MB  | 1          |   2% cudnn-7.6.5          | 179.1 MB  | 3          |   4% cudnn-7.6.5          | 179.1 MB  | 5          |   5% cudnn-7.6.5          | 179.1 MB  | 7          |   7% cudnn-7.6.5          | 179.1 MB  | 9          |   9% cudnn-7.6.5          | 179.1 MB  | #          |  11% cudnn-7.6.5          | 179.1 MB  | #2         |  13% cudnn-7.6.5          | 179.1 MB  | #4         |  15% cudnn-7.6.5          | 179.1 MB  | #6         |  16% cudnn-7.6.5          | 179.1 MB  | #8         |  18% cudnn-7.6.5          | 179.1 MB  | ##         |  20% cudnn-7.6.5          | 179.1 MB  | ##1        |  22% cudnn-7.6.5          | 179.1 MB  | ##3        |  24% cudnn-7.6.5          | 179.1 MB  | ##5        |  26% cudnn-7.6.5          | 179.1 MB  | ##7        |  27% cudnn-7.6.5          | 179.1 MB  | ##9        |  29% cudnn-7.6.5          | 179.1 MB  | ###1       |  31% cudnn-7.6.5     
Preparing transaction: ...working... done Verifying transaction: ...working... done Executing transaction: ...working... done Collecting tensorflow-gpu<2.3.0,>=2.2.0 Downloading tensorflow_gpu-2.2.0-cp38-cp38-win_amd64.whl (460.4 MB) Collecting absl-py>=0.7.0 Downloading absl_py-0.10.0-py3-none-any.whl (127 kB) Collecting tensorflow-gpu-estimator<2.3.0,>=2.2.0 Downloading tensorflow_gpu_estimator-2.2.0-py2.py3-none-any.whl (470 kB) Collecting protobuf>=3.8.0 Downloading protobuf-3.13.0-py2.py3-none-any.whl (438 kB) Collecting grpcio>=1.8.6 Downloading grpcio-1.31.0-cp38-cp38-win_amd64.whl (2.6 MB) Collecting wrapt>=1.11.1 Downloading wrapt-1.12.1.tar.gz (27 kB) Collecting google-pasta>=0.1.8 Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB) Collecting astunparse==1.6.3 Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB) Requirement already satisfied: wheel>=0.26; python_version >= "3" in c:\users\DatGuy\miniconda3\envs\faceswap\lib\site-packages (from tensorflow-gpu<2.3.0,>=2.2.0) (0.34.2) Collecting termcolor>=1.1.0 Downloading termcolor-1.1.0.tar.gz (3.9 kB) Collecting keras-preprocessing>=1.1.0 Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB) Collecting gast==0.3.3 Downloading gast-0.3.3-py2.py3-none-any.whl (9.7 kB) Collecting tensorboard<2.3.0,>=2.2.0 Downloading tensorboard-2.2.2-py3-none-any.whl (3.0 MB) Requirement already satisfied: numpy<2.0,>=1.16.0 in c:\users\DatGuy\miniconda3\envs\faceswap\lib\site-packages (from tensorflow-gpu<2.3.0,>=2.2.0) (1.19.1) Collecting h5py<2.11.0,>=2.10.0 Downloading h5py-2.10.0-cp38-cp38-win_amd64.whl (2.5 MB) Requirement already satisfied: six>=1.12.0 in c:\users\DatGuy\miniconda3\envs\faceswap\lib\site-packages (from tensorflow-gpu<2.3.0,>=2.2.0) (1.15.0) Collecting opt-einsum>=2.3.2 Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB) Collecting scipy==1.4.1; python_version >= "3" Downloading scipy-1.4.1-cp38-cp38-win_amd64.whl (31.0 MB) Requirement already satisfied: setuptools in c:\users\DatGuy\miniconda3\envs\faceswap\lib\site-packages (from protobuf>=3.8.0->tensorflow-gpu<2.3.0,>=2.2.0) (49.6.0.post20200814) Collecting requests<3,>=2.21.0 Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB) Collecting tensorboard-plugin-wit>=1.6.0 Downloading tensorboard_plugin_wit-1.7.0-py3-none-any.whl (779 kB) Collecting werkzeug>=0.11.15 Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB) Collecting markdown>=2.6.8 Downloading Markdown-3.2.2-py3-none-any.whl (88 kB) Collecting google-auth-oauthlib<0.5,>=0.4.1 Downloading google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB) Collecting google-auth<2,>=1.6.3 Downloading google_auth-1.20.1-py2.py3-none-any.whl (91 kB) Requirement already satisfied: certifi>=2017.4.17 in c:\users\DatGuy\miniconda3\envs\faceswap\lib\site-packages (from requests<3,>=2.21.0->tensorboard<2.3.0,>=2.2.0->tensorflow-gpu<2.3.0,>=2.2.0) (2020.6.20) Collecting chardet<4,>=3.0.2 Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB) Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 Downloading urllib3-1.25.10-py2.py3-none-any.whl (127 kB) Collecting idna<3,>=2.5 Downloading idna-2.10-py2.py3-none-any.whl (58 kB) Collecting requests-oauthlib>=0.7.0 Downloading requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB) Collecting pyasn1-modules>=0.2.1 Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB) Collecting cachetools<5.0,>=2.0.0 Downloading cachetools-4.1.1-py3-none-any.whl (10 kB) Collecting rsa<5,>=3.1.4; python_version >= "3.5" Downloading rsa-4.6-py3-none-any.whl (47 kB) Collecting oauthlib>=3.0.0 Downloading oauthlib-3.1.0-py2.py3-none-any.whl (147 kB) Collecting pyasn1<0.5.0,>=0.4.6 Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB) Building wheels for collected packages: wrapt, termcolor Building wheel for wrapt (setup.py): started Building wheel for wrapt (setup.py): finished with status 'done' Created wheel for wrapt: filename=wrapt-1.12.1-py3-none-any.whl size=19558 sha256=b084ae398de5e897e1513d9cc6a7b58bc9c4f756c16e3d05f7596fcbf7c63617 Stored in directory: C:\Users\DatGuy\AppData\Local\Temp\pip-ephem-wheel-cache-mpkf5zlr\wheels\5f\fd\9e\b6cf5890494cb8ef0b5eaff72e5d55a70fb56316007d6dfe73 Building wheel for termcolor (setup.py): started Building wheel for termcolor (setup.py): finished with status 'done' Created wheel for termcolor: filename=termcolor-1.1.0-py3-none-any.whl size=4835 sha256=0762ef4cdbd11f2867af3cf7cea901db1a0a00f6f131adc270911fafa8cb7590 Stored in directory: C:\Users\DatGuy\AppData\Local\Temp\pip-ephem-wheel-cache-mpkf5zlr\wheels\a0\16\9c\5473df82468f958445479c59e784896fa24f4a5fc024b0f501 Successfully built wrapt termcolor Installing collected packages: absl-py, tensorflow-gpu-estimator, protobuf, grpcio, wrapt, google-pasta, astunparse, termcolor, keras-preprocessing, gast, chardet, urllib3, idna, requests, tensorboard-plugin-wit, werkzeug, markdown, pyasn1, pyasn1-modules, cachetools, rsa, google-auth, oauthlib, requests-oauthlib, google-auth-oauthlib, tensorboard, h5py, opt-einsum, scipy, tensorflow-gpu Attempting uninstall: scipy Found existing installation: scipy 1.5.0 Uninstalling scipy-1.5.0: Successfully uninstalled scipy-1.5.0 Successfully installed absl-py-0.10.0 astunparse-1.6.3 cachetools-4.1.1 chardet-3.0.4 gast-0.3.3 google-auth-1.20.1 google-auth-oauthlib-0.4.1 google-pasta-0.2.0 grpcio-1.31.0 h5py-2.10.0 idna-2.10 keras-preprocessing-1.1.2 markdown-3.2.2 oauthlib-3.1.0 opt-einsum-3.3.0 protobuf-3.13.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.24.0 requests-oauthlib-1.3.0 rsa-4.6 scipy-1.4.1 tensorboard-2.2.2 tensorboard-plugin-wit-1.7.0 tensorflow-gpu-2.2.0 tensorflow-gpu-estimator-2.2.0 termcolor-1.1.0 urllib3-1.25.10 werkzeug-1.0.1 wrapt-1.12.1 INFO Running as Root/Admin INFO The tool provides tips for installation and installs required python packages INFO Setup in Windows 10 INFO Installed Python: 3.8.5 64bit INFO Running in Conda INFO Running in a Virtual Environment INFO Encoding: cp1252 INFO Installed pip: 20.2.2 INFO Faceswap config written to: C:\Users\DatGuy\faceswap\config\.faceswap INFO Installing Required Conda Packages. This may take some time... INFO Installing tk INFO Installing Required Python Packages. This may take some time... INFO Installing tqdm>=4.42 INFO Installing psutil>=5.7.0 INFO Installing pathlib==1.0.1 INFO Installing numpy>=1.18.0 INFO Installing opencv-python>=4.1.2.0 INFO "opencv-python>=4.1.2.0" not available in Conda. Installing with pip INFO Installing opencv-python>=4.1.2.0 INFO Installing pillow>=7.0.0 INFO Installing scikit-learn>=0.22.0 INFO Installing fastcluster==1.1.26 INFO Installing matplotlib>=3.0.3,<3.3.0 INFO Installing imageio>=2.8.0 INFO Installing imageio-ffmpeg>=0.4.2 INFO Installing ffmpy==0.2.3 INFO ffmpy==0.2.3 not available in Conda. Installing with pip INFO Installing ffmpy==0.2.3 INFO Installing pywin32>=227 INFO Installing tensorflow-gpu>=2.2.0,<2.3.0 INFO "tensorflow-gpu>=2.2.0,<2.3.0" not available in Conda. Installing with pip INFO Installing cudatoolkit==10.1.243 INFO Installing cudnn==7.6.5 INFO Installing tensorflow-gpu>=2.2.0,<2.3.0 INFO Installing git+https://github.com/deepfakes/nvidia-ml-py3.git INFO All python3 dependencies are met. You are good to go.
Enter: 'python faceswap.py -h' to see the options 'python faceswap.py gui' to launch the GUI Creating GUI Launcher Output folder: C:\Users\DatGuy\faceswap Creating Desktop Shortcut Create shortcut: C:\Users\DatGuy\Desktop\FaceSwap.lnk ExecShell: open https://www.faceswap.dev Visit https://www.faceswap.dev for help and support. Completed

What i tried was to uninstall minicoda and removed all folders related to the installations. But without luck. Anyone got an idea what I can try?

User avatar
torzdf
Posts: 2667
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: Tensorflow problems with new version

Post by torzdf »

Ich Nichten Lichten.

My word is final

User avatar
torzdf
Posts: 2667
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: Tensorflow problems with new version

Post by torzdf »

More specifically, make sure you have followed these steps:

app.php/faqpage#f1r1

If it still doesn't work, then make sure you have the latest VC++ Redistributable installed:

https://support.microsoft.com/en-gb/hel ... -downloads

Reboot try running again.

My word is final

User avatar
Hanrahahanrahan
Posts: 8
Joined: Sat Aug 22, 2020 1:44 pm
Has thanked: 4 times
Been thanked: 1 time

Re: Tensorflow problems with new version

Post by Hanrahahanrahan »

VC++ Redistributable did the trick! Faceswap didn't like it but had to go along with it. ;)

User avatar
xy007
Posts: 1
Joined: Sun Aug 30, 2020 8:08 pm
Has thanked: 1 time

Fail to launch

Post by xy007 »

I've been having issues getting faceswap to run. After I launch the bat file in cmd I get the below errors. I tried installing on my C drive and also additional drives with no luck. I also verified that tensorflow is installed at the below location. Any help would be appreciated.

Windows 10: version 2004 os build 19041.450
CPU: Ryzen 9 3900x
GPU: Gtx 1080ti, driver 452.06

Edit: At one point the install failed and I had to restart the installer. I wonder if a file in MiniConda3 didnt get installed correctly/overwritten in new installs. I will delete that folder and try installing again...
Edit 2: Nope still get the same error output...

Code: Select all

08/30/2020 15:06:23 MainProcess     MainThread      logger          log_setup                 INFO     Log level set to: INFO
08/30/2020 15:06:24 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):
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\Player1\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR        from tensorflow.python.pywrap_tensorflow_internal import *
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\Player1\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR        _pywrap_tensorflow_internal = swig_import_helper()
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\Player1\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR        _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\Player1\MiniConda3\envs\faceswap\lib\imp.py", line 242, in load_module
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR        return load_dynamic(name, filename, file)
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR      File "C:\Users\Player1\MiniConda3\envs\faceswap\lib\imp.py", line 342, in load_dynamic
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR        return _load(spec)
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR    ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
08/30/2020 15:06:24 MainProcess     MainThread      launcher        execute_script            ERROR    
08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR
08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR Failed to load the native TensorFlow runtime. 08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR
08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR See https://www.tensorflow.org/install/errors 08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR
08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR for some common reasons and solutions. Include the entire stack trace 08/30/2020 15:06:24 MainProcess MainThread launcher execute_script ERROR above this error message when asking for help.

Edit 3:
I tried manually installing TensorFlow with: "pip install tensorflow". During this process I got this error warning (from pip install):

code C:\WINDOWS\system32>pip install tensorflow
Collecting tensorflow
Downloading tensorflow-2.3.0-cp38-cp38-win_amd64.whl (342.5 MB)
|████████████████████████████████| 342.5 MB 20 kB/s
Requirement already satisfied: grpcio>=1.8.6 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.31.0)
Requirement already satisfied: six>=1.12.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.15.0)
Requirement already satisfied: protobuf>=3.9.2 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (3.13.0)
Requirement already satisfied: wrapt>=1.11.1 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.12.1)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.1.2)
Collecting tensorboard<3,>=2.3.0
Downloading tensorboard-2.3.0-py3-none-any.whl (6.8 MB)
|████████████████████████████████| 6.8 MB ...
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (2.10.0)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (0.10.0)
Requirement already satisfied: gast==0.3.3 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: google-pasta>=0.1.8 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: scipy==1.4.1 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.4.1)
Collecting tensorflow-estimator<2.4.0,>=2.3.0
Downloading tensorflow_estimator-2.3.0-py2.py3-none-any.whl (459 kB)
|████████████████████████████████| 459 kB 6.8 MB/s
Requirement already satisfied: astunparse==1.6.3 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: wheel>=0.26 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorflow) (0.35.1)
Collecting numpy<1.19.0,>=1.16.0
Downloading numpy-1.18.5-cp38-cp38-win_amd64.whl (12.8 MB)
|████████████████████████████████| 12.8 MB 6.4 MB/s
Requirement already satisfied: setuptools in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from protobuf>=3.9.2->tensorflow) (49.6.0.post20200814)
Requirement already satisfied: markdown>=2.6.8 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (3.2.2)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.21.0)
Requirement already satisfied: werkzeug>=0.11.15 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.0.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.4.1)
Requirement already satisfied: requests<3,>=2.21.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.24.0)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.7.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.1.1)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.6)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (1.3.0)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.25.10)
Requirement already satisfied: idna<3,>=2.5 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2020.6.20)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in c:\users\Player1\miniconda3\envs\faceswap\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (3.1.0)
Installing collected packages: numpy, tensorboard, tensorflow-estimator, tensorflow
Attempting uninstall: numpy
Found existing installation: numpy 1.19.1
Uninstalling numpy-1.19.1:
Successfully uninstalled numpy-1.19.1
Attempting uninstall: tensorboard
Found existing installation: tensorboard 2.2.2
Uninstalling tensorboard-2.2.2:
Successfully uninstalled tensorboard-2.2.2
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

tensorflow-gpu 2.2.0 requires tensorboard<2.3.0,>=2.2.0, but you'll have tensorboard 2.3.0 which is incompatible.
Successfully installed numpy-1.18.5 tensorboard-2.3.0 tensorflow-2.3.0 tensorflow-estimator-2.3.0[/code]

After that I tried running faceswap again and get this:
code C:\Users\Player1>"C:\Users\Player1\Miniconda3\scripts\activate.bat" && conda activate "faceswap" && python "C:\Users\Player1\faceswap\faceswap.py" gui
Setting Faceswap backend to NVIDIA
08/30/2020 16:01:03 INFO Log level set to: INFO
08/30/2020 16:01:03 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):
08/30/2020 16:01:03 ERROR File "C:\Users\Player1\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
08/30/2020 16:01:03 ERROR from tensorflow.python._pywrap_tensorflow_internal import *
08/30/2020 16:01:03 ERROR ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
08/30/2020 16:01:03 ERROR
08/30/2020 16:01:03 ERROR
08/30/2020 16:01:03 ERROR Failed to load the native TensorFlow runtime.
08/30/2020 16:01:03 ERROR
08/30/2020 16:01:03 ERROR See https://www.tensorflow.org/install/errors
08/30/2020 16:01:03 ERROR
08/30/2020 16:01:03 ERROR for some common reasons and solutions. Include the entire stack trace
08/30/2020 16:01:03 ERROR above this error message when asking for help.[/code]

User avatar
torzdf
Posts: 2667
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 131 times
Been thanked: 625 times

Re: Fail to launch

Post by torzdf »

My word is final

Locked