From 7ee0d65c1359907b3b57adf44a8dbda02d6beccc Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 4 Nov 2023 08:22:57 -0400 Subject: [PATCH] update startup scripts --- extensions-builtin/sd-webui-controlnet | 2 +- webui.bat | 4 ++++ webui.ps1 | 4 ++++ webui.sh | 19 +++++++++---------- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/extensions-builtin/sd-webui-controlnet b/extensions-builtin/sd-webui-controlnet index 3011ff6e7..27c522029 160000 --- a/extensions-builtin/sd-webui-controlnet +++ b/extensions-builtin/sd-webui-controlnet @@ -1 +1 @@ -Subproject commit 3011ff6e706d3fdd0cc7d2ac8ff0d59020b8f767 +Subproject commit 27c522029e6efe64fe889c89386497b5a14d3512 diff --git a/webui.bat b/webui.bat index 2d12762c6..11aaf6b3a 100755 --- a/webui.bat +++ b/webui.bat @@ -1,3 +1,7 @@ +:: -------------------------------------------------------------------------------------------------------------- +:: Do not make any changes to this file, change the variables in webui-user.bat instead and call this file +:: -------------------------------------------------------------------------------------------------------------- + @echo off if not defined PYTHON (set PYTHON=python) diff --git a/webui.ps1 b/webui.ps1 index eac963fea..a607ac6f1 100755 --- a/webui.ps1 +++ b/webui.ps1 @@ -1,3 +1,7 @@ +# -------------------------------------------------------------------------------------------------------------- +# Do not make any changes to this file, change the variables in webui-user.ps1 instead and call this file +# -------------------------------------------------------------------------------------------------------------- + function ShowStdOutStdErr { Write-Output "exit code: $LASTEXITCODE" diff --git a/webui.sh b/webui.sh index b05921579..692cc36c1 100755 --- a/webui.sh +++ b/webui.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash -################################################# -# Please do not make any changes to this file, # -# change the variables in webui-user.sh instead # -################################################# +# ------------------------------------------------------------------------------------------------------------- +# Do not make any changes to this file, change the variables in webui-user.sh instead and call this file +# ------------------------------------------------------------------------------------------------------------- # change to local directory cd -- "$(dirname -- "$0")" @@ -18,9 +17,9 @@ then fi # python3 executable -if [[ -z "${python_cmd}" ]] +if [[ -z "${PYTHON}" ]] then - python_cmd="python3" + PYTHON="python3" fi # git executable @@ -51,7 +50,7 @@ then exit 1 fi -for preq in "${GIT}" "${python_cmd}" +for preq in "${GIT}" "${PYTHON}" do if ! hash "${preq}" &>/dev/null then @@ -60,7 +59,7 @@ do fi done -if ! "${python_cmd}" -c "import venv" &>/dev/null +if ! "${PYTHON}" -c "import venv" &>/dev/null then echo "Error: python3-venv is not installed" exit 1 @@ -69,7 +68,7 @@ fi echo "Create and activate python venv" if [[ ! -d "${venv_dir}" ]] then - "${python_cmd}" -m venv "${venv_dir}" + "${PYTHON}" -m venv "${venv_dir}" first_launch=1 fi @@ -102,5 +101,5 @@ then exec ipexrun --multi-task-manager 'taskset' --memory-allocator 'jemalloc' launch.py "$@" else echo "Launching launch.py..." - exec "${python_cmd}" launch.py "$@" + exec "${PYTHON}" launch.py "$@" fi