git / menu.bat
happyneishon's picture
Upload 6 files
d562b38 verified
@echo off
chcp 65001
setlocal enabledelayedexpansion
cd /d %~dp0
set "target_dir=%~dp0"
set "custom_n=%target_dir%ComfyUI\custom_nodes"
set "py=%target_dir%python\"
set "git=%target_dir%git\git\bin\git"
set "pip=%py%python -m pip"
set "PATH=%PATH%;%target_dir%git\git\bin;%target_dir%git\git\libexec;"
call :ColorText "==============================================================" "Yellow"
call :ColorText ".bat file menu for installing custom_nodes by TetaZina" "Green"
call :ColorText "telegram @partiaComfynistov or https://t.me/partiaComfynistov" "blue"
call :ColorText "==============================================================" "red"
set "repos[0]=https://github.com/ltdrdata/ComfyUI-Manager ComfyUI-Manager"
set "repos[1]=https://github.com/cubiq/ComfyUI_IPAdapter_plus ComfyUI_IPAdapter_plus"
set "repos[2]=https://github.com/pythongosssss/ComfyUI-Custom-Scripts ComfyUI-Custom-Scripts"
set "repos[3]=https://github.com/kijai/ComfyUI-SUPIR ComfyUI-SUPIR"
set "repos[4]=https://github.com/Gourieff/comfyui-reactor-node comfyui-reactor-node"
set "repos[5]=https://github.com/yolain/ComfyUI-Easy-Use ComfyUI-Easy-Use"
set "repos[6]=https://github.com/rgthree/rgthree-comfy rgthree-comfy"
set "repos[7]=https://github.com/11cafe/comfyui-workspace-manager comfyui-workspace-manager"
set "repos[8]=https://github.com/crystian/ComfyUI-Crystools ComfyUI-Crystools"
set "repos[9]=https://github.com/pythongosssss/ComfyUI-WD14-Tagger ComfyUI-WD14-Tagger"
set "repos[10]=https://github.com/ltdrdata/ComfyUI-Impact-Pack ComfyUI-Impact-Pack"
set "repos[11]=https://github.com/coolzilj/ComfyUI-Photopea ComfyUI-Photopea"
set "repos[12]=https://github.com/time-river/ComfyUI-CLIPSeg ComfyUI-CLIPSeg"
set "repos[13]=https://github.com/Fannovel16/comfyui_controlnet_aux comfyui_controlnet_aux"
set "repos[14]=https://github.com/Acly/comfyui-inpaint-nodes comfyui-inpaint-nodes"
:menu
echo ========================================
echo Выберите команду для выполнения:
for /L %%i in (0,1,14) do (
for /f "tokens=2 delims= " %%a in ("!repos[%%i]!") do (
set /a "num=%%i+1"
echo !num!. установить %%a
)
)
echo g. Установить все кастомные ноды
echo h. Пропустить установку кастомных нод
echo ========================================
choice /c 123456789ABCDEFGH /n /m "Введите ваш выбор: "
if errorlevel 17 goto skipall
if errorlevel 16 goto install_all
set /a choice=%errorlevel%-1
call :install_repo !choice!
goto menu
:install_repo
for /f "tokens=1,2" %%a in ("!repos[%1]!") do (
call :check_and_clone %%a %%b
)
goto :eof
:check_and_clone
if exist %custom_n%\%2 (
echo %2 уже установлено, пропуск...
) else (
%git% clone %1 %custom_n%\%2
if exist %custom_n%\%2\requirements.txt (
%pip% install -r %custom_n%\%2\requirements.txt
)
)
goto :eof
:install_all
for /L %%i in (0,1,14) do (
for /f "tokens=1,2" %%a in ("!repos[%%i]!") do (
call :check_and_clone %%a %%b
)
)
goto end
:skipall
echo Пропуск установки всех команд...
goto end
:end
echo ==============================================================
echo .bat file menu for installing custom_nodes by TetaZina
echo telegram @partiaComfynistov or https://t.me/partiaComfynistov
echo ==============================================================
echo Завершение установки кастомных нод...
del /f /q %target_dir%menu.bat
exit /b
:ColorText
echo %~1
exit /b