zixaphir / Stable-Diffusion-Webui-Civitai-Helper

Stable Diffusion Webui Extension for Civitai, to manage your model much more easily.
175 stars 24 forks source link

Checkpoint update fails with majicMix and others #94

Closed paboum closed 2 months ago

paboum commented 3 months ago

This error should be handled and perhaps ignored, not stopping the whole update process.

CHv1.8.3: Checking models' new version
CHv1.8.3: Scanning path: /home/username/code/stable-diffusion-webui/models/Stable-diffusion
CHv1.8.3: Request model info from civitai: 41865
CHv1.8.3: Compare version id, local: 49055, remote: 256869
CHv1.8.3: Searching local model by version id
CHv1.8.3: folder: /home/username/code/stable-diffusion-webui/models/Stable-diffusion
CHv1.8.3: model_ids: 256869
Traceback (most recent call last):
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/home/username/code/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "/home/username/code/stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/ch_lib/model_action_civitai.py", line 356, in check_models_new_version_to_md
    new_versions = civitai.check_models_new_version_by_model_types(model_types, 0.2)
  File "/home/username/code/stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/ch_lib/civitai.py", line 706, in check_models_new_version_by_model_types
    version = check_single_model_new_version(root, filename, model_type, delay)
  File "/home/username/code/stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/ch_lib/civitai.py", line 661, in check_single_model_new_version
    target_model_info = search_local_model_info_by_version_id(root, version_id)
  File "/home/username/code/stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/ch_lib/civitai.py", line 509, in search_local_model_info_by_version_id
    version_id = model_ids["version"]
TypeError: 'int' object is not subscriptable
paboum commented 3 months ago

Seems to work fine when I install v1.8.2 specifically. Also I like the default NSFW filter setting better in v1.8.2.

zixaphir commented 2 months ago

I believe this was resolved by https://github.com/zixaphir/Stable-Diffusion-Webui-Civitai-Helper/commit/9dc1da0ac38955c0d687e7474e135021be59ddc6

Also I like the default NSFW filter setting better in v1.8.2.

As much as I enjoy NSFW content, it's just not a great idea to show NSFW content by default as a general-purpose extension. There's a bunch of different things that requiring user intervention to show NSFW content shields me from, and it better aligns with the expectations people have when installing something that doesn't advertise itself as inherently NSFW.

paboum commented 2 months ago

Issue seems to be fixed with v1.8.4.

As much as I enjoy NSFW content, it's just not a great idea to show NSFW content by default as a general-purpose extension. There's a bunch of different things that requiring user intervention to show NSFW content shields me from, and it better aligns with the expectations people have when installing something that doesn't advertise itself as inherently NSFW.

I've found a global and persistent setting for that plugin settings page. Seems to work fine, but requires restarting SD to have effect. In fact, I would just keep that one and remove all the action-specific ones.