mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-31 02:32:57 +08:00
Small reformat of the GPU check
This commit is contained in:
parent
c09fb3d8f1
commit
48045545d9
10
webui.sh
10
webui.sh
@ -109,6 +109,10 @@ if echo "$gpu_info" | grep -q "Navi"
|
|||||||
then
|
then
|
||||||
export HSA_OVERRIDE_GFX_VERSION=10.3.0
|
export HSA_OVERRIDE_GFX_VERSION=10.3.0
|
||||||
fi
|
fi
|
||||||
|
if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]
|
||||||
|
then
|
||||||
|
export TORCH_COMMAND="pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2"
|
||||||
|
fi
|
||||||
|
|
||||||
for preq in "${GIT}" "${python_cmd}"
|
for preq in "${GIT}" "${python_cmd}"
|
||||||
do
|
do
|
||||||
@ -170,10 +174,6 @@ then
|
|||||||
else
|
else
|
||||||
printf "\n%s\n" "${delimiter}"
|
printf "\n%s\n" "${delimiter}"
|
||||||
printf "Launching launch.py..."
|
printf "Launching launch.py..."
|
||||||
printf "\n%s\n" "${delimiter}"
|
printf "\n%s\n" "${delimiter}"
|
||||||
if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]
|
|
||||||
then
|
|
||||||
export TORCH_COMMAND="pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2"
|
|
||||||
fi
|
|
||||||
exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
|
exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user