Advice on a couple annoyances for Linux users (COMMANDLINE_ARGS, custom model directories): #16125
cha0sbuster
started this conversation in
General
Replies: 1 comment 1 reply
-
Hmm. Write a simple script, whick will |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just thought I'd point these out in case anybody needed it, as my cursory search for related issues mostly pulled up stuff relevant to Windows users.
On
webui-user.sh
Currently, if you're a Linux user, the README recommends you to do
wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
and then run it, which automatically installs the webui in a subdirectory wherever you put it. That's all well and good! But when done like this, if you continue launching stable-diffusion-webui from the file you obtained, it won't be able to see any edits you make to<location-of-webui>/stable-diffusion-webui/webui-user.sh
, because it's only looking within the folderwebui.sh
is in. This means that e.g. command line arguments won't work properly.Work around this by:
webui.sh
that youwget
ed and launch thewebui.sh
in the subdirectory instead, orwebui-user.sh
out into the main directory.Both of these seem to work well enough, but the latter is probably good practice in case you break something non-obvious in the configuration (changes to the copied file will also survive updates via
git pull
.) However, while editing this post, I found out that at least one (now-fixed) problem was found to be caused by running stable-diffusion-webui from outside of its root directory. If more are found, then it's probably best that the installation process for Linux be revised completely -- but I imagine they'd have come up by this point.)For devs: If
webui.sh
either copiedwebui-user.sh
from the subdirectory automatically, or at least advised that it wasn't found in the CWD, that might help.Custom model directories
Speaking ofgit pull
updates, the guidance in the wiki about using links to specify custom model directories will also cause updating viagit pull
to break, because Git doesn't like dereferencing symlinks, for very good reasons. I did this with ComfyUI before they implementedextra_model_paths.yaml
and had to remove the links every time I wanted to update, it was a nightmare. Prefer the command line arguments. Since the options are set with a shell script, you could export an extra variable pointing to the place you keep your model files, then reference that in COMMANDLINE_ARGS with shell substitution, if you'd like.For devs: Something like ComfyUI's extra_model_paths.yaml file, which lets you specify a base directory and then derive subdirectories from that, might be user-friendly. But the command line arguments work alright. (Also, probably don't tell people to use symlinks in the wiki, or add onto that guidance mentioning that this can happen.)EDIT: Checked the .gitignore, saw that the webui-user scripts and the models directory are in there, so this is probably fine, actually...
OK I'm done yappin' now bye
Beta Was this translation helpful? Give feedback.
All reactions