Skip to content

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

Open
deoxykev wants to merge 1 commit intoashleykleynhans:mainfrom
deoxykev:patch-1
Open

Allow user to specify command line args for a1111 webui#40
deoxykev wants to merge 1 commit intoashleykleynhans:mainfrom
deoxykev:patch-1

Conversation

@deoxykev
Copy link
Copy Markdown
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
Copy Markdown
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?

Comment thread a1111/webui-user.sh

# 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants