Unsupported Operand Type(s) Error

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
raulcrypto1978
Posts: 3
Joined: Sat Jun 18, 2022 8:50 am

Unsupported Operand Type(s) Error

Post by raulcrypto1978 »

Hello, I was using faceswap without any issue at all. However, after installing latest version, something went wrong.
I followed the steps in: app.php/faqpage#f1r1
(That is, uninstalling, deleting folders, updatting NVidia drives, and reinstalling faceswap)
However I'm getting the same error:


Code: Select all

C:\Users\UsX>C:\Users\UsX\faceswap\faceswap_win_launcher.bat

C:\Users\UsX>"C:\Users\UsX\Miniconda3\scripts\activate.bat"   && conda activate "faceswap"   && python "C:\Users\UsX\faceswap/faceswap.py" gui
Setting Faceswap backend to AMD
Traceback (most recent call last):
  File "C:\Users\UsX\faceswap/faceswap.py", line 6, in <module>
    from lib.cli import args as cli_args
  File "C:\Users\UsX\faceswap\lib\cli\args.py", line 22, in <module>
    _GPUS = GPUStats().cli_devices
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 78, in __init__
    super().__init__(log=log)
  File "C:\Users\UsX\faceswap\lib\gpu_stats\_base.py", line 63, in __init__
    self._initialize()
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 138, in _initialize
    self._select_device()
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 272, in _select_device
    self._select_largest_gpu()
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 287, in _select_largest_gpu
    max_vram = max([self._all_vram[idx] for idx in indices])
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 287, in <listcomp>
    max_vram = max([self._all_vram[idx] for idx in indices])
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 109, in _all_vram
    return [int(device.get("globalMemSize", 0) / (1024 * 1024))
  File "C:\Users\UsX\faceswap\lib\gpu_stats\amd.py", line 109, in <listcomp>
    return [int(device.get("globalMemSize", 0) / (1024 * 1024))
TypeError: unsupported operand type(s) for /: 'str' and 'int'

(faceswap) C:\Users\UsX>

Any clue on this one? Thanx a lot

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

Re: Unsupported Operand Type(s) Error

Post by torzdf »

Yes, this was a bug. I have pushed an update which should fix this.

My word is final

Locked