Nevysha / Cozy-Nest

A collection of tweak to improve Auto1111 UI//UX
Other
381 stars 17 forks source link

[Issue]: ExtraNetworks "models" tab does not correctly apply checkpoints located in subfolders #179

Open khanonnie opened 1 year ago

khanonnie commented 1 year ago

What happened?

Hi there, I've been enjoying CozyNest's extranetworks tab for making my large, messy collection of models easier to work with. I've noticed a small issue when trying to use it to activate a model stored in a subfolder, as below: image

Filtering down to a subfolder and then clicking a model seems to pass only the file's name to sd-webui's selectCheckpoint function, not the subfolder + name. This results in sd-webui showing the following error in the console, and then defaulting to the first model in its list: Checkpoint Anythingv3.safetensors not found; loading fallback !7thanime\7th_anime_v3_C.safetensors [f6957e654e]

In my case, the Anythingv3 model is located at anything\Anythingv3.safetensors, but CozyNest passes Anythingv3.safetensors into the selectCheckpoint function. This doesn't match any entry in the "Stable Diffusion checkpoints" dropdown, so the operation fails.

Webui

Automatic1111's webui

What browsers are you seeing the problem on?

Firefox, Microsoft Edge

Additional info

Reproduction steps

  1. Create a subdirectory in your sd-webui's models directory
  2. Place some models in the subdirectory
  3. Attempt to load these models using CozyNest's ExtraNetworks feature

Observed result

Server terminal prints an error about not being able to locate the selected model due to missing subdirectory prefix. Fallback model is loaded instead.

Expected result

CozyNest includes the appropriate subdirectory for the selected model and it is loaded normally.

Environment info

image

Relevant browser log output

No response

Relevant log output from the webui

# Example output for a model actually located at 'anything\Anythingv3.safetensors'

Checkpoint Anythingv3.safetensors not found; loading fallback !7thanime\7th_anime_v3_C.safetensors [f6957e654e]

Checklist