aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDGdev91 <iperpido91@gmail.com>2023-06-06 13:43:32 +0000
committerDGdev91 <iperpido91@gmail.com>2023-06-06 13:43:32 +0000
commit62860c221ef9a08b6c7231063ad8887c7157e9d1 (patch)
tree49e461d495935642a24e655455b3316ad1efadc5
parent864676880104fb42b8d78ce8a74dc0b735e8e9b3 (diff)
downloadstable-diffusion-webui-gfx803-62860c221ef9a08b6c7231063ad8887c7157e9d1.tar.gz
stable-diffusion-webui-gfx803-62860c221ef9a08b6c7231063ad8887c7157e9d1.tar.bz2
stable-diffusion-webui-gfx803-62860c221ef9a08b6c7231063ad8887c7157e9d1.zip
Skip force pyton and pytorch ver if TORCH_COMMAND already set
-rwxr-xr-xwebui.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/webui.sh b/webui.sh
index 15e65599..5c8d977c 100755
--- a/webui.sh
+++ b/webui.sh
@@ -114,16 +114,19 @@ fi
# Check prerequisites
gpu_info=$(lspci 2>/dev/null | grep -E "VGA|Display")
case "$gpu_info" in
- *"Navi 1"*)
- pyv="$(${python_cmd} -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')"
- if [[ $(bc <<< "$pyv <= 3.10") -eq 1 ]]
+ *"Navi 1"*)
+ export HSA_OVERRIDE_GFX_VERSION=10.3.0
+ if [[ -z "${TORCH_COMMAND}" ]]
then
- export HSA_OVERRIDE_GFX_VERSION=10.3.0
- # Navi users will still use torch 1.13 because 2.0 does not seem to work.
- export TORCH_COMMAND="pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 --index-url https://download.pytorch.org/whl/rocm5.2"
- else
- printf "\e[1m\e[31mERROR: RX 5000 series GPUs must be using at max python 3.10, aborting...\e[0m"
- exit 1
+ pyv="$(${python_cmd} -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')"
+ if [[ $(bc <<< "$pyv <= 3.10") -eq 1 ]]
+ then
+ # Navi users will still use torch 1.13 because 2.0 does not seem to work.
+ export TORCH_COMMAND="pip install torch==1.13.1+rocm5.2 torchvision==0.14.1+rocm5.2 --index-url https://download.pytorch.org/whl/rocm5.2"
+ else
+ printf "\e[1m\e[31mERROR: RX 5000 series GPUs must be using at max python 3.10, aborting...\e[0m"
+ exit 1
+ fi
fi
;;
*"Navi 2"*) export HSA_OVERRIDE_GFX_VERSION=10.3.0