-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.bat
36 lines (28 loc) · 884 Bytes
/
run.bat
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
@echo off
setlocal
set "python_dir=%~dp0python"
set "scripts_dir=%~dp0python\Scripts"
set "lib_dir=%~dp0python\Lib\site-packages"
set "pip_py=%~dp0get-pip.py"
set "venv_dir=%~dp0env"
REM Check if Git is already installed
git --version > nul 2>&1
if %errorlevel% equ 0 (
echo Skipping git as it`s installed.
) else (
echo Git not installed, please run install.bat
echo Exiting.
exit /b -1 )
if not exist "%venv_dir%\Scripts\activate.bat" (
echo Virtual env not installed, please run install.bat
echo Exiting.
exit /b -1
)
echo Activating virtual environment
call "%venv_dir%\Scripts\activate"
python -c "import torch; from xformers import ops; assert torch.cuda.is_available(), 'Cuda not available, plese run install.bat'"
if %errorlevel% equ 1 (exit /b -1)
call cd ComfyUI
call python main.py
echo Deactivating virtual environment...
deactivate