-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconda-start-lowvram.bat
50 lines (40 loc) · 1.39 KB
/
conda-start-lowvram.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
REM set up env variables
for /f %%i in ('cd') do set ENV_NAME=%%~nxi
SET INSTALL_DIR=%userprofile%\Miniconda3
SET PATH=%INSTALL_DIR%\condabin;%PATH%
SET COMFY_MANAGER_DIR=%~dp0..\ComfyUI-Manager
FOR %%I IN (%~dp0..\..) DO SET COMFYUI_DIR=%%~fI
REM This script will check if a conda environment is available and create it if not
CALL conda info --envs | findstr /i %ENV_NAME%
if %errorlevel% == 0 (
echo %ENV_NAME% environment is already available
) else (
echo %ENV_NAME% environment does not exist
echo Creating a new environment
CALL conda create -n %ENV_NAME% python=3.10 -y
)
rem Activate environment
CALL conda activate %ENV_NAME%
if %errorlevel% == 0 (
@REM Install custom node dependencies
CALL pip install -r requirements.txt
@REM install comfyui manager
if exist %COMFY_MANAGER_DIR% (
CD %COMFY_MANAGER_DIR%
CALL git pull
) else (
CALL git clone https://github.com/ltdrdata/ComfyUI-Manager %COMFY_MANAGER_DIR%
CALL pip install -r %COMFY_MANAGER_DIR%\requirements.txt
)
REM Change the working directory to the root folder
CD %COMFYUI_DIR%
rem install packages
CALL pip install -r requirements.txt
rem install CUDA torch
CALL pip install torch==2.0.1+cu118 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
CALL python main.py --disable-smart-memory --lowvram
) else (
echo Failed to activate environment...
)
PAUSE