From ac6fd2a5d91ca1ee36d721ef483b101597d3ee25 Mon Sep 17 00:00:00 2001 From: d8ahazard Date: Thu, 10 Nov 2022 09:39:43 -0600 Subject: [PATCH] Fix accelerate check when spaces in path --- webui.bat | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webui.bat b/webui.bat index 2a066d602..d4d626e23 100644 --- a/webui.bat +++ b/webui.bat @@ -35,8 +35,8 @@ goto :launch :accelerate echo "Checking for accelerate" -dir %VENV_DIR%\Scripts\accelerate.exe >tmp/stdout.txt 2>tmp/stderr.txt -if %ERRORLEVEL% == 0 goto :accelerate_launch +set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe" +if EXIST %ACCELERATE% goto :accelerate_launch :launch %PYTHON% launch.py %* @@ -44,8 +44,7 @@ pause exit /b :accelerate_launch -echo "Accelerating2" -set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe" +echo "Accelerating" %ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py pause exit /b