aboutsummaryrefslogtreecommitdiffstats
path: root/webui.sh
diff options
context:
space:
mode:
authorKeavon Chambers <keavon@keavon.com>2022-11-19 18:34:31 +0000
committerGitHub <noreply@github.com>2022-11-19 18:34:31 +0000
commit2f90496b19cd9c512633742db97b072a7075f017 (patch)
tree60d2dddd69172d9b5cf58c8da2bd64c61132f4fa /webui.sh
parenta258fd60dbe2d68325339405a2aa72816d06d2fd (diff)
parent47a44c7e421b98ca07e92dbf88769b04c9e28f86 (diff)
downloadstable-diffusion-webui-gfx803-2f90496b19cd9c512633742db97b072a7075f017.tar.gz
stable-diffusion-webui-gfx803-2f90496b19cd9c512633742db97b072a7075f017.tar.bz2
stable-diffusion-webui-gfx803-2f90496b19cd9c512633742db97b072a7075f017.zip
Merge branch 'master' into cors-regex
Diffstat (limited to 'webui.sh')
-rwxr-xr-xwebui.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/webui.sh b/webui.sh
index cc06f344..d89b344b 100755
--- a/webui.sh
+++ b/webui.sh
@@ -134,7 +134,15 @@ else
exit 1
fi
-printf "\n%s\n" "${delimiter}"
-printf "Launching launch.py..."
-printf "\n%s\n" "${delimiter}"
-"${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
+if [[ ! -z "${ACCELERATE}" ]] && [ ${ACCELERATE}="True" ] && [ -x "$(command -v accelerate)" ]
+then
+ printf "\n%s\n" "${delimiter}"
+ printf "Accelerating launch.py..."
+ printf "\n%s\n" "${delimiter}"
+ accelerate launch --num_cpu_threads_per_process=6 "${LAUNCH_SCRIPT}" "$@"
+else
+ printf "\n%s\n" "${delimiter}"
+ printf "Launching launch.py..."
+ printf "\n%s\n" "${delimiter}"
+ "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
+fi