stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

[Bug]: Extra networks not showing tree view if Commandline arg points to another path

Open Dawgmastah opened this issue 1 year ago • 8 comments

Checklist

  • [X] The issue exists after disabling all extensions
  • [X] The issue exists on a clean installation of webui
  • [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • [X] The issue exists in the current version of the webui
  • [X] The issue has not been reported before recently
  • [ ] The issue has been reported before but has not been fixed yet

What happened?

As written in title, the extra networks does not show folders (I checke don the options already) The only thing im thinking should be interfering is that im pointing ther Loras folder to my auto folder using commandline args.

This is the webui copypaste: set VENV_DIR= set A1111_HOME="X:\STABLEDIFFUSION\AUTOMATIC11111" set COMMANDLINE_ARGS= --always-gpu --ckpt-dir "X:\AIMODELS" --lora-dir %A1111_HOME%/models/Lora --embeddings-dir %A1111_HOME%/models/embeddings --hypernetwork-dir %A1111_HOME%/models/hypernetworks --vae-dir "X:\STABLEDIFFUSION\AUTOMATIC11111\models\VAE" --gfpgan-dir "X:\STABLEDIFFUSION\AUTOMATIC11111\models\GFPGAN" --esrgan-models-path "X:\STABLEDIFFUSION\AUTOMATIC11111\models\ESRGAN" --bsrgan-models-path "X:\STABLEDIFFUSION\AUTOMATIC11111\models\BSRGAN"

Maybe Its a problem with the quotes? The loras are found and load.

Steps to reproduce the problem

Point to a folder in other location using commandline args, use the extra networks viewer

What should have happened?

Should show folders/tree view

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-02-07-15-44.json

Console logs

N/A

Additional information

No response

Dawgmastah avatar Feb 08 '24 06:02 Dawgmastah

I'm also having this issue (Windows 11). I'm not using quotes in my paths.

set A1111_HOME=C:/stable-diffusion/data
set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^
--ckpt-dir %A1111_HOME%/models/Stable-diffusion ^
--embeddings-dir %A1111_HOME%/embeddings ^
--lora-dir %A1111_HOME%/models/Lora ^
--esrgan-models-path %A1111_HOME%/models/ESRGAN ^
--vae-dir %A1111_HOME%/models/VAE

I noticed that the default model that's downloaded at first run shows in the tree view. So extra networks is still looking at the original folders, and any models in folders there show up. Just not any folders in our folder paths we have set in the arguments.

ManOrMonster avatar Feb 10 '24 17:02 ManOrMonster

i don´t know why this is not put into the settings anyway, why people who are not coders have to use arguments. the settings have so many option.... yet none to set the folder path. maybe it is coder logic but to me as a laymen it makes no sense.

Gothmoth88 avatar Feb 11 '24 11:02 Gothmoth88

I just bit the bullet and solved this on my end using Symlinks. Now I have no arguments on forge, only 1 on automatic pointing to the forge controlnet models folder, and both UIs see the checkpoints, loras and embeddings precisely where they should.

There just some issues with how Lycoris are implemented in the civitai helper, but I can live with that

Dawgmastah avatar Feb 12 '24 18:02 Dawgmastah

I just bit the bullet and solved this on my end using Symlinks.

That's definitely a quickfix for this, but I've personally been trying to get away from symlinks. And since the application supports pointing to different folders, it should support that internally throughout the app.

ManOrMonster avatar Feb 13 '24 19:02 ManOrMonster

I've almost resolved the issue with this config:

set A1111_HOME=C:\\stable-diffusion\\data
set COMMANDLINE_ARGS=%COMMANDLINE_ARGS% ^
--ckpt-dir %A1111_HOME%\\models\\Stable-diffusion ^
--embeddings-dir %A1111_HOME%\\embeddings ^
--lora-dir %A1111_HOME%\\models\\Lora ^
--esrgan-models-path %A1111_HOME%\\models\\ESRGAN ^
--vae-dir %A1111_HOME%\\models\\VAE

Note the double backslashes instead of forward slashes.

My folder trees now show up properly in extra networks except for Checkpoints. My checkpoints still showed up though, but no tree.

However, after deleting the default model that is downloaded into the webui/models/Stable-diffusion folder when first running Forge, it now only displays one checkpoint, which happens to be the only one in a non-hidden folder. All of my model subfolders start with ".", since they are categorized heavily, and this is not causing a problem with the LORA or textual inversion trees. The models still are listing properly in the "Stable Diffusion checkpoint" selector.

So it seems like there is some hard coding somewhere that always looks at the default checkpoint folder in addition to the custom one in the config, which is affecting the tree view in Checkpoints under extra networks.

ManOrMonster avatar Feb 15 '24 18:02 ManOrMonster

Confirmed issue with latest upstream. Replacing forward slashes with double backslashes fixes it in the meantime. I'm unable to reproduce the issue being described above where only the checkpoints folder does not display a tree though.

catboxanon avatar Feb 15 '24 19:02 catboxanon

@catboxanon

Confirmed issue with latest upstream. Replacing forward slashes with double backslashes fixes it in the meantime. I'm unable to reproduce the issue being described above where only the checkpoints folder does not display a tree though.

What is your --ckpt-dir pointing to? Is it the same as mine ("Stable-diffusion") or do you have a different folder name?

ManOrMonster avatar Feb 15 '24 23:02 ManOrMonster

You're right, it looks like it's broken if the folder uses the same default name (Stable-diffusion). Regardless, that should be reported and resolved upstream, not here.

catboxanon avatar Feb 16 '24 04:02 catboxanon

I'm closing this as the original issue in OP has been resolved via https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14934, which is now merged into this repo. Please open a new issue upstream for the other issue if it still persists as I mentioned above.

catboxanon avatar Feb 17 '24 20:02 catboxanon