Faceswap.py Does not startup after installing it and installing the missing modules

Installing and setting up FaceSwap


Forum rules

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

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

Locked
User avatar
theimagera
Posts: 7
Joined: Sat Aug 29, 2020 3:35 pm

Faceswap.py Does not startup after installing it and installing the missing modules

Post by theimagera »

Hi, I have tried to setup faceswap.py peviously on an old pc and it worked.
I have chosen the same configuration and it somehow does not work. When I try to open it with the power shell, it gives me this error;

Code: Select all

Traceback (most recent call last):
  File "faceswap.py", line 5, in <module>
    from lib.cli import args
  File "C:\Users\randy\Faceswap\lib\cli\args.py", line 11, in <module>
    from lib.utils import get_backend
  File "C:\Users\randy\Faceswap\lib\utils.py", line 18, in <module>
    from tqdm import tqdm
ModuleNotFoundError: No module named 'tqdm'

I then installed the module with pip and then get this error;

Code: Select all

Setting Faceswap backend to CPU
Traceback (most recent call last):
  File "faceswap.py", line 5, in <module>
    from lib.cli import args
  File "C:\Users\randy\Faceswap\lib\cli\args.py", line 12, in <module>
    from lib.gpu_stats import GPUStats
  File "C:\Users\randy\Faceswap\lib\gpu_stats.py", line 20, in <module>
    import pynvml

Now I installed that with pip and I get this final error;

Code: Select all

Setting Faceswap backend to CPU
There was an error reading from the Nvidia Machine Learning Library. Either you do not have an Nvidia GPU (in which case this warning can be ignored) or the most likely cause is incorrectly installed drivers. If this is the case, Please remove and reinstall your Nvidia drivers before reporting.Original Error: NVML Shared Library Not Found
No GPU detected. Switching to CPU mode
Traceback (most recent call last):
  File "faceswap.py", line 48, in <module>
    _main()
  File "faceswap.py", line 33, in _main
    generate_configs()
  File "C:\Users\randy\Faceswap\lib\config.py", line 364, in generate_configs
    mod.Config(None)
  File "C:\Users\randy\Faceswap\lib\config.py", line 27, in __init__
    self.set_defaults()
  File "C:\Users\randy\Faceswap\plugins\convert\_config.py", line 31, in set_defaults
    self.load_module(filename, import_path, plugin_type)
  File "C:\Users\randy\Faceswap\plugins\convert\_config.py", line 40, in load_module
    mod = import_module("{}.{}".format(module_path, module))
  File "C:\Users\randy\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'Users'

I am using python 3,8.5 with the latest version of faceswap.py.
Can anyone please help me? I would really appreciate it.

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

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by torzdf »

How are you installing Faceswap? What OS are you using?

My word is final

User avatar
theimagera
Posts: 7
Joined: Sat Aug 29, 2020 3:35 pm

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by theimagera »

I am using Windows and I installed it with the windows installation guide.

User avatar
theimagera
Posts: 7
Joined: Sat Aug 29, 2020 3:35 pm

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by theimagera »

I also don't have that great of a GPU but I did install with the CPU option
The GPU is Nvidia GTX 275.
The CPU is AMD FX(tm)-4100 Quad-Core Processor

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

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by torzdf »

Yeah, there is no way that that GPU will run faceswap.

If you still want to proceed though, then please follow (all) of these steps and then run the Windows Installer
app.php/faqpage#f1r1

My word is final

User avatar
theimagera
Posts: 7
Joined: Sat Aug 29, 2020 3:35 pm

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by theimagera »

Hi, weirdly enough I still get the same error after doing these steps as you asked.
I removed python with anaconda and miniconda.
I removed every python file & conda file.
I couldn't find any CUDA files for some reason.
I removed the faceswap folder
I rebooted the machine and then I re-installed it and still get the same error.

Maybe there are still some cuda files somewhere that I could not find. If so, can you please tell me where they normally get installed?

User avatar
abigflea
Posts: 182
Joined: Sat Feb 22, 2020 10:59 pm
Answers: 2
Has thanked: 20 times
Been thanked: 62 times

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by abigflea »

Torzdf mentioned your gpu. He's 99.8% correct usually :-)
Think you need to support cuda 10.5 on the gpu?
AT less than 2GB VRAM I don't think it would run anyway.
I can't look it up easily from work. The 900 series on works.l with 4gb++ vram

:o I dunno what I'm doing :shock:
2X RTX 3090 : RTX 3080 : RTX: 2060 : 2x RTX 2080 Super : Ghetto 1060

User avatar
theimagera
Posts: 7
Joined: Sat Aug 29, 2020 3:35 pm

Re: Faceswap.py Does not startup after installing it and installing the missing modules

Post by theimagera »

Yeah, Thanks anyway tho. Will a Nvidia GTX 1650 work with the faceswap program and if it does, does it actually run faster than a CPU?

Locked