TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType #89

Open
opened 2023-09-04 07:26:59 +02:00 by ZeroCool22 · 2 comments
ZeroCool22 commented 2023-09-04 07:26:59 +02:00 (Migrated from github.com)
Downloading inswapper model: 529MB [00:20, 26.6MB/s]
2023-09-04 02:30:39,516 - FaceSwapLab - INFO - Try to use model : None
*** Error loading script: faceswaplab.py
    Traceback (most recent call last):
      File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\modules\scripts.py", line 274, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\faceswaplab.py", line 4, in <module>
        check_configuration()
      File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\configure.py", line 50, in check_configuration
        check_model()
      File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\faceswaplab_utils\models_utils.py", line 33, in check_model
        model_path = get_current_swap_model()
      File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\faceswaplab_utils\models_utils.py", line 75, in get_current_swap_model
        if not os.path.isfile(model):  # type: ignore
      File "C:\Users\ZeroCool22\AppData\Local\Programs\Python\Python310\lib\genericpath.py", line 30, in isfile
        st = os.stat(path)
    TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

---
2023-09-04 02:30:41,978 - roop - INFO - roop v0.0.2

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Win. 10 x64
  • Browser FireFox
  • Version 116.0.3

Additional context
Add any other context about the problem here.

``` Downloading inswapper model: 529MB [00:20, 26.6MB/s] 2023-09-04 02:30:39,516 - FaceSwapLab - INFO - Try to use model : None *** Error loading script: faceswaplab.py Traceback (most recent call last): File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\modules\scripts.py", line 274, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\faceswaplab.py", line 4, in <module> check_configuration() File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\configure.py", line 50, in check_configuration check_model() File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\faceswaplab_utils\models_utils.py", line 33, in check_model model_path = get_current_swap_model() File "C:\Users\ZeroCool22\Desktop\AutoRespaldo\extensions\sd-webui-faceswaplab\scripts\faceswaplab_utils\models_utils.py", line 75, in get_current_swap_model if not os.path.isfile(model): # type: ignore File "C:\Users\ZeroCool22\AppData\Local\Programs\Python\Python310\lib\genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType --- 2023-09-04 02:30:41,978 - roop - INFO - roop v0.0.2 ``` **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: Win. 10 x64 - Browser FireFox - Version 116.0.3 **Additional context** Add any other context about the problem here.
ZincStoat commented 2023-09-04 11:29:47 +02:00 (Migrated from github.com)

Installed this today and got the same startup error.

Installed this today and got the same startup error.
glucauze commented 2023-09-05 11:00:03 +02:00 (Migrated from github.com)

Try to download the model manually (https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx) and put it in <webui>/models/faceswaplab

I will try to see why this bug happens.

Try to download the model manually (https://github.com/facefusion/facefusion-assets/releases/download/models/inswapper_128.onnx) and put it in `<webui>/models/faceswaplab` I will try to see why this bug happens.
Sign in to join this conversation.