aboutsummaryrefslogtreecommitdiff
path: root/webui.sh
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-19 07:59:39 +0300
committerGitHub <noreply@github.com>2023-07-19 07:59:39 +0300
commit0a334b447ff0c41519bb9e280050736913ad9cf8 (patch)
treee27963f76b7357ff0cb7b2c3fdcb720ab64f0e50 /webui.sh
parent6094310704f4b3853bfa5d05d9c1ace58b2deee7 (diff)
parentc2b975485708791b29d44d79ee1a48d3abd838b7 (diff)
Merge branch 'dev' into allow-no-venv-install
Diffstat (limited to 'webui.sh')
-rwxr-xr-xwebui.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/webui.sh b/webui.sh
index ed4cb4c8..cb8b9d14 100755
--- a/webui.sh
+++ b/webui.sh
@@ -4,31 +4,35 @@
# 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 )
+
+
# If run from macOS, load defaults from webui-macos-env.sh
if [[ "$OSTYPE" == "darwin"* ]]; then
- if [[ -f webui-macos-env.sh ]]
+ if [[ -f "$SCRIPT_DIR"/webui-macos-env.sh ]]
then
- source ./webui-macos-env.sh
+ source "$SCRIPT_DIR"/webui-macos-env.sh
fi
fi
# Read variables from webui-user.sh
# shellcheck source=/dev/null
-if [[ -f webui-user.sh ]]
+if [[ -f "$SCRIPT_DIR"/webui-user.sh ]]
then
- source ./webui-user.sh
+ source "$SCRIPT_DIR"/webui-user.sh
fi
# Set defaults
# Install directory without trailing slash
if [[ -z "${install_dir}" ]]
then
- install_dir="$(pwd)"
+ install_dir="$SCRIPT_DIR"
fi
# Name of the subdirectory (defaults to stable-diffusion-webui)
@@ -136,6 +140,10 @@ 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==2.1.0.dev-20230614+rocm5.5 torchvision==0.16.0.dev-20230614+rocm5.5 --index-url https://download.pytorch.org/whl/nightly/rocm5.5"
+ # Navi 3 needs at least 5.5 which is only on the nightly chain
+ ;;
*"Renoir"*) export HSA_OVERRIDE_GFX_VERSION=9.0.0
printf "\n%s\n" "${delimiter}"
printf "Experimental support for Renoir: make sure to have at least 4GB of VRAM and 10GB of RAM or enable cpu mode: --use-cpu all --no-half"