-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun.bat
More file actions
53 lines (43 loc) · 1.29 KB
/
run.bat
File metadata and controls
53 lines (43 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo off
SET VENV_DIR=.venv
REM Check if .venv exists
IF NOT EXIST %VENV_DIR% (
echo Creating virtual environment...
python -m venv %VENV_DIR%
)
REM Activate the virtual environment
CALL %VENV_DIR%\Scripts\activate
REM Upgrade pip
echo Upgrading pip...
python -m pip install --upgrade pip
REM Install specific packages
echo Installing required packages...
pip install uv
REM Check for NVIDIA GPU
FOR /F "delims=" %%i IN ('nvidia-smi 2^>^&1') DO (
SET GPU_CHECK=%%i
)
IF NOT ERRORLEVEL 1 (
echo NVIDIA GPU detected, installing GPU dependencies...
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
) ELSE (
echo No NVIDIA GPU detected, installing CPU dependencies...
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
)
uv pip install "numpy>=1.24.3"
REM Install additional requirements
IF EXIST requirements.txt (
echo Installing additional requirements...
uv pip install -r requirements.txt
) ELSE (
echo requirements.txt not found, skipping...
)
REM Launch the script
echo Launching LightDiffusion-Next...
echo.
echo Modern Stack (React + FastAPI): Launching automatically...
echo Access the UI at: http://localhost:5173
echo.
python server.py --frontend
REM Deactivate the virtual environment
deactivate