Optional Accelerate Launch

This commit is contained in:
d8ahazard
2022-11-09 11:15:17 -06:00
parent ac08562854
commit 0a54bd3395
6 changed files with 31 additions and 4 deletions

View File

@@ -28,15 +28,28 @@ 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"
dir %VENV_DIR%\Scripts\accelerate.exe >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :accelerate_launch
:launch
%PYTHON% launch.py %*
pause
exit /b
:accelerate_launch
echo "Accelerating2"
set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe"
%ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py
pause
exit /b
:show_stdout_stderr
echo.