Failed Extract on Start. (2025)

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.

Locked

  • Print view

20 posts• Page 1 of 1

Sanscouer
Posts: 2
Joined: Thu Jul 25, 2019 4:13 pm

Error in extract - ModuleNotFoundError: No module named 'pynvml'

Postby Sanscouer »

Hi all...
I use DeepFaceLab for some time and don't have any problem...

So I try use the FaceSwap, Install all ok, but when I try to extract I have this problems

This is form LOG:

Traceback (most recent call last):
File "C:\Users\sansc\faceswap\lib\cli.py", line 120, in execute_script
script = self.import_script()
File "C:\Users\sansc\faceswap\lib\cli.py", line 41, in import_script
module = import_module(mod)
File "C:\Users\sansc\MiniConda3\envs\faceswap\lib\importlib\__init__.py", line 126, in import_module
return bootstrap.gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in gcd_import
File "<frozen importlib.
bootstrap>", line 971, in find_and_load
File "<frozen importlib.
bootstrap>", line 955, in find_and_load_unlocked
File "<frozen importlib.
bootstrap>", line 665, in load_unlocked
File "<frozen importlib.
bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\sansc\faceswap\scripts\extract.py", line 15, in <module>
from plugins.extract.pipeline import Extractor
File "C:\Users\sansc\faceswap\plugins\extract\pipeline.py", line 10, in <module>
from lib.gpu_stats import GPUStats
File "C:\Users\sansc\faceswap\lib\gpu_stats.py", line 16, in <module>
import pynvml
ModuleNotFoundError: No module named 'pynvml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\sansc\faceswap\faceswap.py", line 36, in <module>
ARGUMENTS.func(ARGUMENTS)
File "C:\Users\sansc\faceswap\lib\cli.py", line 134, in execute_script
crash_file = crash_log()
File "C:\Users\sansc\faceswap\lib\logger.py", line 158, in crash_log
from lib.sysinfo import sysinfo
File "C:\Users\sansc\faceswap\lib\sysinfo.py", line 13, in <module>
from lib.gpu_stats import GPUStats
File "C:\Users\sansc\faceswap\lib\gpu_stats.py", line 16, in <module>
import pynvml
ModuleNotFoundError: No module named 'pynvml'

I missed any step in installation? I really lost here...

Thanks

Last edited by torzdf on Thu Jul 25, 2019 7:09 pm, edited 1 time in total.

Top

bryanlyon
Site Admin
Posts: 799
Joined: Fri Jul 12, 2019 12:49 am

Answers: 44

Location: San Francisco
Hasthanked: 4 times
Beenthanked: 221 times
Contact:

Contact bryanlyon

Re: Error in extract - Some Help need it

Postby bryanlyon »

This is the same problem as the one in the following link.

The solution is there at the bottom.

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: Error in extract - ModuleNotFoundError: No module named 'pynvml'

Postby torzdf »

This is actually a slightly different issue.

I would guess that github wasn't available when trying to pull pynvml. The solution is still the same though:

Do one of the following:

From the GUI:
run "Tools menu" > "Check for Updates"

or:

From the cli:

  • Enter your faceswap environment

  • Enter your faceswap folder

  • Run:

    Code: Select all

    python update_deps.py

My word is final

Top

Epichuynh
Posts: 1
Joined: Mon Jan 06, 2020 6:27 pm

Failed Extract on Start.

Postby Epichuynh »

Hi All, new here.

As soon as I press extract I get the following:

Loading...
Setting Faceswap backend to NVIDIA
01/06/2020 12:26:12 INFO Log level set to: INFO
Process exited.

with Status: Failed - extract.py. Return Code: 1

It pretty much errors immediately after starting. Any idea what is wrong?

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: Failed Extract on Start.

Postby torzdf »

Honestly?

Instant exits like this are super hard to diagnose, as they normally suggest that something has broken up the chain from Faceswap (conflicts with other apps etc,)....

Assuming you're on Windows, first try the following to make sure all your dependencies got pulled in:

Start > Anaconda Prompt

Code: Select all

conda activate faceswapcd faceswappython update_deps.py

If that doesn't work, please try the following and post the output (if it works):
still in the Anaconda prompt:

Code: Select all

python -c "from lib.sysinfo import sysinfo ; print(sysinfo)"

My word is final

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

result :

Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lib.sysinfo'

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

I launched the last instruction and I got the message below! : python -c "from lib.sysinfo import SysInfo ; print(SysInfo().full_info())"

result :

(base) C:\Users\wipot\Documents\faceswapOK>python -c "from lib.sysinfo import SysInfo ; print(SysInfo().full_info())"
Setting Faceswap backend to NVIDIA
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\wipot\Documents\faceswapOK\lib\sysinfo.py", line 14, in <module>
from lib.gpu_stats import GPUStats
File "C:\Users\wipot\Documents\faceswapOK\lib\gpu_stats.py", line 16, in <module>
import pynvml
ModuleNotFoundError: No module named 'pynvml'

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: Failed Extract on Start.

Postby torzdf »

You are not in your Faceswap environment

My word is final

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

Hello, I uninstalled faceswap following the indicated procedure.
Then I reinstalled and relaunched the extract and still nothing ... no further ... I have no error message.
So I started again: "python update_deps.py"
and the result below:

(faceswap) PS C:\Users\wipot\faceswap> python update_deps.py
INFO Updating dependencies...
INFO Setup in Windows 10
INFO Installed Python: 3.6.10 64bit
INFO Running in Conda
INFO Running in a Virtual Environment
INFO Encoding: cp1252
INFO Installed pip: 20.0.2
INFO Installing Required Python Packages. This may take some time...
INFO Installing git+https://github.com/deepfakes/nvidia-ml-py3.git
Collecting git+https://github.com/deepfakes/nvidia-ml-py3.git
Cloning https://github.com/deepfakes/nvidia-ml-py3.git to c:\users\wipot\appdata\local\temp\pip-req-build-ln20ldsk
Running command git clone -q https://github.com/deepfakes/nvidia-ml-py3.git 'C:\Users\wipot\AppData\Local\Temp\pip-req-build-ln20ldsk'
Requirement already satisfied (use --upgrade to upgrade): nvidia-ml-py3==7.352.1 from git+https://github.com/deepfakes/nvidia-ml-py3.git in c:\users\wipot\miniconda3\envs\faceswap\lib\site-packages
Building wheels for collected packages: nvidia-ml-py3
Building wheel for nvidia-ml-py3 (setup.py) ... done
Created wheel for nvidia-ml-py3: filename=nvidia_ml_py3-7.352.1-py3-none-any.whl size=19392 sha256=a834d7b5ef170a01edb4555cafa4038f0ae92b58148e06f2c0f78a8de5d3e8a8
Stored in directory: C:\Users\wipot\AppData\Local\Temp\pip-ephem-wheel-cache-iu53uk4q\wheels\6d\26\49\0d60885532b81f4812d10df3c7598b394d145d5f6ae44cef29
Successfully built nvidia-ml-py3
INFO Dependencies updated
(faceswap) PS C:\Users\wipot\faceswap>

Then I relaunched the facswap GUI and relaunched the extract and I always have the same result:
nothing is moving ... it's blocked and I have no error message.

I went to see the log and see below:

03/29/2020 13:01:13 MainProcess MainThread logger log_setup INFO Log level set to: INFO
03/29/2020 13:01:18 MainProcess MainThread extract init INFO Output Directory: C:\Users\wipot\Documents\faceswapOK\Faceswap_project\Align_for_Training_A
03/29/2020 13:01:18 MainProcess MainThread plugin_loader _import INFO Loading Detect from S3Fd plugin...
03/29/2020 13:01:18 MainProcess MainThread plugin_loader _import INFO Loading Align from Fan plugin...
03/29/2020 13:01:18 MainProcess MainThread plugin_loader _import INFO Loading Mask from Extended plugin...

so I relaunched the following command:
python -c "from lib.sysinfo import SysInfo ; print(SysInfo().full_info())"

the result below:

(faceswap) C:\Users\wipot\faceswap>python -c "from lib.sysinfo import SysInfo ; print(SysInfo().full_info())"
Setting Faceswap backend to NVIDIA
2020-03-29 13:18:29.066989: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: Failed Extract on Start.

Postby torzdf »

And it gets stuck there?

My word is final

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

yes

Generate :

C:\Users\wipot\MiniConda3\envs\faceswap\python.exe C:\Users\wipot\faceswap\faceswap.py extract -i C:/Users/wipot/Documents/faceswapOK/Faceswap_project/Img_A -o C:/Users/wipot/Documents/faceswapOK/Faceswap_project/Align_for_Training_A -D s3fd -A fan -M extended -nm hist -min 0 -l 0.4 -een 10 -sz 256 -si 0 -L INFO

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

I go back to the graphic environment and relace: extract

and nothing is moving compared to the generate above

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

when i stop the process i have on status : "Failed - extract.py. Return Code 15

Failed Extract on Start. (14) Failed Extract on Start. (15) Failed Extract on Start. (16)

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: Failed Extract on Start.

Postby torzdf »

Return Code 15 is not a Faceswap error, it's a 3rd party lib error. Ultimately there is something wrong with your set up.

The best I can do is ask you to run it with Loglevel TRACE active and provide that log. This will be slow and generate a huge file (faceswap.log in your faceswap folder)

My word is final

Top

orongani
Posts: 17
Joined: Fri Mar 27, 2020 10:21 am

Re: Failed Extract on Start.

Postby orongani »

ok and how do we do that?

Top

DyingYak
Posts: 2
Joined: Wed May 27, 2020 4:39 pm

Error while Extracting images

Postby DyingYak »

Hello, this is my first time using faceswap. I have a folder with pics of a spesific person and selected that in the gui and set the output folder. but when i run the extract, it gives me the error: " 05/27/2020 18:37:02 CRITICAL An unexpected crash has occurred. Crash report written to 'C:\Users\CENCORED\faceswap\crash_report.2020.05.27.183702682332.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting "

My log file contains this:

Code: Select all

05/27/2020 18:37:01 MainProcess MainThread logger log_setup INFO Log level set to: INFO05/27/2020 18:37:01 MainProcess MainThread launcher execute_script DEBUG Executing: extract. PID: 1920805/27/2020 18:37:02 MainProcess MainThread launcher _test_for_tf_version DEBUG Installed Tensorflow Version: 1.1505/27/2020 18:37:02 MainProcess MainThread queue_manager __init__ DEBUG Initializing QueueManager05/27/2020 18:37:02 MainProcess MainThread queue_manager __init__ DEBUG Initialized QueueManagerTraceback (most recent call last): File "C:\Users\maximilian\faceswap\lib\cli\launcher.py", line 153, in execute_script script = self._import_script() File "C:\Users\maximilian\faceswap\lib\cli\launcher.py", line 43, in _import_script module = import_module(mod) File "C:\Users\maximilian\anaconda3\envs\faceswap\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "C:\Users\maximilian\faceswap\scripts\extract.py", line 13, in <module> from plugins.extract.pipeline import Extractor, ExtractMedia File "C:\Users\maximilian\faceswap\plugins\extract\pipeline.py", line 17, in <module> from lib.gpu_stats import GPUStats File "C:\Users\maximilian\faceswap\lib\gpu_stats.py", line 20, in <module> import pynvmlModuleNotFoundError: No module named 'pynvml'There was an error importing System Information from lib.sysinfo. This is probably a bug which should be fixed:Traceback (most recent call last): File "C:\Users\maximilian\faceswap\lib\cli\launcher.py", line 153, in execute_script script = self._import_script() File "C:\Users\maximilian\faceswap\lib\cli\launcher.py", line 43, in _import_script module = import_module(mod) File "C:\Users\maximilian\anaconda3\envs\faceswap\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "C:\Users\maximilian\faceswap\scripts\extract.py", line 13, in <module> from plugins.extract.pipeline import Extractor, ExtractMedia File "C:\Users\maximilian\faceswap\plugins\extract\pipeline.py", line 17, in <module> from lib.gpu_stats import GPUStats File "C:\Users\maximilian\faceswap\lib\gpu_stats.py", line 20, in <module> import pynvmlModuleNotFoundError: No module named 'pynvml'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\Users\maximilian\faceswap\lib\logger.py", line 178, in crash_log from lib.sysinfo import sysinfo # pylint:disable=import-outside-toplevel File "C:\Users\maximilian\faceswap\lib\sysinfo.py", line 14, in <module> from lib.gpu_stats import GPUStats File "C:\Users\maximilian\faceswap\lib\gpu_stats.py", line 20, in <module> import pynvmlModuleNotFoundError: No module named 'pynvml'

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: Error while Extracting images

Postby torzdf »

pynvml is not installed. I assume github was down when you installed Faceswap, as we pull pynvml from Github....

You can fix this as follows:

start > Anaconda Prompt

Code: Select all

conda activate faceswapcd faceswappython update_deps.py

My word is final

Top

DyingYak
Posts: 2
Joined: Wed May 27, 2020 4:39 pm

Re: Error while Extracting images

Postby DyingYak »

This fixed the issue with the package but now I get this error. Should I post the full log?

Code: Select all

2020-05-29 09:39:40.684616: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED2020-05-29 09:39:40.685968: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED2020-05-29 09:39:51.862259: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED2020-05-29 09:39:51.863250: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED05/29/2020 09:39:51 ERROR Tensorflow raised an unknown error. This is most likely caused by a failure to launch cuDNN which can occur for some GPU/Tensorflow combinations. You should enable `allow_growth` to attempt to resolve this issue:05/29/2020 09:39:51 ERROR GUI: Go to Settings > Extract Plugins > Global and enable the `allow_growth` option.05/29/2020 09:39:51 ERROR CLI: Go to `faceswap/config/extract.ini` and change the `allow_growth option to `True`.Process exited.

EDIT: Seems like enabling Allow growth fixed it

Top

PisstopherAllen
Posts: 1
Joined: Sat Jun 13, 2020 2:39 am

ModuleNotFoundError: No module named 'pynvml'

Postby PisstopherAllen »

Code: Select all

06/12/2020 22:31:45 MainProcess MainThread logger log_setup INFO Log level set to: INFO06/12/2020 22:31:45 MainProcess MainThread launcher execute_script DEBUG Executing: extract. PID: 970406/12/2020 22:31:47 MainProcess MainThread launcher _test_for_tf_version DEBUG Installed Tensorflow Version: 1.1506/12/2020 22:31:47 MainProcess MainThread queue_manager __init__ DEBUG Initializing QueueManager06/12/2020 22:31:47 MainProcess MainThread queue_manager __init__ DEBUG Initialized QueueManagerTraceback (most recent call last): File "E:\deep fake4\faceswap\lib\cli\launcher.py", line 153, in execute_script script = self._import_script() File "E:\deep fake4\faceswap\lib\cli\launcher.py", line 43, in _import_script module = import_module(mod) File "C:\Users\Chris Allen\MiniConda3\envs\faceswap\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "E:\deep fake4\faceswap\scripts\extract.py", line 13, in <module> from plugins.extract.pipeline import Extractor, ExtractMedia File "E:\deep fake4\faceswap\plugins\extract\pipeline.py", line 17, in <module> from lib.gpu_stats import GPUStats File "E:\deep fake4\faceswap\lib\gpu_stats.py", line 20, in <module> import pynvmlModuleNotFoundError: No module named 'pynvml'There was an error importing System Information from lib.sysinfo. This is probably a bug which should be fixed:Traceback (most recent call last): File "E:\deep fake4\faceswap\lib\cli\launcher.py", line 153, in execute_script script = self._import_script() File "E:\deep fake4\faceswap\lib\cli\launcher.py", line 43, in _import_script module = import_module(mod) File "C:\Users\Chris Allen\MiniConda3\envs\faceswap\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "E:\deep fake4\faceswap\scripts\extract.py", line 13, in <module> from plugins.extract.pipeline import Extractor, ExtractMedia File "E:\deep fake4\faceswap\plugins\extract\pipeline.py", line 17, in <module> from lib.gpu_stats import GPUStats File "E:\deep fake4\faceswap\lib\gpu_stats.py", line 20, in <module> import pynvmlModuleNotFoundError: No module named 'pynvml'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "E:\deep fake4\faceswap\lib\logger.py", line 178, in crash_log from lib.sysinfo import sysinfo # pylint:disable=import-outside-toplevel File "E:\deep fake4\faceswap\lib\sysinfo.py", line 14, in <module> from lib.gpu_stats import GPUStats File "E:\deep fake4\faceswap\lib\gpu_stats.py", line 20, in <module> import pynvmlModuleNotFoundError: No module named 'pynvml'

Top

torzdf
Posts: 2761
Joined: Fri Jul 12, 2019 12:53 am

Answers: 159

Hasthanked: 141 times
Beenthanked: 643 times

Re: ModuleNotFoundError: No module named 'pynvml'

Postby torzdf »

My word is final

Top

Locked

  • Print view

20 posts• Page 1 of 1

Return to “Extract Support”

Jump to

  • Support
  • ↳ Installation Support
  • ↳ Extract Support
  • ↳ Training Support
  • ↳ Convert Support
  • Faceswap Discussion
  • ↳ Extract Discussion
  • ↳ Training Discussion
  • ↳ Convert Discussion
  • ↳ Cloud Discussion
  • ↳ General Discussion
  • General Discussion
  • ↳ Content Creator Requests
  • ↳ Artificial Intelligence
  • ↳ Hardware
  • ↳ Swap Showcase
  • ↳ Introductions
Failed Extract on Start. (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Jonah Leffler

Last Updated:

Views: 5726

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.