aigc-apps / sd-webui-EasyPhoto

šŸ“· EasyPhoto | Your Smart AI Photo Generator.
Apache License 2.0
4.98k stars 399 forks source link

*** Error loading script: easyphoto_ui.py #346

Closed 00face closed 11 months ago

00face commented 11 months ago

Thank you ahead of time. Also, please get a Discord. šŸ˜„

*** Error loading script: easyphoto_ui.py
    Traceback (most recent call last):
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\sdwebui.py", line 750, in get_lora_type
        metadata = cache.cached_data_for_file("safetensors-metadata", "lora/" + name, filename, read_metadata)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\cache.py", line 115, in cached_data_for_file
        value = func()
    TypeError: get_lora_type.<locals>.<lambda>() missing 1 required positional argument: 'filename'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\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 "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\easyphoto_ui.py", line 158, in <module>
        if check_scene_valid(_scene, models_path):
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\easyphoto_utils\common_utils.py", line 431, in check_scene_valid
        lora_type = get_lora_type(safetensors_lora_path)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\sdwebui.py", line 752, in get_lora_type
        metadata = sd_models.read_metadata_from_safetensors(filename)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\sd_models.py", line 282, in read_metadata_from_safetensors
        assert metadata_len > 2 and json_start in (b'{"', b"{'"), f"{filename} is not a safetensors file"
    AssertionError: D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Lora\SheerSkirt.safetensors is not a safetensors file

---

*** Error loading script: easyphoto_ui.py
    Traceback (most recent call last):
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\sdwebui.py", line 750, in get_lora_type
        metadata = cache.cached_data_for_file("safetensors-metadata", "lora/" + name, filename, read_metadata)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\cache.py", line 115, in cached_data_for_file
        value = func()
    TypeError: get_lora_type.<locals>.<lambda>() missing 1 required positional argument: 'filename'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\scripts.py", line 469, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\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 "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\easyphoto_ui.py", line 158, in <module>
        if check_scene_valid(_scene, models_path):
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\easyphoto_utils\common_utils.py", line 431, in check_scene_valid
        lora_type = get_lora_type(safetensors_lora_path)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\sd-webui-EasyPhoto\scripts\sdwebui.py", line 752, in get_lora_type
        metadata = sd_models.read_metadata_from_safetensors(filename)
      File "D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\sd_models.py", line 282, in read_metadata_from_safetensors
        assert metadata_len > 2 and json_start in (b'{"', b"{'"), f"{filename} is not a safetensors file"
    AssertionError: D:\apps\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Lora\SheerSkirt.safetensors is not a safetensors file

wuziheng commented 11 months ago

@hkunzhe seems some bug with SheerSkirt.safetensors , but it should not cause our extensions collapse

hkunzhe commented 11 months ago

@00face , Please check the file size of SheerSkirt.safetensors. Maybe you just download a html instead of a real Lora. See this issue for details. BTW, Discord is in our plan. Stay tuned :)