aboutsummaryrefslogtreecommitdiff
path: root/webui.bat
diff options
context:
space:
mode:
authorMaiko Tan <maiko.tan.coding@gmail.com>2022-11-19 20:13:07 +0800
committerMaiko Tan <maiko.tan.coding@gmail.com>2022-11-19 20:13:07 +0800
commit336c341a7c3fe81cdf0fc45616ed0c16c79a2c6f (patch)
tree6760fd7f15a9049365a1ee2c56de37dd456504bd /webui.bat
parent8f2ff861d31972d12de278075ea9c0c0deef99de (diff)
parent84a6f211d407cd748c603edc3a81862488505c24 (diff)
Merge branch 'master' into api-authorization
Diffstat (limited to 'webui.bat')
-rw-r--r--webui.bat12
1 files changed, 12 insertions, 0 deletions
diff --git a/webui.bat b/webui.bat
index a38a28bb..d4d626e2 100644
--- a/webui.bat
+++ b/webui.bat
@@ -28,15 +28,27 @@ goto :show_stdout_stderr
:activate_venv
set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"
echo venv %PYTHON%
+if [%ACCELERATE%] == ["True"] goto :accelerate
goto :launch
:skip_venv
+:accelerate
+echo "Checking for accelerate"
+set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe"
+if EXIST %ACCELERATE% goto :accelerate_launch
+
:launch
%PYTHON% launch.py %*
pause
exit /b
+:accelerate_launch
+echo "Accelerating"
+%ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py
+pause
+exit /b
+
:show_stdout_stderr
echo.