workflows / ComfyUI-Easy-Install-luis.bat
Luis-Filipe's picture
Upload 8 files
ca0d11c verified
@Echo off
Title ComfyUI-Easy-Install NEXT by ivo v1.63.0 (Ep63)
:: Pixaroma Community Edition ::
:: === Instalar sempre neste caminho fixo ===
set "INSTALL_DIR=D:\comfyuiAutoInstallerWAN21_v20\comfyui_portable"
:: === Muda o diretório de trabalho ===
cd /D "%INSTALL_DIR%"
if errorlevel 1 (
echo ERRO: Nao foi possivel aceder a %INSTALL_DIR%.
echo Cria a pasta manualmente e tenta novamente.
pause
exit /b
)
:: === Configuração padrão ===
set "PYTHON_VERSION=3.12"
call :set_colors
set GIT_LFS_SKIP_SMUDGE=1
set "PIPargs=--no-cache-dir --no-warn-script-location --timeout=1000 --retries 200"
set "CURLargs=--retry 200 --retry-all-errors"
set "UVargs=--no-cache --link-mode=copy"
:: === Verifica se Python é suportado ===
if not "%PYTHON_VERSION%"=="3.11" if not "%PYTHON_VERSION%"=="3.12" (
echo.
echo %warning%WARNING: %red%Python %PYTHON_VERSION% is not suportado.%reset%
pause
exit /b
)
:: === Remove pasta python_embeded existente ===
if exist "%INSTALL_DIR%\python_embeded" (
echo.
echo %yellow%Apagando versao anterior de python_embeded...%reset%
rmdir /s /q "%INSTALL_DIR%\python_embeded"
)
:: === Remove versão anterior do ComfyUI (mantendo addons se quiseres mudar comenta as linhas seguintes) ===
if exist "%INSTALL_DIR%\ComfyUI" (
echo.
echo %yellow%Apagando versão antiga do ComfyUI...%reset%
rmdir /s /q "%INSTALL_DIR%\ComfyUI"
)
:: === Clonar repositório sempre de novo ===
echo %green%Clonando repositório ComfyUI...%reset%
git.exe clone https://github.com/comfyanonymous/ComfyUI "%INSTALL_DIR%\ComfyUI"
:: === Instalar Python embutido ===
if "%PYTHON_VERSION%"=="3.11" (set "PYTHON_VER=3.11.9")
if "%PYTHON_VERSION%"=="3.12" (set "PYTHON_VER=3.12.10")
echo.
echo %green%Baixando Python %PYTHON_VER%...%reset%
mkdir "%INSTALL_DIR%\python_embeded"
cd "%INSTALL_DIR%\python_embeded"
curl.exe -OL https://www.python.org/ftp/python/%PYTHON_VER%/python-%PYTHON_VER%-embed-amd64.zip --ssl-no-revoke %CURLargs%
tar.exe -xf python-%PYTHON_VER%-embed-amd64.zip
del python-%PYTHON_VER%-embed-amd64.zip
:: === Instalar pip e uv ===
curl.exe -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py --ssl-no-revoke %CURLargs%
.\python.exe -I get-pip.py %PIPargs%
.\python.exe -I -m pip install uv %PIPargs%
.\python.exe -I -m pip install torch==2.8.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 %PIPargs%
.\python.exe -I -m uv pip install pygit2 %UVargs%
:: === Instalar dependências do ComfyUI ===
cd "%INSTALL_DIR%\ComfyUI"
"%INSTALL_DIR%\python_embeded\python.exe" -I -m uv pip install -r requirements.txt %UVargs%
:: === Mensagem final ===
echo.
echo %green%========================================================%reset%
echo %green%Instalação concluída em:%reset% %yellow%%INSTALL_DIR%%reset%
echo %green%Para iniciar o ComfyUI, executa:%reset%
echo %yellow%%INSTALL_DIR%\python_embeded\python.exe %INSTALL_DIR%\main.py%reset%
echo %green%========================================================%reset%
pause
goto :eof
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:set_colors
set warning=
set red=
set green=
set yellow=
set reset=
goto :eof