glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
715 stars 92 forks source link

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

Open ZeroCool22 opened 11 months ago

ZeroCool22 commented 11 months ago
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):

Additional context Add any other context about the problem here.

ZincStoat commented 11 months ago

Installed this today and got the same startup error.

glucauze commented 10 months ago

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.