aboutsummaryrefslogtreecommitdiff
path: root/webui.bat
diff options
context:
space:
mode:
authord8ahazard <d8ahazard@gmail.com>2022-11-10 09:39:43 -0600
committerd8ahazard <d8ahazard@gmail.com>2022-11-10 09:39:43 -0600
commitac6fd2a5d91ca1ee36d721ef483b101597d3ee25 (patch)
tree4a4b032e55771ba9b85c42edb18c935573cff39e /webui.bat
parent0a54bd3395e30bf7772ad6f11d69c5c437a1ab73 (diff)
Fix accelerate check when spaces in path
Diffstat (limited to 'webui.bat')
-rw-r--r--webui.bat7
1 files changed, 3 insertions, 4 deletions
diff --git a/webui.bat b/webui.bat
index 2a066d60..d4d626e2 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