Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: "Download All selected" error | "NameError: name 'output_basemodel' is not defined" #354

Open
KwaiBird opened this issue Oct 25, 2024 · 5 comments
Labels
bug Something isn't working WIP Being worked on

Comments

@KwaiBird
Copy link

KwaiBird commented Oct 25, 2024

Describe the bug.

When I put the check mark(s) to the LoRA models and then press "Download All selected" at browser tab, the NameError occurs.
I prefer to put the models to the subfolder, so I create {BASEMODEL} subfolder entry and set that for LoRA's default sub folder at the settings.

Steps to reproduce the problem.

  1. Set {BASEMODEL} as the LoRA's default sub folder at the Download section of sd-civitai-browser-plus settings at the Settings main tab
  2. Apply the setting and reload the webUI
    3.Search LoRA at CivitAI Brower+at Browser tab of the CivitAI Brower main tab
  3. Put the check mark(s) to the LoRA models and then press "Download All selected" at browser tab
  4. Error occurs.

Expected behavior

Download all the selected models properly.

System info

  • Extension version: 807a21c
  • OS: Windows 10 Home
  • SD-WebUI version: v1.10.1
  • Python: Python 3.10.6

Console logs

Traceback (most recent call last):
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "E:\Stable_Diffusion\sd.webui\webui\extensions\sd-civitai-browser-plus\scripts\civitai_download.py", line 186, in selected_to_queue
    default_subfolder = _file.convertCustomFolder(default_subfolder, output_basemodel, nsfw, model_uploader, model_name, model_id, version_name, version_id)
NameError: name 'output_basemodel' is not defined
Traceback (most recent call last):
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Stable_Diffusion\sd.webui\system\python\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "E:\Stable_Diffusion\sd.webui\webui\extensions\sd-civitai-browser-plus\scripts\civitai_download.py", line 186, in selected_to_queue
    default_subfolder = _file.convertCustomFolder(default_subfolder, output_basemodel, nsfw, model_uploader, model_name, model_id, version_name, version_id)
NameError: name 'output_basemodel' is not defined

Additional information

Personal CivitAI API key is set.
If I choose the one of the models and press "Download model", I can download it without issue.
I'm using junction. The original is at E:\Stable_Diffusion\ and is link to C:\Stable_Diffusion. It might cause the issue.

@KwaiBird KwaiBird added the bug Something isn't working label Oct 25, 2024
@BlafKing
Copy link
Owner

Thanks for reporting!
I have indeed recreated the issue, it has been added to the to-do list!

@BlafKing BlafKing added the WIP Being worked on label Oct 28, 2024
@Number6UK
Copy link

Hi @BlafKing, is there anything I can edit locally to add the missing definition? I've tried searching for output_basemodel in the scripts directory python files, but can't figure out what's missing (though I'm not 100% at Python).
I tried setting up debugging in VSCode but can't get it to attach to the python.exe process properly, so can't properly debug.
If I had an idea of where to start looking I might be able to get the Download All feature running again.

Taithrah added a commit to Taithrah/sd-civitai-browser-plus that referenced this issue Dec 16, 2024
This resolves issue BlafKing#354
@Taithrah
Copy link

If you would like to test it. I made a pull request #375

@KwaiBird
Copy link
Author

KwaiBird commented Dec 17, 2024

If you would like to test it. I made a pull request #375

Thanks! It seems like your branch is working.

@Number6UK
Copy link

Also working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working WIP Being worked on
Projects
None yet
Development

No branches or pull requests

4 participants