Page 1 of 1

GUI won't start on Win 10

Posted: Fri Jan 17, 2020 6:28 pm
by altmann

Hi.

I tried to install FaceSwap on Win 10 (automatic installer).
The installer gives no errors. After executing the batch file, the GUI won't start.
This is what the console gives me:

Code: Select all

"C:\Users\psych\Miniconda3\scripts\activate.bat"   && conda activate "faceswap"   && python "C:\Users\psych\faceswap/faceswap.py" gui
Setting Faceswap backend to AMD
01/17/2020 19:27:36 INFO     Log level set to: INFO
01/17/2020 19:27:36 INFO     Setting up for PlaidML
Traceback (most recent call last):
  File "C:\Users\psych\faceswap/faceswap.py", line 38, in <module>
    ARGUMENTS.func(ARGUMENTS)
  File "C:\Users\psych\faceswap\lib\cli.py", line 121, in execute_script
    plaidml_found = self.setup_amd(arguments.loglevel)
  File "C:\Users\psych\faceswap\lib\cli.py", line 161, in setup_amd
    setup_plaidml(loglevel)
  File "C:\Users\psych\faceswap\lib\plaidml_tools.py", line 214, in setup_plaidml
    plaid = PlaidMLStats(loglevel)
  File "C:\Users\psych\faceswap\lib\plaidml_tools.py", line 30, in __init__
    self.supported_devices = self.get_supported_devices()
  File "C:\Users\psych\faceswap\lib\plaidml_tools.py", line 149, in get_supported_devices
    supported = [device for device in devices
  File "C:\Users\psych\faceswap\lib\plaidml_tools.py", line 150, in <listcomp>
    if json.loads(device.details.decode()).get("type", "cpu").lower() == "gpu"]
  File "C:\Users\psych\MiniConda3\envs\faceswap\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "C:\Users\psych\MiniConda3\envs\faceswap\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\psych\MiniConda3\envs\faceswap\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

(faceswap) C:\Users\psych\faceswap>

I installed all Python and *Conda stuff, rebooted, reinstalled, but still the same.

Any advice for me?
Thanks in advance!


Re: GUI won't start on Win 10

Posted: Sun Jan 19, 2020 2:52 am
by Dave

Are you using an AMD GPU ?
Im getting the same problem using one :cry: , but works fine when i select to use my CPU :| .


Re: GUI won't start on Win 10

Posted: Sun Jan 19, 2020 12:46 pm
by torzdf

The most likely cause is a conflict somewhere.

I'm hoping our AMD guy shows up soon with some troubleshooting, but could you try to follow these steps and see if it resolves the issue?

app.php/faqpage#f1r1


Re: GUI won't start on Win 10

Posted: Sun Jan 19, 2020 12:53 pm
by altmann

Yeah, the steps mentioned in the FAQ was the first I tried. With no luck at all :(

CPU is an i5-7500, GPU an Radeon FX570 (8GB).

I think this is a conflict with my local setup. But I have to clue where to start searching for the problem.
Does the included code in post #1 shows any abnormalities? Or is this the output do be expected when running the batch?


Re: GUI won't start on Win 10

Posted: Sun Jan 19, 2020 12:57 pm
by torzdf

Ok. Basically PlaidML is failing to load an internal file....

The next thing I would try is the following....

Start > Anaconda Prompt

Code: Select all

conda activate faceswap
plaidml-setup

Follow the prompts to select a GPU, then try Faceswap again.


Re: GUI won't start on Win 10

Posted: Sun Jan 19, 2020 8:13 pm
by Dave
torzdf wrote: Sun Jan 19, 2020 12:57 pm

Ok. Basically PlaidML is failing to load an internal file....

The next thing I would try is the following....

Start > Anaconda Prompt

Code: Select all

conda activate faceswap
plaidml-setup

Follow the prompts to select a GPU, then try Faceswap again.

I tried right now, but this give me the following error message.

Code: Select all

Traceback (most recent call last):
  File "c:\users\dave\miniconda3\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 154, in load_library
    return ctypes.cdll.LoadLibrary(libpath)
  File "c:\users\dave\miniconda3\envs\faceswap\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
  File "c:\users\dave\miniconda3\envs\faceswap\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\dave\miniconda3\envs\faceswap\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\dave\miniconda3\envs\faceswap\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Dave\MiniConda3\envs\faceswap\Scripts\plaidml-setup.exe\__main__.py", line 7, in <module>
  File "c:\users\dave\miniconda3\envs\faceswap\lib\site-packages\plaidml\plaidml_setup.py", line 16, in main
    ctx = plaidml.Context()
  File "c:\users\dave\miniconda3\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 892, in Context
    return plaidml.context.Context(_lib())
  File "c:\users\dave\miniconda3\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 789, in _lib
    _impl_lib = _Library()
  File "c:\users\dave\miniconda3\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 176, in __init__
    lib = load_library('plaidml.dll', ['Library', 'bin'])
  File "c:\users\dave\miniconda3\envs\faceswap\lib\site-packages\plaidml\__init__.py", line 166, in load_library
    return ctypes.cdll.LoadLibrary(libpath)
  File "c:\users\dave\miniconda3\envs\faceswap\lib\ctypes\__init__.py", line 442, in LoadLibrary
    return self._dlltype(name)
  File "c:\users\dave\miniconda3\envs\faceswap\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found 

Re: GUI won't start on Win 10

Posted: Mon Jan 20, 2020 12:08 am
by torzdf

Ok. It seems there was a requirement update on PlaidML which broke our dependencies.

I've pushed a fix, so hopefully this will fix it for you. Please clean everything out and try installing again.


Re: GUI won't start on Win 10

Posted: Mon Jan 20, 2020 9:24 am
by Dave

Now it works correctly :D . Thank you!