Files
face-lora-qwen-image/启动训练.bat
T

44 lines
1.3 KiB
Batchfile

@echo off
setlocal
cd /d "%~dp0"
echo ============================================
echo Face LoRA Training Launcher (overnight)
echo ============================================
echo.
REM ---- Pre-flight 1: ComfyUI must be CLOSED (holds ~49GB commit + VRAM)
netstat -ano | findstr ":8188" | findstr "LISTENING" >nul 2>&1
if not errorlevel 1 (
echo [ABORT] ComfyUI is still running ^(port 8188 LISTENING^).
echo Training needs the memory and VRAM ComfyUI holds.
echo Please close ComfyUI first, then run this script again.
echo.
pause
exit /b 1
)
echo [OK] ComfyUI not running.
REM ---- Pre-flight 2: need 30GB+ free commit memory
powershell -NoProfile -Command "if ((Get-CimInstance Win32_OperatingSystem).FreeVirtualMemory / 1MB -lt 30) { exit 1 }"
if errorlevel 1 (
echo [ABORT] Less than 30GB free commit memory.
echo Close big apps ^(browser / Photoshop^) and retry.
echo.
pause
exit /b 1
)
echo [OK] Memory check passed.
REM ---- Launch training (only one .py in config dir: the training entry)
cd /d "%~dp0config"
for %%f in (*.py) do (
echo [RUN] %%f
"M:\AI\sd\musubi-tuner\.venv\Scripts\python.exe" "%%f"
goto :after
)
:after
echo.
echo Training process exited. Press any key to close.
pause