diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-21 20:28:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-21 20:28:48 +0000 |
commit | 216f67ec7cdec45bcfa9db40aa6bcac480e3637e (patch) | |
tree | de58da88b194dfaaca9d0e0e8730ded94d28a875 | |
parent | abf11215e0c82a400bab9eab18f654e4f22c37fd (diff) | |
parent | e0b6092bc99efe311261a51289dec67cbf4845bc (diff) | |
download | stable-diffusion-webui-gfx803-216f67ec7cdec45bcfa9db40aa6bcac480e3637e.tar.gz stable-diffusion-webui-gfx803-216f67ec7cdec45bcfa9db40aa6bcac480e3637e.tar.bz2 stable-diffusion-webui-gfx803-216f67ec7cdec45bcfa9db40aa6bcac480e3637e.zip |
Merge pull request #6938 from DaniAndTheWeb/AMD_automation-patch1
AMD environment variable and experimental APU support (Renoir)
-rwxr-xr-x | webui.sh | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -104,6 +104,23 @@ then fi # Check prerequisites +gpu_info=$(lspci 2>/dev/null | grep VGA) +case "$gpu_info" in + *"Navi 1"*|*"Navi 2"*) export HSA_OVERRIDE_GFX_VERSION=10.3.0 + ;; + *"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" + printf "\n%s\n" "${delimiter}" + ;; + *) + ;; +esac +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}" do if ! hash "${preq}" &>/dev/null @@ -164,16 +181,6 @@ then else printf "\n%s\n" "${delimiter}" printf "Launching launch.py..." - printf "\n%s\n" "${delimiter}" - gpu_info=$(lspci 2>/dev/null | grep VGA) - if echo "$gpu_info" | grep -q "AMD" - then - if [[ -z "${TORCH_COMMAND}" ]] - then - export TORCH_COMMAND="pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2" - fi - HSA_OVERRIDE_GFX_VERSION=10.3.0 exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@" - else - exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@" - fi + printf "\n%s\n" "${delimiter}" + exec "${python_cmd}" "${LAUNCH_SCRIPT}" "$@" fi |