diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-19 07:49:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 07:49:44 +0000 |
commit | 0d098e46568a268180974953fe2783fff1333040 (patch) | |
tree | 2195d6ef8d1f29b65682e88a707fb5c19dec5734 /webui.sh | |
parent | 98947d173e3f1667eba29c904f681047dea9de90 (diff) | |
parent | ac6fd2a5d91ca1ee36d721ef483b101597d3ee25 (diff) | |
download | stable-diffusion-webui-gfx803-0d098e46568a268180974953fe2783fff1333040.tar.gz stable-diffusion-webui-gfx803-0d098e46568a268180974953fe2783fff1333040.tar.bz2 stable-diffusion-webui-gfx803-0d098e46568a268180974953fe2783fff1333040.zip |
Merge pull request #4527 from d8ahazard/Accelerate
Optional Accelerate Launch
Diffstat (limited to 'webui.sh')
-rwxr-xr-x | webui.sh | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 |