aboutsummaryrefslogtreecommitdiff
path: root/webui.sh
diff options
context:
space:
mode:
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