aboutsummaryrefslogtreecommitdiffstats
path: root/webui.sh
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-06-01 05:42:50 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-06-01 05:42:50 +0000
commitb3390a984081950c626070889580e01727689921 (patch)
treef1fb3352f91d70034d54a99c220f1ca594d8b3dc /webui.sh
parent0cc05fc492a9360d3b2f1b3f64c7d74f9041f74e (diff)
parent36888092afa82ee248bc947229f813b453629317 (diff)
downloadstable-diffusion-webui-gfx803-b3390a984081950c626070889580e01727689921.tar.gz
stable-diffusion-webui-gfx803-b3390a984081950c626070889580e01727689921.tar.bz2
stable-diffusion-webui-gfx803-b3390a984081950c626070889580e01727689921.zip
Merge branch 'dev' into startup-profile
Diffstat (limited to 'webui.sh')
-rwxr-xr-xwebui.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/webui.sh b/webui.sh
index ab52ac3b..607557b1 100755
--- a/webui.sh
+++ b/webui.sh
@@ -124,9 +124,12 @@ case "$gpu_info" in
*)
;;
esac
-if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]
+if ! echo "$gpu_info" | grep -q "NVIDIA";
then
- export TORCH_COMMAND="pip install torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 --index-url https://download.pytorch.org/whl/rocm5.4.2"
+ if echo "$gpu_info" | grep -q "AMD" && [[ -z "${TORCH_COMMAND}" ]]
+ then
+ export TORCH_COMMAND="pip install torch==2.0.1+rocm5.4.2 torchvision==0.15.2+rocm5.4.2 --index-url https://download.pytorch.org/whl/rocm5.4.2"
+ fi
fi
for preq in "${GIT}" "${python_cmd}"
@@ -190,7 +193,7 @@ fi
# Try using TCMalloc on Linux
prepare_tcmalloc() {
if [[ "${OSTYPE}" == "linux"* ]] && [[ -z "${NO_TCMALLOC}" ]] && [[ -z "${LD_PRELOAD}" ]]; then
- TCMALLOC="$(ldconfig -p | grep -Po "libtcmalloc.so.\d" | head -n 1)"
+ TCMALLOC="$(PATH=/usr/sbin:$PATH ldconfig -p | grep -Po "libtcmalloc(_minimal|)\.so\.\d" | head -n 1)"
if [[ ! -z "${TCMALLOC}" ]]; then
echo "Using TCMalloc: ${TCMALLOC}"
export LD_PRELOAD="${TCMALLOC}"