Page 1 of 1

Crash during Extraction - Unable to map memory: CL_INVALID_COMMAND_QUEUE

Posted: Mon Jan 27, 2020 11:34 am
by Normandy

I followed all the installation steps but during the extraction this is the result :

Code: Select all

Setting Faceswap backend to AMD
01/27/2020 12:25:51 INFO     Log level set to: INFO
01/27/2020 12:25:51 INFO     Setting up for PlaidML
01/27/2020 12:25:52 INFO     Setting GPU to largest available supported device. If you want to override this selection, run `plaidml-setup` from the command line.
01/27/2020 12:25:52 INFO     Using GPU: ['opencl_nvidia_geforce_mx250.0', 'opencl_nvidia_geforce_mx250.0']
01/27/2020 12:25:52 INFO     Successfully set up for PlaidML
01/27/2020 12:25:54 INFO     Output Directory: C:\Users\Giulia Zaino\faceswap\faces\giulia
01/27/2020 12:25:54 INFO     Loading Detect from S3Fd plugin...
01/27/2020 12:25:54 INFO     Loading Align from Fan plugin...
01/27/2020 12:25:54 INFO     Loading Mask from Extended plugin...
01/27/2020 12:25:54 INFO     Starting, this may take a while...
01/27/2020 12:25:54 INFO     Initializing S3FD (Detect)...
01/27/2020 12:25:55 INFO     Opening device "opencl_nvidia_geforce_mx250.0"
01/27/2020 12:25:55 INFO     Initialized S3FD (Detect) with batchsize of 4
Running pass 1 of 3: Extraction:   0%|                                                                                                                                                     | 0/32 [00:00<?, ?it/s]Unable to map memory: CL_INVALID_COMMAND_QUEUE
01/27/2020 12:26:01 ERROR    Unable to map memory: CL_INVALID_COMMAND_QUEUE
01/27/2020 12:26:05 ERROR    Got Exception on main handler:
Traceback (most recent call last):
  File "C:\Users\Giulia Zaino\faceswap\lib\cli.py", line 128, in execute_script
    process.process()
  File "C:\Users\Giulia Zaino\faceswap\scripts\extract.py", line 114, in process
    self._run_extraction()
  File "C:\Users\Giulia Zaino\faceswap\scripts\extract.py", line 212, in _run_extraction
    for idx, extract_media in enumerate(status_bar):
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\tqdm\std.py", line 1104, in __iter__
    for obj in iterable:
  File "C:\Users\Giulia Zaino\faceswap\plugins\extract\pipeline.py", line 211, in detected_faces
    if self._check_and_raise_error():
  File "C:\Users\Giulia Zaino\faceswap\plugins\extract\pipeline.py", line 476, in _check_and_raise_error
    if plugin.check_and_raise_error():
  File "C:\Users\Giulia Zaino\faceswap\plugins\extract\_base.py", line 296, in check_and_raise_error
    err = thread.check_and_raise_error()
  File "C:\Users\Giulia Zaino\faceswap\lib\multithreading.py", line 84, in check_and_raise_error
    raise error[1].with_traceback(error[2])
  File "C:\Users\Giulia Zaino\faceswap\lib\multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Giulia Zaino\faceswap\plugins\extract\_base.py", line 409, in _thread_process
    batch = function(batch)
  File "C:\Users\Giulia Zaino\faceswap\plugins\extract\detect\_base.py", line 206, in _predict
    batch = self.predict(batch)
  File "C:\Users\Giulia Zaino\faceswap\plugins\extract\detect\s3fd.py", line 50, in predict
    predictions = self.model.predict(batch["feed"])
  File "C:\Users\Giulia Zaino\faceswap\lib\model\session.py", line 63, in predict
    return self._model.predict(feed)
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\keras\engine\training.py", line 1169, in predict
    steps=steps)
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\keras\engine\training_arrays.py", line 294, in predict_loop
    batch_outs = f(ins_batch)
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\plaidml\keras\backend.py", line 177, in __call__
    return [t.as_ndarray(_ctx) for t in tensors]
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\plaidml\keras\backend.py", line 177, in <listcomp>
    return [t.as_ndarray(_ctx) for t in tensors]
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 1261, in as_ndarray
    with self.mmap_current() as view:
  File "C:\FinalAnaconda\envs\faceswap\lib\contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 1245, in mmap_current
    ctypes.cast(None, _MAP_BUFFER_FUNCTYPE), None)
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 777, in _check_err
    self.raise_last_status()
  File "C:\FinalAnaconda\envs\faceswap\lib\site-packages\plaidml\library.py", line 131, in raise_last_status
    raise self.last_status()
plaidml.exceptions.Unknown: Unable to map memory: CL_INVALID_COMMAND_QUEUE
01/27/2020 12:26:05 CRITICAL An unexpected crash has occurred. Crash report written to 'C:\Users\Giulia Zaino\faceswap\crash_report.2020.01.27.122605668389.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting
Running pass 1 of 3: Extraction:   0%|

I have the last version


Re: Crash during Extraction - Unable to map memory: CL_INVALID_COMMAND_QUEUE

Posted: Mon Jan 27, 2020 2:04 pm
by torzdf

First up, you should provide the crash report when reporting issues.

However, I can see the issue here. You have installed the AMD version of Faceswap, but you have an Nvidia card.

Delete the Faceswap folder from your PC and re-run the installer, making sure that you select the "Nvidia" option when prompted, NOT the AMD option.