Default MaxPoolingOp only supports NHWC on device type CPU

The Extraction process failing on you, and you aren't getting an error back with clear instructions? Tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

User avatar
creviceart
Posts: 2
Joined: Thu Aug 27, 2020 1:10 pm

Default MaxPoolingOp only supports NHWC on device type CPU

Post by creviceart »

I just downloaded faceswap. I followed the guide for extracting the video but it gives me an error. This is the error message

Code: Select all

08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Num plugins for phase: 1, scaling: 1.0, vram required: 2240.0
08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Required: 2240.0, available: 3771. Adding phase 'mask_0' to current phase: ['align']
08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Num plugins for phase: 1, scaling: 1.0, vram required: 2240.0
08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Required: 2240.0, available: 3771. Adding phase 'mask_1' to current phase: ['align', 'mask_0']
08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Total phases: 2, Phases: [['detect'], ['align', 'mask_0', 'mask_1']]
08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_plugin_batchsize     DEBUG    requested_batchsizes: [4], batchsizes: [1], remaining vram: -549.0
08/27/2020 14:56:15 MainProcess     MainThread      pipeline        _set_plugin_batchsize     INFO     Reset batch sizes due to available VRAM: Detect: 1
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_detect_in', maxsize: 1)
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_detect_in')
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_detect_in'
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_detect_in'
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_align_in', maxsize: 1)
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_align_in')
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_align_in'
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_align_in'
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_0_in', maxsize: 1)
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_0_in')
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_0_in'
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_0_in'
08/27/2020 14:56:15 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_1_in', maxsize: 1)
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_1_in')
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_1_in'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_1_in'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_1_out', maxsize: 1)
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_1_out')
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_1_out'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_1_out'
08/27/2020 14:56:16 MainProcess     MainThread      pipeline        _add_queues               DEBUG    Queues: {'extract0_detect_in': <queue.Queue object at 0x0000021C72F0ABE0>, 'extract0_align_in': <queue.Queue object at 0x0000021C72F0ACA0>, 'extract0_mask_0_in': <queue.Queue object at 0x0000021C72F0AC10>, 'extract0_mask_1_in': <queue.Queue object at 0x0000021C72F0A8E0>, 'extract0_mask_1_out': <queue.Queue object at 0x0000021C72F0A490>}
08/27/2020 14:56:16 MainProcess     MainThread      pipeline        __init__                  DEBUG    Initialized Extractor
08/27/2020 14:56:16 MainProcess     MainThread      extract         __init__                  DEBUG    Initialized Extract
08/27/2020 14:56:16 MainProcess     MainThread      extract         process                   INFO     Starting, this may take a while...
08/27/2020 14:56:16 MainProcess     MainThread      extract         _threaded_redirector      DEBUG    Threading task: (Task: 'load')
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: '_load', thread_count: 1)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: '_load'
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): '_load'
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: '_load_0'
08/27/2020 14:56:16 MainProcess     _load_0         extract         _load                     DEBUG    Load Images: Start
08/27/2020 14:56:16 MainProcess     _load_0         image           load                      DEBUG    Initializing Load Generator
08/27/2020 14:56:16 MainProcess     _load_0         image           _set_thread               DEBUG    Setting thread
08/27/2020 14:56:16 MainProcess     _load_0         multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'ImagesLoader', thread_count: 1)
08/27/2020 14:56:16 MainProcess     _load_0         multithreading  __init__                  DEBUG    Initialized MultiThread: 'ImagesLoader'
08/27/2020 14:56:16 MainProcess     _load_0         image           _set_thread               DEBUG    Set thread: <lib.multithreading.MultiThread object at 0x0000021C72FA5880>
08/27/2020 14:56:16 MainProcess     _load_0         multithreading  start                     DEBUG    Starting thread(s): 'ImagesLoader'
08/27/2020 14:56:16 MainProcess     _load_0         multithreading  start                     DEBUG    Starting thread 1 of 1: 'ImagesLoader_0'
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads '_load': 1
08/27/2020 14:56:16 MainProcess     MainThread      image           __init__                  DEBUG    Initializing ImagesSaver: (path: D:\estrazione, queue_size: 8, as_bytes: True)
08/27/2020 14:56:16 MainProcess     MainThread      image           __init__                  DEBUG    Initializing ImagesSaver: (path: D:\estrazione, queue_size: 8, args: None)
08/27/2020 14:56:16 MainProcess     ImagesLoader_0  image           _process                  DEBUG    Load iterator: <bound method ImagesLoader._from_video of <lib.image.ImagesLoader object at 0x0000021C5BE70BB0>>
08/27/2020 14:56:16 MainProcess     ImagesLoader_0  image           _from_video               DEBUG    Loading frames from video: 'D:\gif\Nuovo progetto video1.mp4'
08/27/2020 14:56:16 MainProcess     _load_0         multithreading  start                     DEBUG    Started all threads 'ImagesLoader': 1
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'ImagesSaver'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'ImagesSaver', maxsize: 8)
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'ImagesSaver')
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'ImagesSaver'
08/27/2020 14:56:16 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    Launching detect plugin
08/27/2020 14:56:16 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    in_qname: extract0_detect_in, out_qname: extract0_align_in
08/27/2020 14:56:16 MainProcess     MainThread      _base           initialize                DEBUG    initialize Detect: (args: (), kwargs: {'in_queue': <queue.Queue object at 0x0000021C72F0ABE0>, 'out_queue': <queue.Queue object at 0x0000021C72F0ACA0>})
08/27/2020 14:56:16 MainProcess     MainThread      _base           initialize                INFO     Initializing S3FD (Detect)...
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'detect0_predict_s3fd'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'detect0_predict_s3fd', maxsize: 1)
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'detect0_predict_s3fd')
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'detect0_predict_s3fd'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'detect0_post_s3fd'
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'detect0_post_s3fd', maxsize: 1)
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'detect0_post_s3fd')
08/27/2020 14:56:16 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'detect0_post_s3fd'
08/27/2020 14:56:16 MainProcess     MainThread      _base           _compile_threads          DEBUG    Compiling detect threads
08/27/2020 14:56:16 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_input, function: <bound method Detect.process_input of <plugins.extract.detect.s3fd.Detect object at 0x0000021C72E42310>>, in_queue: <queue.Queue object at 0x0000021C72F0ABE0>, out_queue: <queue.Queue object at 0x0000021C72E428B0>)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_input', thread_count: 1)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_input'
08/27/2020 14:56:16 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_input
08/27/2020 14:56:16 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_predict, function: <bound method Detector._predict of <plugins.extract.detect.s3fd.Detect object at 0x0000021C72E42310>>, in_queue: <queue.Queue object at 0x0000021C72E428B0>, out_queue: <queue.Queue object at 0x0000021C72F063D0>)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_predict', thread_count: 1)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_predict'
08/27/2020 14:56:16 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_predict
08/27/2020 14:56:16 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_output, function: <bound method Detect.process_output of <plugins.extract.detect.s3fd.Detect object at 0x0000021C72E42310>>, in_queue: <queue.Queue object at 0x0000021C72F063D0>, out_queue: <queue.Queue object at 0x0000021C72F0ACA0>)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_output', thread_count: 1)
08/27/2020 14:56:16 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_output'
08/27/2020 14:56:16 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_output
08/27/2020 14:56:16 MainProcess     MainThread      _base           _compile_threads          DEBUG    Compiled detect threads: [<lib.multithreading.MultiThread object at 0x0000021C72E42610>, <lib.multithreading.MultiThread object at 0x0000021C72F06550>, <lib.multithreading.MultiThread object at 0x0000021C72F06580>]
08/27/2020 14:56:16 MainProcess     MainThread      s3fd            __init__                  DEBUG    Initializing: S3fd: (model_path: 'C:\Users\15CS2084NL\faceswap\plugins\extract\detect\.cache\s3fd_keras_v1.h5', model_kwargs: {'custom_objects': {'O2K_Add': <class 'plugins.extract.detect.s3fd.AddO2K'>, 'O2K_Slice': <class 'plugins.extract.detect.s3fd.SliceO2K'>, 'O2K_Sum': <class 'plugins.extract.detect.s3fd.SumO2K'>, 'O2K_Sqrt': <class 'plugins.extract.detect.s3fd.SqrtO2K'>, 'O2K_Pow': <class 'plugins.extract.detect.s3fd.PowO2K'>, 'O2K_ConstantLayer': <class 'plugins.extract.detect.s3fd.ConstantLayerO2K'>, 'O2K_Div': <class 'plugins.extract.detect.s3fd.DivO2K'>}}, allow_growth: False, exclude_gpus: None, confidence: 0.7)
08/27/2020 14:56:28 MainProcess     MainThread      session         load_model                VERBOSE  Initializing plugin model: S3FD
08/27/2020 14:56:29 MainProcess     MainThread      s3fd            __init__                  DEBUG    Initialized: S3fd
08/27/2020 14:56:29 MainProcess     MainThread      _base           initialize                INFO     Initialized S3FD (Detect) with batchsize of 1
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_input'
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_input_0'
08/27/2020 14:56:29 MainProcess     detect_s3fd_input_0 _base           _thread_process           DEBUG    threading: (function: 'process_input')
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_input': 1
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_predict'
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_predict_0'
08/27/2020 14:56:29 MainProcess     detect_s3fd_predict_0 _base           _thread_process           DEBUG    threading: (function: '_predict')
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_predict': 1
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_output'
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_output_0'
08/27/2020 14:56:29 MainProcess     detect_s3fd_output_0 _base           _thread_process           DEBUG    threading: (function: 'process_output')
08/27/2020 14:56:29 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_output': 1
08/27/2020 14:56:29 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    Launched detect plugin
08/27/2020 14:56:29 MainProcess     MainThread      pipeline        detected_faces            DEBUG    Running Detection. Phase: '['detect']'
08/27/2020 14:56:29 MainProcess     detect_s3fd_predict_0 multithreading  run                       DEBUG    Error in thread (detect_s3fd_predict_0):  Default MaxPoolingOp only supports NHWC on device type CPU\n	 [[node model_1/LAYER_4/MaxPool (defined at \faceswap\lib\model\session.py:77) ]] [Op:__inference_predict_function_1399]\n\nFunction call stack:\npredict_function\n
08/27/2020 14:56:30 MainProcess     MainThread      multithreading  check_and_raise_error     DEBUG    Thread error caught: [(<class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, InvalidArgumentError(), <traceback object at 0x0000021C72F04F00>)]
Traceback (most recent call last):
  File "C:\Users\15CS2084NL\faceswap\lib\cli\launcher.py", line 156, in execute_script
    process.process()
  File "C:\Users\15CS2084NL\faceswap\scripts\extract.py", line 117, in process
    self._run_extraction()
  File "C:\Users\15CS2084NL\faceswap\scripts\extract.py", line 213, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tqdm\std.py", line 1130, in __iter__
    for obj in iterable:
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\pipeline.py", line 233, in detected_faces
    if self._check_and_raise_error():
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\pipeline.py", line 655, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\_base.py", line 302, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "C:\Users\15CS2084NL\faceswap\lib\multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "C:\Users\15CS2084NL\faceswap\lib\multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\_base.py", line 420, in _thread_process
    batch = function(batch)
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\detect\_base.py", line 208, in _predict
    batch = self.predict(batch)
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\detect\s3fd.py", line 54, in predict
    predictions = self.model.predict(batch["feed"])
  File "C:\Users\15CS2084NL\faceswap\lib\model\session.py", line 77, in predict
    return self._model.predict(feed, batch_size=batch_size)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\engine\training.py", line 88, in _method_wrapper
    return method(self, *args, **kwargs)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1268, in predict
    tmp_batch_outputs = predict_function(iterator)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\def_function.py", line 580, in __call__
    result = self._call(*args, **kwds)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\def_function.py", line 650, in _call
    return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds)  # pylint: disable=protected-access
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 1661, in _filtered_call
    return self._call_flat(
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 1745, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 593, in call
    outputs = execute.execute(
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError:  Default MaxPoolingOp only supports NHWC on device type CPU
	 [[node model_1/LAYER_4/MaxPool (defined at \faceswap\lib\model\session.py:77) ]] [Op:__inference_predict_function_1399]

Function call stack:
predict_function


============ System Information ============
encoding:            cp1252
git_branch:          master
git_commits:         1363fa8 lib.image - More information on image read errors
gpu_cuda:            11.0
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: GeForce MX250
gpu_devices_active:  GPU_0
gpu_driver:          451.82
gpu_vram:            GPU_0: 4096MB
os_machine:          AMD64
os_platform:         Windows-10-10.0.18362-SP0
os_release:          10
py_command:          C:\Users\15CS2084NL\faceswap\faceswap.py extract -i D:/gif/Nuovo progetto video1.mp4 -o D:/estrazione -D s3fd -A fan -nm none -min 20 -l 0.4 -een 1 -sz 256 -si 0 -L INFO -gui
py_conda_version:    conda 4.8.4
py_implementation:   CPython
py_version:          3.8.5
py_virtual_env:      True
sys_cores:           8
sys_processor:       Intel64 Family 6 Model 142 Stepping 11, GenuineIntel
sys_ram:             Total: 16271MB, Available: 9003MB, Used: 7267MB, Free: 9003MB

=============== Pip Packages ===============
absl-py==0.10.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
cycler==0.10.0
fastcluster==1.1.26
ffmpy==0.2.3
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
imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work
joblib @ file:///tmp/build/80754af9/joblib_1594236160679/work
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
Markdown==3.2.2
matplotlib @ file:///C:/ci/matplotlib-base_1592837548929/work
mkl-fft==1.1.0
mkl-random==1.1.1
mkl-service==2.3.0
numpy @ file:///C:/ci/numpy_and_numpy_base_1596215850360/work
nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6
oauthlib==3.1.0
olefile==0.46
opencv-python==4.4.0.42
opt-einsum==3.3.0
pathlib==1.0.1
Pillow @ file:///C:/ci/pillow_1594298230227/work
protobuf==3.13.0
psutil @ file:///C:/ci/psutil_1598370330503/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==2.4.7
python-dateutil==2.8.1
pywin32==227
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scikit-learn @ file:///C:/ci/scikit-learn_1598377018496/work
scipy==1.4.1
sip==4.19.13
six==1.15.0
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
threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl
tornado==6.0.4
tqdm @ file:///tmp/build/80754af9/tqdm_1596810128862/work
urllib3==1.25.10
Werkzeug==1.0.1
wincertstore==0.2
wrapt==1.12.1

============== Conda Packages ==============
# packages in environment at C:\Users\15CS2084NL\MiniConda3\envs\faceswap:
#
# Name                    Version                   Build  Channel
absl-py                   0.10.0                   pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
blas                      1.0                         mkl  
ca-certificates 2020.7.22 0
cachetools 4.1.1 pypi_0 pypi certifi 2020.6.20 py38_0
chardet 3.0.4 pypi_0 pypi cudatoolkit 10.1.243 h74a9793_0
cudnn 7.6.5 cuda10.1_0
cycler 0.10.0 py38_0
fastcluster 1.1.26 py38hbe40bda_1 conda-forge ffmpeg 4.3.1 ha925a31_0 conda-forge ffmpy 0.2.3 pypi_0 pypi freetype 2.10.2 hd328e21_0
gast 0.3.3 pypi_0 pypi git 2.23.0 h6bb4b03_0
google-auth 1.20.1 pypi_0 pypi google-auth-oauthlib 0.4.1 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi grpcio 1.31.0 pypi_0 pypi h5py 2.10.0 pypi_0 pypi icc_rt 2019.0.0 h0cc432a_1
icu 58.2 ha925a31_3
idna 2.10 pypi_0 pypi imageio 2.9.0 py_0
imageio-ffmpeg 0.4.2 py_0 conda-forge intel-openmp 2020.2 254
joblib 0.16.0 py_0
jpeg 9b hb83a4c4_2
keras-preprocessing 1.1.2 pypi_0 pypi kiwisolver 1.2.0 py38h74a9793_0
libpng 1.6.37 h2a8f88b_0
libtiff 4.1.0 h56a325e_1
lz4-c 1.9.2 h62dcd97_1
markdown 3.2.2 pypi_0 pypi matplotlib 3.2.2 0
matplotlib-base 3.2.2 py38h64f37c6_0
mkl 2020.2 256
mkl-service 2.3.0 py38hb782905_0
mkl_fft 1.1.0 py38h45dec08_0
mkl_random 1.1.1 py38h47e9c7a_0
numpy 1.19.1 py38h5510c5b_0
numpy-base 1.19.1 py38ha3acd2a_0
nvidia-ml-py3 7.352.1 pypi_0 pypi oauthlib 3.1.0 pypi_0 pypi olefile 0.46 py_0
opencv-python 4.4.0.42 pypi_0 pypi openssl 1.1.1g he774522_1
opt-einsum 3.3.0 pypi_0 pypi pathlib 1.0.1 py_1
pillow 7.2.0 py38hcc1f983_0
pip 20.2.2 py38_0
protobuf 3.13.0 pypi_0 pypi psutil 5.7.2 py38he774522_0
pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pyparsing 2.4.7 py_0
pyqt 5.9.2 py38ha925a31_4
python 3.8.5 he1778fa_0
python-dateutil 2.8.1 py_0
python_abi 3.8 1_cp38 conda-forge pywin32 227 py38he774522_1
qt 5.9.7 vc14h73c81de_0
requests 2.24.0 pypi_0 pypi requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.6 pypi_0 pypi scikit-learn 0.23.2 py38h47e9c7a_0
scipy 1.4.1 pypi_0 pypi setuptools 49.6.0 py38_0
sip 4.19.13 py38ha925a31_0
six 1.15.0 py_0
sqlite 3.33.0 h2a8f88b_0
tensorboard 2.2.2 pypi_0 pypi tensorboard-plugin-wit 1.7.0 pypi_0 pypi tensorflow-gpu 2.2.0 pypi_0 pypi tensorflow-gpu-estimator 2.2.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi threadpoolctl 2.1.0 pyh5ca1d4c_0
tk 8.6.10 he774522_0
tornado 6.0.4 py38he774522_1
tqdm 4.48.2 py_0
urllib3 1.25.10 pypi_0 pypi vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_3
werkzeug 1.0.1 pypi_0 pypi wheel 0.35.1 py_0
wincertstore 0.2 py38_0
wrapt 1.12.1 pypi_0 pypi xz 5.2.5 h62dcd97_0
zlib 1.2.11 h62dcd97_4
zstd 1.4.5 h04227a9_0 ================= Configs ================== --------- .faceswap --------- backend: nvidia --------- convert.ini --------- [color.color_transfer] clip: True preserve_paper: True [color.manual_balance] colorspace: HSV balance_1: 0.0 balance_2: 0.0 balance_3: 0.0 contrast: 0.0 brightness: 0.0 [color.match_hist] threshold: 99.0 [mask.box_blend] type: gaussian distance: 11.0 radius: 5.0 passes: 1 [mask.mask_blend] type: normalized kernel_size: 3 passes: 4 threshold: 4 erosion: 0.0 [scaling.sharpen] method: unsharp_mask amount: 150 radius: 0.3 threshold: 5.0 [writer.ffmpeg] container: mp4 codec: libx264 crf: 23 preset: medium tune: none profile: auto level: auto skip_mux: False [writer.gif] fps: 25 loop: 0 palettesize: 256 subrectangles: False [writer.opencv] format: png draw_transparent: False jpg_quality: 75 png_compress_level: 3 [writer.pillow] format: png draw_transparent: False optimize: False gif_interlace: True jpg_quality: 75 png_compress_level: 3 tif_compression: tiff_deflate --------- extract.ini --------- [global] allow_growth: False [align.fan] batch-size: 12 [detect.cv2_dnn] confidence: 50 [detect.mtcnn] minsize: 20 threshold_1: 0.6 threshold_2: 0.7 threshold_3: 0.7 scalefactor: 0.709 batch-size: 8 [detect.s3fd] confidence: 70 batch-size: 4 [mask.unet_dfl] batch-size: 8 [mask.vgg_clear] batch-size: 6 [mask.vgg_obstructed] batch-size: 2 --------- gui.ini --------- [global] fullscreen: False tab: extract options_panel_width: 30 console_panel_height: 20 icon_size: 14 font: default font_size: 9 autosave_last_session: prompt timeout: 120 auto_load_model_stats: True --------- train.ini --------- [global] coverage: 68.75 icnr_init: False conv_aware_init: False optimizer: adam learning_rate: 5e-05 reflect_padding: False allow_growth: False mixed_precision: False convert_batchsize: 16 [global.loss] loss_function: ssim mask_loss_function: mse l2_reg_term: 100 penalized_mask_loss: True mask_type: extended mask_blur_kernel: 3 mask_threshold: 4 learn_mask: False [model.dfl_h128] lowmem: False [model.dfl_sae] input_size: 128 clipnorm: True architecture: df autoencoder_dims: 0 encoder_dims: 42 decoder_dims: 21 multiscale_decoder: False [model.dlight] features: best details: good output_size: 256 [model.original] lowmem: False [model.realface] input_size: 64 output_size: 128 dense_nodes: 1536 complexity_encoder: 128 complexity_decoder: 512 [model.unbalanced] input_size: 128 lowmem: False clipnorm: True nodes: 1024 complexity_encoder: 128 complexity_decoder_a: 384 complexity_decoder_b: 512 [model.villain] lowmem: False [trainer.original] preview_images: 14 zoom_amount: 5 rotation_range: 10 shift_range: 5 flip_chance: 50 color_lightness: 30 color_ab: 8 color_clahe_chance: 50 color_clahe_max_size: 4
by torzdf » Thu Aug 27, 2020 9:31 pm

Remove your system installed Cuda and try again.

Go to full post
User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: problems with extract

Post by torzdf »

Remove your system installed Cuda and try again.

My word is final

User avatar
blessedcoolant
Posts: 5
Joined: Thu Aug 27, 2020 10:55 pm

Re: problems with extract

Post by blessedcoolant »

torzdf wrote: Thu Aug 27, 2020 9:31 pm

Remove your system installed Cuda and try again.

I don't think this is an issue with the CUDA installation. The other modules that utilized the installed CUDA Toolkit are working perfectly fine. It's just the extract module that is throwing these errors out.

I've tried reinstalling CUDA and even degrading the driver version to older versions. None of them actually work. While the rest of the modules do work properly.

My CUDA version in the crash log is 10.0 and cuDNN version is 7.6.5 as recommended. Driver version is 452.06 but I've tried downgrading it to various versions in the 44x series all the way down to the 41x series that initially released with CUDA 10. But none of them work.

Like I've mentioned before, the issue only seems to be with the extract module. Not with the other modules that use CUDA.

A lot of people have been reporting it.
viewtopic.php?f=5&t=880
viewtopic.php?f=5&t=865
viewtopic.php?f=5&t=854

And when I switch to another detector like mtcnn, it works but there are warnings thrown out.

WARNING 11 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x000002175A5E7F70> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings is likely due to passing python objects instead of tensors. Also, tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. Please refer to https://www.tensorflow.org/tutorials/cu ... ensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.

Hopefully that helps with info to resolve this issue. Thanks in advance.

Last edited by blessedcoolant on Fri Aug 28, 2020 12:22 am, edited 1 time in total.
User avatar
bryanlyon
Site Admin
Posts: 793
Joined: Fri Jul 12, 2019 12:49 am
Answers: 44
Location: San Francisco
Has thanked: 4 times
Been thanked: 218 times
Contact:

Re: problems with extract

Post by bryanlyon »

All of those were fixed by following the directions. You need to remove the System CUDA, update your Nvidia driver and reinstall Faceswap and it'll work fine.

User avatar
blessedcoolant
Posts: 5
Joined: Thu Aug 27, 2020 10:55 pm

Re: problems with extract

Post by blessedcoolant »

bryanlyon wrote: Fri Aug 28, 2020 12:25 am

All of those were fixed by following the directions. You need to remove the System CUDA, update your Nvidia driver and reinstall Faceswap and it'll work fine.

Thing is, I do not use the installer. I manually setup mine ages ago with a bunch of customized changes. It worked perfectly fine until my last repo pull a few days ago. Trying to figure out which change is causing this.

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: problems with extract

Post by torzdf »

Ok. You can choose not to remove Cuda, but you'll remain stuck in CPU mode. Up to you.

Conda hasn't released Tensorflow 2.2. for Windows yet, so it's installed with pip. It's compiled for Cuda version 10.2 which exists inside your Conda environment, but it's picking up your global 11.0 version.

So. Yeah. Uninstall your System Cuda. You probably won't t even need to do any of the other steps.

My word is final

User avatar
blessedcoolant
Posts: 5
Joined: Thu Aug 27, 2020 10:55 pm

Re: problems with extract

Post by blessedcoolant »

torzdf wrote: Fri Aug 28, 2020 12:32 am

Ok. You can choose not to remove Cuda, but you'll remain stuck in CPU mode. Up to you.

Conda hasn't released Tensorflow 2.2. for Windows yet, so it's installed with pip. It's compiled for Cuda version 10.2 which exists inside your Conda environment, but it's picking up your global 11.0 version.

So. Yeah. Uninstall your System Cuda. You probably won't t even need to do any of the other steps.

I think you have me confused with the OP. Two different people. I have CUDA 10.0 installed with 7.6.5 on the cuDNN. OP is showing 11.0.

Either way, I'll try a clean install and see if that works.

User avatar
blessedcoolant
Posts: 5
Joined: Thu Aug 27, 2020 10:55 pm

Re: problems with extract

Post by blessedcoolant »

Nope. A fresh install does not work either. There is no CUDA version installed globally. The faceswap installer setup runs without any errors. Yet the same error pops up. And that too only on Extract.

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: problems with extract

Post by torzdf »

You will need to post the crash report for me to be able to diagnose on a different system

My word is final

User avatar
creviceart
Posts: 2
Joined: Thu Aug 27, 2020 1:10 pm

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by creviceart »

Hello. Me again. I have tried uninstalling CUDA, updated the graphics card drivers and reinstalled faceswap but it always gives me this error

Code: Select all

08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Num plugins for phase: 1, scaling: 1.0, vram required: 2240.0
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Required: 2240.0, available: 3771. Adding phase 'mask_0' to current phase: ['align']
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Num plugins for phase: 1, scaling: 1.0, vram required: 2240.0
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Required: 2240.0, available: 3771. Adding phase 'mask_1' to current phase: ['align', 'mask_0']
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Total phases: 2, Phases: [['detect'], ['align', 'mask_0', 'mask_1']]
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_plugin_batchsize     DEBUG    requested_batchsizes: [4], batchsizes: [1], remaining vram: -549.0
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _set_plugin_batchsize     INFO     Reset batch sizes due to available VRAM: Detect: 1
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_detect_in', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_detect_in')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_detect_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_detect_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_align_in', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_align_in')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_align_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_align_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_0_in', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_0_in')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_0_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_0_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_1_in', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_1_in')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_1_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_1_in'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_1_out', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_1_out')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_1_out'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_1_out'
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _add_queues               DEBUG    Queues: {'extract0_detect_in': <queue.Queue object at 0x00000162927702B0>, 'extract0_align_in': <queue.Queue object at 0x000001629281B160>, 'extract0_mask_0_in': <queue.Queue object at 0x000001629281BA30>, 'extract0_mask_1_in': <queue.Queue object at 0x000001629281B7F0>, 'extract0_mask_1_out': <queue.Queue object at 0x000001629281BD90>}
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        __init__                  DEBUG    Initialized Extractor
08/29/2020 21:04:56 MainProcess     MainThread      extract         __init__                  DEBUG    Initialized Extract
08/29/2020 21:04:56 MainProcess     MainThread      extract         process                   INFO     Starting, this may take a while...
08/29/2020 21:04:56 MainProcess     MainThread      extract         _threaded_redirector      DEBUG    Threading task: (Task: 'load')
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: '_load', thread_count: 1)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: '_load'
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): '_load'
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: '_load_0'
08/29/2020 21:04:56 MainProcess     _load_0         extract         _load                     DEBUG    Load Images: Start
08/29/2020 21:04:56 MainProcess     _load_0         image           load                      DEBUG    Initializing Load Generator
08/29/2020 21:04:56 MainProcess     _load_0         image           _set_thread               DEBUG    Setting thread
08/29/2020 21:04:56 MainProcess     _load_0         multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'ImagesLoader', thread_count: 1)
08/29/2020 21:04:56 MainProcess     _load_0         multithreading  __init__                  DEBUG    Initialized MultiThread: 'ImagesLoader'
08/29/2020 21:04:56 MainProcess     _load_0         image           _set_thread               DEBUG    Set thread: <lib.multithreading.MultiThread object at 0x0000016292830130>
08/29/2020 21:04:56 MainProcess     _load_0         multithreading  start                     DEBUG    Starting thread(s): 'ImagesLoader'
08/29/2020 21:04:56 MainProcess     _load_0         multithreading  start                     DEBUG    Starting thread 1 of 1: 'ImagesLoader_0'
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads '_load': 1
08/29/2020 21:04:56 MainProcess     MainThread      image           __init__                  DEBUG    Initializing ImagesSaver: (path: C:\Users\15CS2084NL\Downloads, queue_size: 8, as_bytes: True)
08/29/2020 21:04:56 MainProcess     MainThread      image           __init__                  DEBUG    Initializing ImagesSaver: (path: C:\Users\15CS2084NL\Downloads, queue_size: 8, args: None)
08/29/2020 21:04:56 MainProcess     ImagesLoader_0  image           _process                  DEBUG    Load iterator: <bound method ImagesLoader._from_video of <lib.image.ImagesLoader object at 0x00000162FC30C580>>
08/29/2020 21:04:56 MainProcess     ImagesLoader_0  image           _from_video               DEBUG    Loading frames from video: 'C:\Users\15CS2084NL\Downloads\rachel-vs-amy-2.mp4'
08/29/2020 21:04:56 MainProcess     _load_0         multithreading  start                     DEBUG    Started all threads 'ImagesLoader': 1
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'ImagesSaver'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'ImagesSaver', maxsize: 8)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'ImagesSaver')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'ImagesSaver'
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    Launching detect plugin
08/29/2020 21:04:56 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    in_qname: extract0_detect_in, out_qname: extract0_align_in
08/29/2020 21:04:56 MainProcess     MainThread      _base           initialize                DEBUG    initialize Detect: (args: (), kwargs: {'in_queue': <queue.Queue object at 0x00000162927702B0>, 'out_queue': <queue.Queue object at 0x000001629281B160>})
08/29/2020 21:04:56 MainProcess     MainThread      _base           initialize                INFO     Initializing S3FD (Detect)...
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'detect0_predict_s3fd'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'detect0_predict_s3fd', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'detect0_predict_s3fd')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'detect0_predict_s3fd'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'detect0_post_s3fd'
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'detect0_post_s3fd', maxsize: 1)
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'detect0_post_s3fd')
08/29/2020 21:04:56 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'detect0_post_s3fd'
08/29/2020 21:04:56 MainProcess     MainThread      _base           _compile_threads          DEBUG    Compiling detect threads
08/29/2020 21:04:56 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_input, function: <bound method Detect.process_input of <plugins.extract.detect.s3fd.Detect object at 0x0000016292770340>>, in_queue: <queue.Queue object at 0x00000162927702B0>, out_queue: <queue.Queue object at 0x000001629281B3A0>)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_input', thread_count: 1)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_input'
08/29/2020 21:04:56 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_input
08/29/2020 21:04:56 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_predict, function: <bound method Detector._predict of <plugins.extract.detect.s3fd.Detect object at 0x0000016292770340>>, in_queue: <queue.Queue object at 0x000001629281B3A0>, out_queue: <queue.Queue object at 0x00000162927FE9D0>)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_predict', thread_count: 1)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_predict'
08/29/2020 21:04:56 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_predict
08/29/2020 21:04:56 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_output, function: <bound method Detect.process_output of <plugins.extract.detect.s3fd.Detect object at 0x0000016292770340>>, in_queue: <queue.Queue object at 0x00000162927FE9D0>, out_queue: <queue.Queue object at 0x000001629281B160>)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_output', thread_count: 1)
08/29/2020 21:04:56 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_output'
08/29/2020 21:04:56 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_output
08/29/2020 21:04:56 MainProcess     MainThread      _base           _compile_threads          DEBUG    Compiled detect threads: [<lib.multithreading.MultiThread object at 0x000001629281B490>, <lib.multithreading.MultiThread object at 0x00000162927FEC70>, <lib.multithreading.MultiThread object at 0x00000162927FEB80>]
08/29/2020 21:04:56 MainProcess     MainThread      s3fd            __init__                  DEBUG    Initializing: S3fd: (model_path: 'C:\Users\15CS2084NL\faceswap\plugins\extract\detect\.cache\s3fd_keras_v1.h5', model_kwargs: {'custom_objects': {'O2K_Add': <class 'plugins.extract.detect.s3fd.AddO2K'>, 'O2K_Slice': <class 'plugins.extract.detect.s3fd.SliceO2K'>, 'O2K_Sum': <class 'plugins.extract.detect.s3fd.SumO2K'>, 'O2K_Sqrt': <class 'plugins.extract.detect.s3fd.SqrtO2K'>, 'O2K_Pow': <class 'plugins.extract.detect.s3fd.PowO2K'>, 'O2K_ConstantLayer': <class 'plugins.extract.detect.s3fd.ConstantLayerO2K'>, 'O2K_Div': <class 'plugins.extract.detect.s3fd.DivO2K'>}}, allow_growth: False, exclude_gpus: None, confidence: 0.7)
08/29/2020 21:04:56 MainProcess     MainThread      session         load_model                VERBOSE  Initializing plugin model: S3FD
08/29/2020 21:04:57 MainProcess     MainThread      s3fd            __init__                  DEBUG    Initialized: S3fd
08/29/2020 21:04:57 MainProcess     MainThread      _base           initialize                INFO     Initialized S3FD (Detect) with batchsize of 1
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_input'
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_input_0'
08/29/2020 21:04:57 MainProcess     detect_s3fd_input_0 _base           _thread_process           DEBUG    threading: (function: 'process_input')
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_input': 1
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_predict'
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_predict_0'
08/29/2020 21:04:57 MainProcess     detect_s3fd_predict_0 _base           _thread_process           DEBUG    threading: (function: '_predict')
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_predict': 1
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_output'
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_output_0'
08/29/2020 21:04:57 MainProcess     detect_s3fd_output_0 _base           _thread_process           DEBUG    threading: (function: 'process_output')
08/29/2020 21:04:57 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_output': 1
08/29/2020 21:04:57 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    Launched detect plugin
08/29/2020 21:04:57 MainProcess     MainThread      pipeline        detected_faces            DEBUG    Running Detection. Phase: '['detect']'
08/29/2020 21:04:58 MainProcess     detect_s3fd_predict_0 multithreading  run                       DEBUG    Error in thread (detect_s3fd_predict_0):  Default MaxPoolingOp only supports NHWC on device type CPU\n	 [[node model_1/LAYER_4/MaxPool (defined at \faceswap\lib\model\session.py:77) ]] [Op:__inference_predict_function_1399]\n\nFunction call stack:\npredict_function\n
08/29/2020 21:04:58 MainProcess     MainThread      multithreading  check_and_raise_error     DEBUG    Thread error caught: [(<class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, InvalidArgumentError(), <traceback object at 0x000001629965F8C0>)]
Traceback (most recent call last):
  File "C:\Users\15CS2084NL\faceswap\lib\cli\launcher.py", line 156, in execute_script
    process.process()
  File "C:\Users\15CS2084NL\faceswap\scripts\extract.py", line 117, in process
    self._run_extraction()
  File "C:\Users\15CS2084NL\faceswap\scripts\extract.py", line 213, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tqdm\std.py", line 1130, in __iter__
    for obj in iterable:
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\pipeline.py", line 233, in detected_faces
    if self._check_and_raise_error():
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\pipeline.py", line 655, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\_base.py", line 302, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "C:\Users\15CS2084NL\faceswap\lib\multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "C:\Users\15CS2084NL\faceswap\lib\multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\_base.py", line 420, in _thread_process
    batch = function(batch)
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\detect\_base.py", line 208, in _predict
    batch = self.predict(batch)
  File "C:\Users\15CS2084NL\faceswap\plugins\extract\detect\s3fd.py", line 54, in predict
    predictions = self.model.predict(batch["feed"])
  File "C:\Users\15CS2084NL\faceswap\lib\model\session.py", line 77, in predict
    return self._model.predict(feed, batch_size=batch_size)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\engine\training.py", line 88, in _method_wrapper
    return method(self, *args, **kwargs)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1268, in predict
    tmp_batch_outputs = predict_function(iterator)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\def_function.py", line 580, in __call__
    result = self._call(*args, **kwds)
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\def_function.py", line 650, in _call
    return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds)  # pylint: disable=protected-access
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 1661, in _filtered_call
    return self._call_flat(
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 1745, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 593, in call
    outputs = execute.execute(
  File "C:\Users\15CS2084NL\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError:  Default MaxPoolingOp only supports NHWC on device type CPU
	 [[node model_1/LAYER_4/MaxPool (defined at \faceswap\lib\model\session.py:77) ]] [Op:__inference_predict_function_1399]

Function call stack:
predict_function


============ System Information ============
encoding:            cp1252
git_branch:          master
git_commits:         35b6cd1 Merge branch 'staging'
gpu_cuda:            No global version found. Check Conda packages for Conda Cuda
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: GeForce MX250
gpu_devices_active:  GPU_0
gpu_driver:          452.06
gpu_vram:            GPU_0: 4096MB
os_machine:          AMD64
os_platform:         Windows-10-10.0.18362-SP0
os_release:          10
py_command:          C:\Users\15CS2084NL\faceswap\faceswap.py extract -i C:/Users/15CS2084NL/Downloads/rachel-vs-amy-2.mp4 -o C:/Users/15CS2084NL/Downloads -D s3fd -A fan -nm none -min 0 -l 0.4 -een 1 -sz 256 -si 0 -L INFO -gui
py_conda_version:    conda 4.8.4
py_implementation:   CPython
py_version:          3.8.5
py_virtual_env:      True
sys_cores:           8
sys_processor:       Intel64 Family 6 Model 142 Stepping 11, GenuineIntel
sys_ram:             Total: 16271MB, Available: 10465MB, Used: 5805MB, Free: 10465MB

=============== Pip Packages ===============
absl-py==0.10.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
cycler==0.10.0
fastcluster==1.1.26
ffmpy==0.2.3
gast==0.3.3
google-auth==1.21.0
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.31.0
h5py==2.10.0
idna==2.10
imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work
joblib @ file:///tmp/build/80754af9/joblib_1594236160679/work
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
Markdown==3.2.2
matplotlib @ file:///C:/ci/matplotlib-base_1592837548929/work
mkl-fft==1.1.0
mkl-random==1.1.1
mkl-service==2.3.0
numpy @ file:///C:/ci/numpy_and_numpy_base_1596215850360/work
nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6
oauthlib==3.1.0
olefile==0.46
opencv-python==4.4.0.42
opt-einsum==3.3.0
pathlib==1.0.1
Pillow @ file:///C:/ci/pillow_1594298230227/work
protobuf==3.13.0
psutil @ file:///C:/ci/psutil_1598370330503/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==2.4.7
python-dateutil==2.8.1
pywin32==227
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scikit-learn @ file:///C:/ci/scikit-learn_1598377018496/work
scipy==1.4.1
sip==4.19.13
six==1.15.0
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
threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl
tornado==6.0.4
tqdm @ file:///tmp/build/80754af9/tqdm_1596810128862/work
urllib3==1.25.10
Werkzeug==1.0.1
wincertstore==0.2
wrapt==1.12.1

============== Conda Packages ==============
# packages in environment at C:\Users\15CS2084NL\MiniConda3\envs\faceswap:
#
# Name                    Version                   Build  Channel
absl-py                   0.10.0                   pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
blas                      1.0                         mkl  
ca-certificates 2020.7.22 0
cachetools 4.1.1 pypi_0 pypi certifi 2020.6.20 py38_0
chardet 3.0.4 pypi_0 pypi cudatoolkit 10.1.243 h74a9793_0
cudnn 7.6.5 cuda10.1_0
cycler 0.10.0 py38_0
fastcluster 1.1.26 py38hbe40bda_1 conda-forge ffmpeg 4.3.1 ha925a31_0 conda-forge ffmpy 0.2.3 pypi_0 pypi freetype 2.10.2 hd328e21_0
gast 0.3.3 pypi_0 pypi git 2.23.0 h6bb4b03_0
google-auth 1.21.0 pypi_0 pypi google-auth-oauthlib 0.4.1 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi grpcio 1.31.0 pypi_0 pypi h5py 2.10.0 pypi_0 pypi icc_rt 2019.0.0 h0cc432a_1
icu 58.2 ha925a31_3
idna 2.10 pypi_0 pypi imageio 2.9.0 py_0
imageio-ffmpeg 0.4.2 py_0 conda-forge intel-openmp 2020.2 254
joblib 0.16.0 py_0
jpeg 9b hb83a4c4_2
keras-preprocessing 1.1.2 pypi_0 pypi kiwisolver 1.2.0 py38h74a9793_0
libpng 1.6.37 h2a8f88b_0
libtiff 4.1.0 h56a325e_1
lz4-c 1.9.2 h62dcd97_1
markdown 3.2.2 pypi_0 pypi matplotlib 3.2.2 0
matplotlib-base 3.2.2 py38h64f37c6_0
mkl 2020.2 256
mkl-service 2.3.0 py38hb782905_0
mkl_fft 1.1.0 py38h45dec08_0
mkl_random 1.1.1 py38h47e9c7a_0
numpy 1.19.1 py38h5510c5b_0
numpy-base 1.19.1 py38ha3acd2a_0
nvidia-ml-py3 7.352.1 pypi_0 pypi oauthlib 3.1.0 pypi_0 pypi olefile 0.46 py_0
opencv-python 4.4.0.42 pypi_0 pypi openssl 1.1.1g he774522_1
opt-einsum 3.3.0 pypi_0 pypi pathlib 1.0.1 py_1
pillow 7.2.0 py38hcc1f983_0
pip 20.2.2 py38_0
protobuf 3.13.0 pypi_0 pypi psutil 5.7.2 py38he774522_0
pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pyparsing 2.4.7 py_0
pyqt 5.9.2 py38ha925a31_4
python 3.8.5 he1778fa_0
python-dateutil 2.8.1 py_0
python_abi 3.8 1_cp38 conda-forge pywin32 227 py38he774522_1
qt 5.9.7 vc14h73c81de_0
requests 2.24.0 pypi_0 pypi requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.6 pypi_0 pypi scikit-learn 0.23.2 py38h47e9c7a_0
scipy 1.4.1 pypi_0 pypi setuptools 49.6.0 py38_0
sip 4.19.13 py38ha925a31_0
six 1.15.0 py_0
sqlite 3.33.0 h2a8f88b_0
tensorboard 2.2.2 pypi_0 pypi tensorboard-plugin-wit 1.7.0 pypi_0 pypi tensorflow-gpu 2.2.0 pypi_0 pypi tensorflow-gpu-estimator 2.2.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi threadpoolctl 2.1.0 pyh5ca1d4c_0
tk 8.6.10 he774522_0
tornado 6.0.4 py38he774522_1
tqdm 4.48.2 py_0
urllib3 1.25.10 pypi_0 pypi vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_3
werkzeug 1.0.1 pypi_0 pypi wheel 0.35.1 py_0
wincertstore 0.2 py38_0
wrapt 1.12.1 pypi_0 pypi xz 5.2.5 h62dcd97_0
zlib 1.2.11 h62dcd97_4
zstd 1.4.5 h04227a9_0 ================= Configs ================== --------- .faceswap --------- backend: nvidia --------- convert.ini --------- [color.color_transfer] clip: True preserve_paper: True [color.manual_balance] colorspace: HSV balance_1: 0.0 balance_2: 0.0 balance_3: 0.0 contrast: 0.0 brightness: 0.0 [color.match_hist] threshold: 99.0 [mask.box_blend] type: gaussian distance: 11.0 radius: 5.0 passes: 1 [mask.mask_blend] type: normalized kernel_size: 3 passes: 4 threshold: 4 erosion: 0.0 [scaling.sharpen] method: unsharp_mask amount: 150 radius: 0.3 threshold: 5.0 [writer.ffmpeg] container: mp4 codec: libx264 crf: 23 preset: medium tune: none profile: auto level: auto skip_mux: False [writer.gif] fps: 25 loop: 0 palettesize: 256 subrectangles: False [writer.opencv] format: png draw_transparent: False jpg_quality: 75 png_compress_level: 3 [writer.pillow] format: png draw_transparent: False optimize: False gif_interlace: True jpg_quality: 75 png_compress_level: 3 tif_compression: tiff_deflate --------- extract.ini --------- [global] allow_growth: False [align.fan] batch-size: 12 [detect.cv2_dnn] confidence: 50 [detect.mtcnn] minsize: 20 threshold_1: 0.6 threshold_2: 0.7 threshold_3: 0.7 scalefactor: 0.709 batch-size: 8 [detect.s3fd] confidence: 70 batch-size: 4 [mask.unet_dfl] batch-size: 8 [mask.vgg_clear] batch-size: 6 [mask.vgg_obstructed] batch-size: 2 --------- gui.ini --------- [global] fullscreen: False tab: extract options_panel_width: 30 console_panel_height: 20 icon_size: 14 font: default font_size: 9 autosave_last_session: prompt timeout: 120 auto_load_model_stats: True --------- train.ini --------- [global] coverage: 68.75 icnr_init: False conv_aware_init: False optimizer: adam learning_rate: 5e-05 reflect_padding: False allow_growth: False mixed_precision: False convert_batchsize: 16 [global.loss] loss_function: ssim mask_loss_function: mse l2_reg_term: 100 eye_multiplier: 12 mouth_multiplier: 8 penalized_mask_loss: True mask_type: extended mask_blur_kernel: 3 mask_threshold: 4 learn_mask: False [model.dfl_h128] lowmem: False [model.dfl_sae] input_size: 128 clipnorm: True architecture: df autoencoder_dims: 0 encoder_dims: 42 decoder_dims: 21 multiscale_decoder: False [model.dlight] features: best details: good output_size: 256 [model.original] lowmem: False [model.realface] input_size: 64 output_size: 128 dense_nodes: 1536 complexity_encoder: 128 complexity_decoder: 512 [model.unbalanced] input_size: 128 lowmem: False clipnorm: True nodes: 1024 complexity_encoder: 128 complexity_decoder_a: 384 complexity_decoder_b: 512 [model.villain] lowmem: False [trainer.original] preview_images: 14 zoom_amount: 5 rotation_range: 10 shift_range: 5 flip_chance: 50 color_lightness: 30 color_ab: 8 color_clahe_chance: 50 color_clahe_max_size: 4
User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by torzdf »

So my next guess would be your GPU is just not supported by Tensorflow 2.x

See here for checking and possible solutions:

viewtopic.php?p=3183#p3183

My word is final

User avatar
blessedcoolant
Posts: 5
Joined: Thu Aug 27, 2020 10:55 pm

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by blessedcoolant »

torzdf wrote: Sun Aug 30, 2020 10:38 am

So my next guess would be your GPU is just not supported by Tensorflow 2.x

See here for checking and possible solutions:

viewtopic.php?p=3183#p3183

So this actually enabled me to debug my problem. Unlike the OP, I do have a compatible GPU. But while checking if I was, I realized that Tensorflow 2.2 was not detecting my CUDA version despite CUDA_PATH being set.

So here's what I did. For anyone else facing a similar problem.

First run the command above and check of your GPU is supported. You need 3.5 and above. If it is -- then

  • Install CUDA 10.1 from here: https://developer.nvidia.com/cuda-10.1- ... chive-base (while installing, you can only install CUDA by selecting custom installation if you don't want to install Graphic Card drivers or if you have the latest ones already)
  • Install cuDNN 7.6.5 for 10.1 from here: https://developer.nvidia.com/cudnn (You'll need to login)
  • Copy the contents of the cuDNN zip folder to the bin folder of your CUDA installation.
  • Once these are installed, set the following in your PATH environment variable.

Code: Select all

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include

Remember to change the location above if you did a custom installation location for your CUDA stuff.

Once this is done, the S3FD should work like it used to.

User avatar
BrokenClock
Posts: 5
Joined: Mon Aug 31, 2020 5:48 am
Been thanked: 1 time

Setup questions about gpu

Post by BrokenClock »

I'm having a similar issue too. I just got a new PC (within the past month)with an NVIDIA GTX 1660 Super. No matter what I do, it defaulting to the CPU not the GPU.

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Setup questions about gpu

Post by torzdf »

My word is final

User avatar
BrokenClock
Posts: 5
Joined: Mon Aug 31, 2020 5:48 am
Been thanked: 1 time

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by BrokenClock »

No Conda Packages installed

============ System Information ============
encoding: cp1252
git_branch: master
git_commits: 1f9e834 typofix
gpu_cuda: No global version found. Check Conda packages for Conda Cuda
gpu_cudnn: No global version found. Check Conda packages for Conda cuDNN
gpu_devices: GPU_0: GeForce GTX 1660 SUPER
gpu_devices_active: GPU_0
gpu_driver: 451.48
gpu_vram: GPU_0: 6144MB
os_machine: AMD64
os_platform: Windows-10-10.0.18362-SP0
os_release: 10

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by torzdf »

Start > Anaconda Prompt

Code: Select all

conda activate faceswap
cd faceswap
python update_deps.py

My word is final

User avatar
helpimbeing
Posts: 6
Joined: Mon May 04, 2020 2:22 am
Has thanked: 1 time

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by helpimbeing »

Not to hijack another thread, but I am getting this same error and have tried the solutions in this thread and none of them worked. Did a full uninstall as shown in the guide and updated my drivers and restarted and used the packaged Faceswap installer to reinstall everything with no success. I checked my GPU as shown in the linked thread and it is 6.1 so there shouldn't be any problems with Tensorflow 2.2 support.

Code: Select all

09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Num plugins for phase: 0, scaling: 1.0, vram required: 0.0
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Required: 0.0, available: 1005. Adding phase 'mask_0' to current phase: []
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Num plugins for phase: 0, scaling: 1.0, vram required: 0.0
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Required: 0.0, available: 1005. Adding phase 'mask_1' to current phase: ['mask_0']
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_phases               DEBUG    Total phases: 3, Phases: [['detect'], ['align'], ['mask_0', 'mask_1']]
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_plugin_batchsize     DEBUG    requested_batchsizes: [4], batchsizes: [1], remaining vram: -3315.0
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _set_plugin_batchsize     INFO     Reset batch sizes due to available VRAM: Detect: 1
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_detect_in', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_detect_in')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_detect_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_detect_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_align_in', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_align_in')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_align_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_align_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_0_in', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_0_in')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_0_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_0_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_1_in', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_1_in')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_1_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_1_in'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'extract0_mask_1_out', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'extract0_mask_1_out')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'extract0_mask_1_out'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'extract0_mask_1_out'
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _add_queues               DEBUG    Queues: {'extract0_detect_in': <queue.Queue object at 0x000001E906178190>, 'extract0_align_in': <queue.Queue object at 0x000001E9062060D0>, 'extract0_mask_0_in': <queue.Queue object at 0x000001E906206910>, 'extract0_mask_1_in': <queue.Queue object at 0x000001E9062066D0>, 'extract0_mask_1_out': <queue.Queue object at 0x000001E906206C70>}
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        __init__                  DEBUG    Initialized Extractor
09/08/2020 11:15:25 MainProcess     MainThread      extract         __init__                  DEBUG    Initialized Extract
09/08/2020 11:15:25 MainProcess     MainThread      extract         process                   INFO     Starting, this may take a while...
09/08/2020 11:15:25 MainProcess     MainThread      extract         _threaded_redirector      DEBUG    Threading task: (Task: 'load')
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: '_load', thread_count: 1)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: '_load'
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): '_load'
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: '_load_0'
09/08/2020 11:15:25 MainProcess     _load_0         extract         _load                     DEBUG    Load Images: Start
09/08/2020 11:15:25 MainProcess     _load_0         image           load                      DEBUG    Initializing Load Generator
09/08/2020 11:15:25 MainProcess     _load_0         image           _set_thread               DEBUG    Setting thread
09/08/2020 11:15:25 MainProcess     _load_0         multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'ImagesLoader', thread_count: 1)
09/08/2020 11:15:25 MainProcess     _load_0         multithreading  __init__                  DEBUG    Initialized MultiThread: 'ImagesLoader'
09/08/2020 11:15:25 MainProcess     _load_0         image           _set_thread               DEBUG    Set thread: <lib.multithreading.MultiThread object at 0x000001E906206FD0>
09/08/2020 11:15:25 MainProcess     _load_0         multithreading  start                     DEBUG    Starting thread(s): 'ImagesLoader'
09/08/2020 11:15:25 MainProcess     _load_0         multithreading  start                     DEBUG    Starting thread 1 of 1: 'ImagesLoader_0'
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads '_load': 1
09/08/2020 11:15:25 MainProcess     MainThread      image           __init__                  DEBUG    Initializing ImagesSaver: (path: C:\Users\user\Desktop\fakes\target\test, queue_size: 8, as_bytes: True)
09/08/2020 11:15:25 MainProcess     MainThread      image           __init__                  DEBUG    Initializing ImagesSaver: (path: C:\Users\user\Desktop\fakes\target\test, queue_size: 8, args: None)
09/08/2020 11:15:25 MainProcess     ImagesLoader_0  image           _process                  DEBUG    Load iterator: <bound method ImagesLoader._from_video of <lib.image.ImagesLoader object at 0x000001E96FE3A5B0>>
09/08/2020 11:15:25 MainProcess     ImagesLoader_0  image           _from_video               DEBUG    Loading frames from video: 'C:\Users\user\Desktop\fakes\target\fake1\_SsPsieDmsLhbXPV.mp4'
09/08/2020 11:15:25 MainProcess     _load_0         multithreading  start                     DEBUG    Started all threads 'ImagesLoader': 1
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'ImagesSaver'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'ImagesSaver', maxsize: 8)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'ImagesSaver')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'ImagesSaver'
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    Launching detect plugin
09/08/2020 11:15:25 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    in_qname: extract0_detect_in, out_qname: extract0_align_in
09/08/2020 11:15:25 MainProcess     MainThread      _base           initialize                DEBUG    initialize Detect: (args: (), kwargs: {'in_queue': <queue.Queue object at 0x000001E906178190>, 'out_queue': <queue.Queue object at 0x000001E9062060D0>})
09/08/2020 11:15:25 MainProcess     MainThread      _base           initialize                INFO     Initializing S3FD (Detect)...
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'detect0_predict_s3fd'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'detect0_predict_s3fd', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'detect0_predict_s3fd')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'detect0_predict_s3fd'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager getting: 'detect0_post_s3fd'
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager adding: (name: 'detect0_post_s3fd', maxsize: 1)
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   add_queue                 DEBUG    QueueManager added: (name: 'detect0_post_s3fd')
09/08/2020 11:15:25 MainProcess     MainThread      queue_manager   get_queue                 DEBUG    QueueManager got: 'detect0_post_s3fd'
09/08/2020 11:15:25 MainProcess     MainThread      _base           _compile_threads          DEBUG    Compiling detect threads
09/08/2020 11:15:25 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_input, function: <bound method Detect.process_input of <plugins.extract.detect.s3fd.Detect object at 0x000001E906178220>>, in_queue: <queue.Queue object at 0x000001E906178190>, out_queue: <queue.Queue object at 0x000001E906206370>)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_input', thread_count: 1)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_input'
09/08/2020 11:15:25 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_input
09/08/2020 11:15:25 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_predict, function: <bound method Detector._predict of <plugins.extract.detect.s3fd.Detect object at 0x000001E906178220>>, in_queue: <queue.Queue object at 0x000001E906206370>, out_queue: <queue.Queue object at 0x000001E9061F3FA0>)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_predict', thread_count: 1)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_predict'
09/08/2020 11:15:25 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_predict
09/08/2020 11:15:25 MainProcess     MainThread      _base           _add_thread               DEBUG    Adding thread: (name: detect_s3fd_output, function: <bound method Detect.process_output of <plugins.extract.detect.s3fd.Detect object at 0x000001E906178220>>, in_queue: <queue.Queue object at 0x000001E9061F3FA0>, out_queue: <queue.Queue object at 0x000001E9062060D0>)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initializing MultiThread: (target: 'detect_s3fd_output', thread_count: 1)
09/08/2020 11:15:25 MainProcess     MainThread      multithreading  __init__                  DEBUG    Initialized MultiThread: 'detect_s3fd_output'
09/08/2020 11:15:25 MainProcess     MainThread      _base           _add_thread               DEBUG    Added thread: detect_s3fd_output
09/08/2020 11:15:25 MainProcess     MainThread      _base           _compile_threads          DEBUG    Compiled detect threads: [<lib.multithreading.MultiThread object at 0x000001E906206340>, <lib.multithreading.MultiThread object at 0x000001E9061F3C40>, <lib.multithreading.MultiThread object at 0x000001E9061F3C70>]
09/08/2020 11:15:25 MainProcess     MainThread      s3fd            __init__                  DEBUG    Initializing: S3fd: (model_path: 'C:\Users\user\faceswap\plugins\extract\detect\.cache\s3fd_keras_v1.h5', model_kwargs: {'custom_objects': {'O2K_Add': <class 'plugins.extract.detect.s3fd.AddO2K'>, 'O2K_Slice': <class 'plugins.extract.detect.s3fd.SliceO2K'>, 'O2K_Sum': <class 'plugins.extract.detect.s3fd.SumO2K'>, 'O2K_Sqrt': <class 'plugins.extract.detect.s3fd.SqrtO2K'>, 'O2K_Pow': <class 'plugins.extract.detect.s3fd.PowO2K'>, 'O2K_ConstantLayer': <class 'plugins.extract.detect.s3fd.ConstantLayerO2K'>, 'O2K_Div': <class 'plugins.extract.detect.s3fd.DivO2K'>}}, allow_growth: False, exclude_gpus: None, confidence: 0.7)
09/08/2020 11:15:25 MainProcess     MainThread      session         load_model                VERBOSE  Initializing plugin model: S3FD
09/08/2020 11:15:27 MainProcess     MainThread      s3fd            __init__                  DEBUG    Initialized: S3fd
09/08/2020 11:15:27 MainProcess     MainThread      _base           initialize                INFO     Initialized S3FD (Detect) with batchsize of 1
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_input'
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_input_0'
09/08/2020 11:15:27 MainProcess     detect_s3fd_input_0 _base           _thread_process           DEBUG    threading: (function: 'process_input')
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_input': 1
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_predict'
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_predict_0'
09/08/2020 11:15:27 MainProcess     detect_s3fd_predict_0 _base           _thread_process           DEBUG    threading: (function: '_predict')
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_predict': 1
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread(s): 'detect_s3fd_output'
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Starting thread 1 of 1: 'detect_s3fd_output_0'
09/08/2020 11:15:27 MainProcess     detect_s3fd_output_0 _base           _thread_process           DEBUG    threading: (function: 'process_output')
09/08/2020 11:15:27 MainProcess     MainThread      multithreading  start                     DEBUG    Started all threads 'detect_s3fd_output': 1
09/08/2020 11:15:27 MainProcess     MainThread      pipeline        _launch_plugin            DEBUG    Launched detect plugin
09/08/2020 11:15:27 MainProcess     MainThread      pipeline        detected_faces            DEBUG    Running Detection. Phase: '['detect']'
09/08/2020 11:15:27 MainProcess     detect_s3fd_predict_0 multithreading  run                       DEBUG    Error in thread (detect_s3fd_predict_0):  Default MaxPoolingOp only supports NHWC on device type CPU\n	 [[node model_1/LAYER_4/MaxPool (defined at \faceswap\lib\model\session.py:77) ]] [Op:__inference_predict_function_1399]\n\nFunction call stack:\npredict_function\n
09/08/2020 11:15:28 MainProcess     MainThread      multithreading  check_and_raise_error     DEBUG    Thread error caught: [(<class 'tensorflow.python.framework.errors_impl.InvalidArgumentError'>, InvalidArgumentError(), <traceback object at 0x000001E90C8FA0C0>)]
Traceback (most recent call last):
  File "C:\Users\user\faceswap\lib\cli\launcher.py", line 156, in execute_script
    process.process()
  File "C:\Users\user\faceswap\scripts\extract.py", line 117, in process
    self._run_extraction()
  File "C:\Users\user\faceswap\scripts\extract.py", line 213, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tqdm\std.py", line 1130, in __iter__
    for obj in iterable:
  File "C:\Users\user\faceswap\plugins\extract\pipeline.py", line 233, in detected_faces
    if self._check_and_raise_error():
  File "C:\Users\user\faceswap\plugins\extract\pipeline.py", line 655, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "C:\Users\user\faceswap\plugins\extract\_base.py", line 302, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "C:\Users\user\faceswap\lib\multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "C:\Users\user\faceswap\lib\multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\user\faceswap\plugins\extract\_base.py", line 420, in _thread_process
    batch = function(batch)
  File "C:\Users\user\faceswap\plugins\extract\detect\_base.py", line 208, in _predict
    batch = self.predict(batch)
  File "C:\Users\user\faceswap\plugins\extract\detect\s3fd.py", line 54, in predict
    predictions = self.model.predict(batch["feed"])
  File "C:\Users\user\faceswap\lib\model\session.py", line 77, in predict
    return self._model.predict(feed, batch_size=batch_size)
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\engine\training.py", line 88, in _method_wrapper
    return method(self, *args, **kwargs)
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\keras\engine\training.py", line 1268, in predict
    tmp_batch_outputs = predict_function(iterator)
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\def_function.py", line 580, in __call__
    result = self._call(*args, **kwds)
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\def_function.py", line 650, in _call
    return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds)  # pylint: disable=protected-access
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 1661, in _filtered_call
    return self._call_flat(
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 1745, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\function.py", line 593, in call
    outputs = execute.execute(
  File "C:\Users\user\MiniConda3\envs\faceswap\lib\site-packages\tensorflow\python\eager\execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError:  Default MaxPoolingOp only supports NHWC on device type CPU
	 [[node model_1/LAYER_4/MaxPool (defined at \faceswap\lib\model\session.py:77) ]] [Op:__inference_predict_function_1399]

Function call stack:
predict_function


============ System Information ============
encoding:            cp1252
git_branch:          master
git_commits:         5530346 Bugfix - Pre-caching masks when warp-to-landmarks is disabled
gpu_cuda:            No global version found. Check Conda packages for Conda Cuda
gpu_cudnn:           No global version found. Check Conda packages for Conda cuDNN
gpu_devices:         GPU_0: GeForce MX250
gpu_devices_active:  GPU_0
gpu_driver:          452.06
gpu_vram:            GPU_0: 2048MB
os_machine:          AMD64
os_platform:         Windows-10-10.0.18362-SP0
os_release:          10
py_command:          C:\Users\user\faceswap\faceswap.py extract -i C:/Users/user/Desktop/fakes/target/fake1/_SsPsieDmsLhbXPV.mp4 -o C:/Users/user/Desktop/fakes/target/test -D s3fd -A fan -nm none -min 0 -l 0.4 -een 1 -sz 256 -si 0 -L INFO -gui
py_conda_version:    conda 4.8.4
py_implementation:   CPython
py_version:          3.8.5
py_virtual_env:      True
sys_cores:           8
sys_processor:       Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
sys_ram:             Total: 16105MB, Available: 7252MB, Used: 8853MB, Free: 7252MB

=============== Pip Packages ===============
absl-py==0.10.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
cycler==0.10.0
fastcluster==1.1.26
ffmpy==0.2.3
gast==0.3.3
google-auth==1.21.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.31.0
h5py==2.10.0
idna==2.10
imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work
imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work
joblib @ file:///tmp/build/80754af9/joblib_1594236160679/work
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
Markdown==3.2.2
matplotlib @ file:///C:/ci/matplotlib-base_1592837548929/work
mkl-fft==1.1.0
mkl-random==1.1.1
mkl-service==2.3.0
numpy @ file:///C:/ci/numpy_and_numpy_base_1596215850360/work
nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6
oauthlib==3.1.0
olefile==0.46
opencv-python==4.4.0.42
opt-einsum==3.3.0
pathlib==1.0.1
Pillow @ file:///C:/ci/pillow_1594298230227/work
protobuf==3.13.0
psutil @ file:///C:/ci/psutil_1598370330503/work
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==2.4.7
python-dateutil==2.8.1
pywin32==227
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scikit-learn @ file:///C:/ci/scikit-learn_1598377018496/work
scipy==1.4.1
sip==4.19.13
six==1.15.0
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
threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl
tornado==6.0.4
tqdm @ file:///tmp/build/80754af9/tqdm_1596810128862/work
urllib3==1.25.10
Werkzeug==1.0.1
wincertstore==0.2
wrapt==1.12.1

============== Conda Packages ==============
# packages in environment at C:\Users\user\MiniConda3\envs\faceswap:
#
# Name                    Version                   Build  Channel
absl-py                   0.10.0                   pypi_0    pypi
astunparse                1.6.3                    pypi_0    pypi
blas                      1.0                         mkl  
ca-certificates 2020.7.22 0
cachetools 4.1.1 pypi_0 pypi certifi 2020.6.20 py38_0
chardet 3.0.4 pypi_0 pypi cudatoolkit 10.1.243 h74a9793_0
cudnn 7.6.5 cuda10.1_0
cycler 0.10.0 py38_0
fastcluster 1.1.26 py38hbe40bda_1 conda-forge ffmpeg 4.3.1 ha925a31_0 conda-forge ffmpy 0.2.3 pypi_0 pypi freetype 2.10.2 hd328e21_0
gast 0.3.3 pypi_0 pypi git 2.23.0 h6bb4b03_0
google-auth 1.21.1 pypi_0 pypi google-auth-oauthlib 0.4.1 pypi_0 pypi google-pasta 0.2.0 pypi_0 pypi grpcio 1.31.0 pypi_0 pypi h5py 2.10.0 pypi_0 pypi icc_rt 2019.0.0 h0cc432a_1
icu 58.2 ha925a31_3
idna 2.10 pypi_0 pypi imageio 2.9.0 py_0
imageio-ffmpeg 0.4.2 py_0 conda-forge intel-openmp 2020.2 254
joblib 0.16.0 py_0
jpeg 9b hb83a4c4_2
keras-preprocessing 1.1.2 pypi_0 pypi kiwisolver 1.2.0 py38h74a9793_0
libpng 1.6.37 h2a8f88b_0
libtiff 4.1.0 h56a325e_1
lz4-c 1.9.2 h62dcd97_1
markdown 3.2.2 pypi_0 pypi matplotlib 3.2.2 0
matplotlib-base 3.2.2 py38h64f37c6_0
mkl 2020.2 256
mkl-service 2.3.0 py38hb782905_0
mkl_fft 1.1.0 py38h45dec08_0
mkl_random 1.1.1 py38h47e9c7a_0
numpy 1.19.1 py38h5510c5b_0
numpy-base 1.19.1 py38ha3acd2a_0
nvidia-ml-py3 7.352.1 pypi_0 pypi oauthlib 3.1.0 pypi_0 pypi olefile 0.46 py_0
opencv-python 4.4.0.42 pypi_0 pypi openssl 1.1.1g he774522_1
opt-einsum 3.3.0 pypi_0 pypi pathlib 1.0.1 py_1
pillow 7.2.0 py38hcc1f983_0
pip 20.2.2 py38_0
protobuf 3.13.0 pypi_0 pypi psutil 5.7.2 py38he774522_0
pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pyparsing 2.4.7 py_0
pyqt 5.9.2 py38ha925a31_4
python 3.8.5 h5fd99cc_1
python-dateutil 2.8.1 py_0
python_abi 3.8 1_cp38 conda-forge pywin32 227 py38he774522_1
qt 5.9.7 vc14h73c81de_0
requests 2.24.0 pypi_0 pypi requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.6 pypi_0 pypi scikit-learn 0.23.2 py38h47e9c7a_0
scipy 1.4.1 pypi_0 pypi setuptools 49.6.0 py38_0
sip 4.19.13 py38ha925a31_0
six 1.15.0 py_0
sqlite 3.33.0 h2a8f88b_0
tensorboard 2.2.2 pypi_0 pypi tensorboard-plugin-wit 1.7.0 pypi_0 pypi tensorflow-gpu 2.2.0 pypi_0 pypi tensorflow-gpu-estimator 2.2.0 pypi_0 pypi termcolor 1.1.0 pypi_0 pypi threadpoolctl 2.1.0 pyh5ca1d4c_0
tk 8.6.10 he774522_0
tornado 6.0.4 py38he774522_1
tqdm 4.48.2 py_0
urllib3 1.25.10 pypi_0 pypi vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_3
werkzeug 1.0.1 pypi_0 pypi wheel 0.35.1 py_0
wincertstore 0.2 py38_0
wrapt 1.12.1 pypi_0 pypi xz 5.2.5 h62dcd97_0
zlib 1.2.11 h62dcd97_4
zstd 1.4.5 h04227a9_0 ================= Configs ================== --------- .faceswap --------- backend: nvidia --------- convert.ini --------- [color.color_transfer] clip: True preserve_paper: True [color.manual_balance] colorspace: HSV balance_1: 0.0 balance_2: 0.0 balance_3: 0.0 contrast: 0.0 brightness: 0.0 [color.match_hist] threshold: 99.0 [mask.box_blend] type: gaussian distance: 11.0 radius: 5.0 passes: 1 [mask.mask_blend] type: normalized kernel_size: 3 passes: 4 threshold: 4 erosion: 0.0 [scaling.sharpen] method: unsharp_mask amount: 150 radius: 0.3 threshold: 5.0 [writer.ffmpeg] container: mp4 codec: libx264 crf: 23 preset: medium tune: none profile: auto level: auto skip_mux: False [writer.gif] fps: 25 loop: 0 palettesize: 256 subrectangles: False [writer.opencv] format: png draw_transparent: False jpg_quality: 75 png_compress_level: 3 [writer.pillow] format: png draw_transparent: False optimize: False gif_interlace: True jpg_quality: 75 png_compress_level: 3 tif_compression: tiff_deflate --------- extract.ini --------- [global] allow_growth: False [align.fan] batch-size: 12 [detect.cv2_dnn] confidence: 50 [detect.mtcnn] minsize: 20 threshold_1: 0.6 threshold_2: 0.7 threshold_3: 0.7 scalefactor: 0.709 batch-size: 8 [detect.s3fd] confidence: 70 batch-size: 4 [mask.unet_dfl] batch-size: 8 [mask.vgg_clear] batch-size: 6 [mask.vgg_obstructed] batch-size: 2 --------- gui.ini --------- [global] fullscreen: False tab: extract options_panel_width: 30 console_panel_height: 20 icon_size: 14 font: default font_size: 9 autosave_last_session: prompt timeout: 120 auto_load_model_stats: True --------- train.ini --------- [global] coverage: 68.75 icnr_init: False conv_aware_init: False optimizer: adam learning_rate: 5e-05 reflect_padding: False allow_growth: False mixed_precision: False convert_batchsize: 16 [global.loss] loss_function: ssim mask_loss_function: mse l2_reg_term: 100 eye_multiplier: 6 mouth_multiplier: 4 penalized_mask_loss: True mask_type: extended mask_blur_kernel: 3 mask_threshold: 4 learn_mask: False [model.dfl_h128] lowmem: False [model.dfl_sae] input_size: 128 clipnorm: True architecture: df autoencoder_dims: 0 encoder_dims: 42 decoder_dims: 21 multiscale_decoder: False [model.dlight] features: best details: good output_size: 256 [model.original] lowmem: False [model.realface] input_size: 64 output_size: 128 dense_nodes: 1536 complexity_encoder: 128 complexity_decoder: 512 [model.unbalanced] input_size: 128 lowmem: False clipnorm: True nodes: 1024 complexity_encoder: 128 complexity_decoder_a: 384 complexity_decoder_b: 512 [model.villain] lowmem: False [trainer.original] preview_images: 14 zoom_amount: 5 rotation_range: 10 shift_range: 5 flip_chance: 50 disable_warp: False color_lightness: 30 color_ab: 8 color_clahe_chance: 50 color_clahe_max_size: 4
User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by torzdf »

Start > Anaconda Prompt

Code: Select all

conda activate faceswap
set

Post output.

My word is final

User avatar
helpimbeing
Posts: 6
Joined: Mon May 04, 2020 2:22 am
Has thanked: 1 time

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by helpimbeing »

Used the old version for a little while and then did another full reinstall of the new version. Not getting the error anymore but Faceswap still seems to be running on CPU for Extract and Convert, since my CPU usage always goes up to 100% when doing those and they take much longer than they should. No issues with the Train module, CPU runs around 40% there and I can run the villain model at a nice speed. Forgot to mention before but I'm also using an eGPU, don't know if that is contributing to the problem at all.

Code: Select all

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\user\AppData\Roaming
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=132346777558955785
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=NAME
ComSpec=C:\windows\system32\cmd.exe
CONDA_DEFAULT_ENV=faceswap
CONDA_EXE=C:\Users\user\MiniConda3\Scripts\conda.exe
CONDA_PREFIX=C:\Users\user\MiniConda3\envs\faceswap
CONDA_PREFIX_1=C:\Users\user\MiniConda3
CONDA_PROMPT_MODIFIER=(faceswap)
CONDA_PYTHON_EXE=C:\Users\user\MiniConda3\python.exe
CONDA_SHLVL=2
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin
DriverData=C:\Windows\System32\Drivers\DriverData
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
HOMEDRIVE=C:
HOMEPATH=\Users\user
LOCALAPPDATA=C:\Users\user\AppData\Local
LOGONSERVER=\\NAME
NUMBER_OF_PROCESSORS=8
NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\
OneDrive=C:\Users\user\OneDrive
OneDriveConsumer=C:\Users\user\OneDrive
OnlineServices=Online Services
OS=Windows_NT
Path=C:\Users\user\MiniConda3\envs\faceswap;C:\Users\user\MiniConda3\envs\faceswap\Library\mingw-w64\bin;C:\Users\user\MiniConda3\envs\faceswap\Library\usr\bin;C:\Users\user\MiniConda3\envs\faceswap\Library\bin;C:\Users\user\MiniConda3\envs\faceswap\Scripts;C:\Users\user\MiniConda3\envs\faceswap\bin;C:\Users\user\MiniConda3\condabin;.;C:\Python38\Scripts;C:\Python38;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.1;C:\Users\user\AppData\Local\Microsoft\WindowsApps;.
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
platformcode=KV
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=8e0c
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=(faceswap) $P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
RegionCode=NA
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\windows
TEMP=C:\Users\user\AppData\Local\Temp
TMP=C:\Users\user\AppData\Local\Temp
USERDOMAIN=NAME
USERDOMAIN_ROAMINGPROFILE=NAME
USERNAME=user
USERPROFILE=C:\Users\user
windir=C:\windows
User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Default MaxPoolingOp only supports NHWC on device type CPU

Post by torzdf »

helpimbeing wrote: Sat Oct 24, 2020 1:49 am

Used the old version for a little while and then did another full reinstall of the new version. Not getting the error anymore but Faceswap still seems to be running on CPU for Extract and Convert, since my CPU usage always goes up to 100% when doing those and they take much longer than they should. No issues with the Train module, CPU runs around 40% there and I can run the villain model at a nice speed. Forgot to mention before but I'm also using an eGPU, don't know if that is contributing to the problem at all.

Honestly? At this point, I'm at a loss. I spent time porting the S3FD code to work on CPU as was getting annoyed with the constant identical error reports, which is why it runs now.

Training on GPU but not being able to run Extract/Convert on GPU makes ZERO sense though. They use the same libs. Coupled with that Convert and Train use EXACTLY the same pipeline to load the model, so I really don't understand these issues.

My word is final

Locked