rifeWithKaiju / model_preset_manager

93 stars 9 forks source link

Crashes when retrieving local file info #4

Open heroofthebeach opened 1 year ago

heroofthebeach commented 1 year ago

Hello, I'm having a problem when I attempt to load model data into the preset manager.

My intuition is that the problem is based in the fact that I store my models in a different place than my Automatic1111 installation, using the --ckpt-dir argument when launching Auto1111, and that the model preset manager isn't taking that into account when reading information on Auto1111's internal index, looking where the models would be if I wasn't using --ckpt-dir. (I keep Auto1111 on my main SSD drive but I'm a bit of a data hoarder so I keep my models on a much bigger HDD.)

Whether or not that's the case, here's my Traceback. (Yes, I installed it in a weird place by accident and haven't bothered to fix it, don't judge me.)

Traceback (most recent call last):
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api
    result = await self.call_function(
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\extensions\model_preset_manager\scripts\main.py", line 265, in retrieve_model_info_from_disk
    short_hash, model_info = get_model_hash_and_info_from_model_filename(model_filename, False)
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\extensions\model_preset_manager\scripts\main.py", line 50, in get_model_hash_and_info_from_model_filename
    short_hash = get_short_hash_from_filename(model_filename)
  File "C:\stable-diffusion\stable-diffusion-main\stable-diffusion-webui\extensions\model_preset_manager\scripts\main.py", line 95, in get_short_hash_from_filename
    with open(filename, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '_inpainting\\design\\aZovyaPhotoreal_v1Inpainting.safetensors'

After this, it just runs forever and I can't interact with anything in the tab anymore. Fortunately, it doesn't interfere with anything else, and image generation still works just fine.

I really, really want to use this extension, since it feels like a pretty basic feature missing from Auto1111. If there's a tweak I can make to my local files to get around this, I'd really appreciate it. Thanks!