butaixianran / Stable-Diffusion-Webui-Civitai-Helper

Stable Diffusion Webui Extension for Civitai, to manage your model much more easily.
2.41k stars 288 forks source link

Fetch model info process is broken after last update #280

Closed sanovskiy closed 2 months ago

sanovskiy commented 6 months ago

How to reproduce:

  1. Go to "Download Model"
  2. Enter model url
  3. Press "Get Model Info by Civitai URL"
  4. Get an error in console
Civitai Helper: Getting model info by: https://civitai.com/models/58390/detail-tweaker-lora-lora
Civitai Helper: Run get_model_id_from_url
Civitai Helper: Request model info from civitai: 58390
Civitai Helper: GET Request failed with error code:
   404: Not Found
Civitai Helper: An error occurred while attempting to process model info:
        'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "e:\AI\Systems\SD-Forge-Latest\system\python\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "e:\AI\Systems\SD-Forge-Latest\system\python\lib\site-packages\gradio\blocks.py", line 1434, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "e:\AI\Systems\SD-Forge-Latest\system\python\lib\site-packages\gradio\blocks.py", line 1297, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "e:\AI\Systems\SD-Forge-Latest\system\python\lib\site-packages\gradio\blocks.py", line 1272, in validate_outputs
    raise ValueError(
ValueError: An event handler (get_model_info_by_url) didn't receive enough output values (needed: 6, received: 1).
Wanted outputs:
    [state, textbox, textbox, dropdown, dropdown, <gradio.layouts.Column object at 0x00000144E401C190>]
Received outputs:
    [None]

Tested on the last version

webui/extensions/Stable-Diffusion-Webui-Civitai-Helper (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean

image

butaixianran commented 6 months ago

Hi, I tested the model you used: "https://civitai.com/models/58390/detail-tweaker-lora-lora"

Everything is ok, I can get it from civitai without any problem with latest SD webui and this extension.

So, you need to check following things:

https://github.com/zixaphir/Stable-Diffusion-Webui-Civitai-Helper or https://github.com/blue-pen5805/Stable-Diffusion-Webui-Civitai-Helper

If so, you need to ask your question there.

Snipaste_2024-03-28_14-53-57

Snipaste_2024-03-28_14-53-45

Also, on SD webui's setting page, this extension's setting section, you need to fill your API key from Civitai, then, you can get all those controlled models.

For API key, check this extension's document "Civitai API Key" section:

https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper#civitai-api-key

butaixianran commented 2 months ago

No feedback and offered a solution, so closed