Search code examples
pythontensorflowmachine-learningkerastensorflow2.0

DeepFaceLab_NVIDIA outputs an error during the 'data_src faceset extract' - TensorFlow


In the DeepFaceLab the 4th and/or 5th process which is extracting the faceset from the data_src and/or data_dst outputs this error:

[wf] Face type ( f/wf/head ?:help ) :
wf
[0] Max number of faces from image ( ?:help ) :
0
[512] Image size ( 256-2048 ?:help ) :
512
[90] Jpeg quality ( 1-100 ?:help ) :
90
[n] Write debug images to aligned_debug? ( y/n ) :
n
Extracting faces...

Error while subprocess initialization: Traceback (most recent call last):
  File "C:\DeepFaceLab\DeepFaceLab_NVIDIA\_internal\python-3.6.8\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.

During handling of the above exception, another exception occurred:

On line 64 inside pywrap_tensorflow.py the code and the comments are written like this:

  # pylint: disable=wildcard-import,g-import-not-at-top,line-too-long,undefined-variable
  try:
    from tensorflow.python._pywrap_tensorflow_internal import *
  # This try catch logic is because there is no bazel equivalent for py_extension.
  # Externally in opensource we must enable exceptions to load the shared object
  # by exposing the PyInit symbols with pybind. This error will only be
  # caught internally or if someone changes the name of the target _pywrap_tensorflow_internal.

Similar issues have been raised in GitHub but no concrete answer can be found. Help is very much appreciated.


Solution

  • So after a long time, I finally found the fix. Since I know the training will take a very long time I decided to do this on a laptop that had no GPU. For this very reason, the fix was to do the 10th step first or the cmd file named 10)Make CPU only. Doing so will uninstall the preinstalled TensorFlow and download an older version so an Internet Connection will be required. Additionally, executing it cannot be undone, this means DeepFaceLab will now run through CPU only 4ever unless you reinstall it again.

    This should hopefully solve the problem.