aboutsummaryrefslogtreecommitdiff
path: root/webui.sh
diff options
context:
space:
mode:
authorfuchen.ljl <yjqqqqdx_01@163.com>2023-12-06 20:42:04 +0800
committerGitHub <noreply@github.com>2023-12-06 20:42:04 +0800
commitc2bdbb67b66de06f1163de3f10c290213cd6bdb0 (patch)
tree0fcb3010a72ad253862f317ea18fdeb46b05a322 /webui.sh
parent4d56383025f2cbd00dc6296161e31a896624ab75 (diff)
parentf92d61497a426a19818625c3ccdaae9beeb82b31 (diff)
Merge branch 'dev' into kingljl-patch-memory-leak
Diffstat (limited to 'webui.sh')
-rwxr-xr-xwebui.sh22
1 files changed, 12 insertions, 10 deletions
diff --git a/webui.sh b/webui.sh
index 081624c4..ed404b66 100755
--- a/webui.sh
+++ b/webui.sh
@@ -4,12 +4,6 @@
# change the variables in webui-user.sh instead #
#################################################
-
-use_venv=1
-if [[ $venv_dir == "-" ]]; then
- use_venv=0
-fi
-
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
@@ -28,6 +22,12 @@ then
source "$SCRIPT_DIR"/webui-user.sh
fi
+# If $venv_dir is "-", then disable venv support
+use_venv=1
+if [[ $venv_dir == "-" ]]; then
+ use_venv=0
+fi
+
# Set defaults
# Install directory without trailing slash
if [[ -z "${install_dir}" ]]
@@ -51,6 +51,8 @@ fi
if [[ -z "${GIT}" ]]
then
export GIT="git"
+else
+ export GIT_PYTHON_GIT_EXECUTABLE="${GIT}"
fi
# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
@@ -87,7 +89,7 @@ delimiter="################################################################"
printf "\n%s\n" "${delimiter}"
printf "\e[1m\e[32mInstall script for stable-diffusion + Web UI\n"
-printf "\e[1m\e[34mTested on Debian 11 (Bullseye)\e[0m"
+printf "\e[1m\e[34mTested on Debian 11 (Bullseye), Fedora 34+ and openSUSE Leap 15.4 or newer.\e[0m"
printf "\n%s\n" "${delimiter}"
# Do not run as root
@@ -141,9 +143,8 @@ case "$gpu_info" in
*"Navi 2"*) export HSA_OVERRIDE_GFX_VERSION=10.3.0
;;
*"Navi 3"*) [[ -z "${TORCH_COMMAND}" ]] && \
- export TORCH_COMMAND="pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm5.6"
- # Navi 3 needs at least 5.5 which is only on the nightly chain, previous versions are no longer online (torch==2.1.0.dev-20230614+rocm5.5 torchvision==0.16.0.dev-20230614+rocm5.5 torchaudio==2.1.0.dev-20230614+rocm5.5)
- # so switch to nightly rocm5.6 without explicit versions this time
+ export TORCH_COMMAND="pip install torch torchvision --index-url https://download.pytorch.org/whl/test/rocm5.6"
+ # Navi 3 needs at least 5.5 which is only on the torch 2.1.0 release candidates right now
;;
*"Renoir"*) export HSA_OVERRIDE_GFX_VERSION=9.0.0
printf "\n%s\n" "${delimiter}"
@@ -245,6 +246,7 @@ prepare_tcmalloc() {
printf "\e[1m\e[31mCannot locate TCMalloc (improves CPU memory usage)\e[0m\n"
fi
done
+
fi
}