BlafKing / sd-civitai-browser-plus

Extension to access CivitAI via WebUI: download, delete, scan for updates, list installed models, assign tags, and boost downloads with multi-threading.
GNU Affero General Public License v3.0
304 stars 49 forks source link

[Bug]: Getting "ERROR" after updating tags and infos with Checkpoints and loras #194

Closed Rojinski closed 7 months ago

Rojinski commented 7 months ago

Describe the bug.

I get an error after trying to update tags and infos for the checkpoints and the loras. Updating previews is ok tho. Then I can't use the extension at all. I have to start the UI again. Impossible to cancel. Same problem on both A1111 and SDNext.

Screenshot 2024-02-09 at 13-21-40 Stable Diffusion

And, yes, your extension is very useful !! Everything was ok few days ago... So I hope someone can help me. :)

Have a beautiful day and week-end.

Rojinski

Steps to reproduce the problem.

  1. Go to CivitAI Brower+, update tab
  2. Press on "update model info and tags"
  3. first part of the process is ok, then at the end of the API sending request, I get the error message.

Expected behavior

Finishing the process without error. :)

System info

Console logs

CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\Chinese Horror.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\CubzeV1Anything.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\Cyber_Graphic_e20.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\Cyberkay.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\DEATH_METAL_black_and_white_drawing.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\DREAMEE_V0.01.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\Dariusz_Zawadzki_ArtStyle.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\Dayu_AISAFACE.json"
CivitAI Browser+: Model info saved to "D:\Programmes 2\Logiciels\stable-diffusion-webui\models\Lora\SD15\Detail Slider V2 By Stable .json"
Traceback (most recent call last):
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\extensions\sd-civitai-browser-plus\scripts\civitai_file_manage.py", line 956, in file_scan
    preview_html = _api.update_model_info(None, model_versions.get('value'), True, id_value, api_response)
  File "D:\Programmes 2\Logiciels\stable-diffusion-webui\extensions\sd-civitai-browser-plus\scripts\civitai_api.py", line 739, in update_model_info
    model_url = selected_version['downloadUrl']
KeyError: 'downloadUrl'

Additional information

No response

BlafKing commented 7 months ago

Thanks for reporting! And glad to hear that you like the extension! 😄

The error probably happens when a model is archived by the publisher on CivitAI, this presumably causes the model to still return information for the model but there is no longer a download link causing the error.

Would be great if you could provide which model the error occurred on so that I can verify it! (Should be the next model after the latest succesful one in alphabetical order)

I'll include this fix in the next update regardless :)

Rojinski commented 7 months ago

Thanks for reporting! And glad to hear that you like the extension! 😄

The error probably happens when a model is archived by the publisher on CivitAI, this presumably causes the model to still return information for the model but there is no longer a download link causing the error.

Would be great if you could provide which model the error occurred on so that I can verify it! (Should be the next model after the latest succesful one in alphabetical order)

I'll include this fix in the next update regardless :)

I can't see what model is the pb.... :/ Maybe one of mines? I'd like to help more... Sorry... :/

BlafKing commented 7 months ago

No worries! that's okay. I've now published a new update which should hopefully resolve this issue (v3.3.1) Please let me know if you're still experiencing issues! :)

Rojinski commented 7 months ago

No worries! that's okay. I've now published a new update which should hopefully resolve this issue (v3.3.1) Please let me know if you're still experiencing issues! :)

Perefect!!! Thanks a lot!! Back to normal ! :) You're incredible!