aboutsummaryrefslogtreecommitdiffstats
path: root/webui.sh
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-07-12 08:57:57 +0000
committerGitHub <noreply@github.com>2023-07-12 08:57:57 +0000
commite0218c4f22396a1be8aa4fde3db17c6fc85904eb (patch)
tree9cc918c09da3afaa4dfd93a823e5485006b9e5c6 /webui.sh
parent3fee3c34f1b01d21770ab0a226b432cdd8444792 (diff)
parent15adff3d6d5e8ba186b3df6eee8a8d774c8f3879 (diff)
downloadstable-diffusion-webui-gfx803-e0218c4f22396a1be8aa4fde3db17c6fc85904eb.tar.gz
stable-diffusion-webui-gfx803-e0218c4f22396a1be8aa4fde3db17c6fc85904eb.tar.bz2
stable-diffusion-webui-gfx803-e0218c4f22396a1be8aa4fde3db17c6fc85904eb.zip
Merge branch 'dev' into img2img-save
Diffstat (limited to 'webui.sh')
-rwxr-xr-xwebui.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/webui.sh b/webui.sh
index 5c8d977c..a683d946 100755
--- a/webui.sh
+++ b/webui.sh
@@ -4,26 +4,28 @@
# change the variables in webui-user.sh instead #
#################################################
+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)
@@ -131,6 +133,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"