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

Allow user to specify command line args for a1111 webui #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deoxykev
Copy link
Contributor

@deoxykev deoxykev commented Jan 3, 2024

This should allow the user to customize flags by setting the COMMANDLINE_ARGS env variable in the docker run. If nothing is passed in, then the defaults are used.

This should allow the user to customize flags by setting the `COMMANDLINE_ARGS` env variable in the docker run. If nothing is passed in, then the defaults are used.
@ashleykleynhans
Copy link
Owner

This should allow the user to customize flags by setting the COMMANDLINE_ARGS env variable in the docker run. If nothing is passed in, then the defaults are used.

"should" ? Did you test it?

@@ -10,7 +10,7 @@ install_dir="/workspace"
#clone_dir="stable-diffusion-webui"

# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
export COMMANDLINE_ARGS="--port 3001 --skip-install --listen --api --xformers --enable-insecure-extension-access --no-half-vae"
test -z "$COMMANDLINE_ARGS" || export COMMANDLINE_ARGS="--port 3001 --skip-install --listen --api --xformers --enable-insecure-extension-access --no-half-vae"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work correctly, correct syntax is:

: ${COMMANDLINE_ARGS:="--port 3001 --skip-install --listen --api --xformers --enable-insecure-extension-access --no-half-vae"} && export COMMANDLINE_ARGS

Copy link
Contributor

@elthariel elthariel Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of a similar need I've decided to add something along the lines of :

WEBUI_USER_LOCAL=${WEBUI_USER_LOCAL:-webui-user.local.sh}
if [ -x "$WEBUI_USER_LOCAL" ] ; then
  source "$WEBUI_USER_LOCAL"
fi

I think it gives even more flexibility, as it allows to put the config in /workspace which is helpful for runpod users :D

@elthariel
Copy link
Contributor

I've addressed this issue in #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants