1. Fix Make Image Grid `from torchvision import transforms as TF` -> `import torchvision.transforms.functional as TF` issue. 2. Upgrade Split Image Grid node: ① Reasonable default values: Ensure at least 1 row/column to avoid division by zero errors. ② Better error messages: Provide specific resolution suggestions. ③ Boundary checks: Ensure cropping does not exceed the image area. ④ Empty list protection: Ensure a valid image tensor is always returned. ⑤ Exception handling: Gracefully handle errors in crop mode. 3. Separated the `install.py` file for ComfyUI and the `install_manual.py` file for the `install.bat` file. It should work fine now. 4. Zip IPAdapterPlus.py to IPAdapterPlus.zip to avoid node-conflict attention in ComfyUI Manager. 5. Random Prompter supports both string dictionaries, lists or txt format for YAML files. 6. Add more choices to Random Prompter.
81 lines
2.3 KiB
Batchfile
81 lines
2.3 KiB
Batchfile
@echo off
|
|
chcp 65001 >nul
|
|
title JakeUpgrade Nodes Installer
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo JakeUpgrade Nodes Installer
|
|
echo ========================================
|
|
echo.
|
|
|
|
:: 检查是否在 ComfyUI 目录中 / Check if in ComfyUI directory
|
|
if not exist "..\..\comfyui" (
|
|
if not exist "..\..\..\comfyui" (
|
|
if not exist "..\..\..\..\comfyui" (
|
|
echo ⚠️ Warning: ComfyUI not detected
|
|
echo.
|
|
)
|
|
)
|
|
)
|
|
|
|
:: 设置 Python 执行路径 / Set Python executable path
|
|
set "PYTHON_EMBEDDED=..\..\..\python_embeded\python.exe"
|
|
set "PYTHON_EMBEDDED1=..\..\..\python_embeded\python.exe"
|
|
set "PYTHON_EMBEDDED2=..\..\..\..\python_embeded\python.exe"
|
|
set "PYTHON_SYSTEM=python"
|
|
set "PYTHON_EXEC="
|
|
|
|
:: 优先使用嵌入式 Python / Prefer embedded Python
|
|
if exist "%PYTHON_EMBEDDED%" (
|
|
set "PYTHON_EXEC=%PYTHON_EMBEDDED%"
|
|
echo ✅ Using embedded Python: %PYTHON_EMBEDDED%
|
|
) else if exist "%PYTHON_EMBEDDED1%" (
|
|
set "PYTHON_EXEC=%PYTHON_EMBEDDED1%"
|
|
echo ✅ Using embedded Python: %PYTHON_EMBEDDED1%
|
|
) else if exist "%PYTHON_EMBEDDED2%" (
|
|
set "PYTHON_EXEC=%PYTHON_EMBEDDED2%"
|
|
echo ✅ Using embedded Python: %PYTHON_EMBEDDED2%
|
|
) else (
|
|
:: 检查系统 Python / Check system Python
|
|
%PYTHON_SYSTEM% --version >nul 2>&1
|
|
if %errorlevel% equ 0 (
|
|
set "PYTHON_EXEC=%PYTHON_SYSTEM%"
|
|
echo ✅ Using system Python
|
|
) else (
|
|
echo ❌ Python not found, please ensure Python 3.8+ is installed
|
|
pause
|
|
exit /b 1
|
|
)
|
|
)
|
|
|
|
echo.
|
|
echo 📦 Starting smart dependency check...
|
|
echo.
|
|
|
|
:: 运行 Python 安装脚本 - 使用手动安装版本
|
|
%PYTHON_EXEC% install_manual.py
|
|
|
|
if %errorlevel% neq 0 (
|
|
echo.
|
|
echo ❌ Error during installation
|
|
echo 💡 Please try the following solutions:
|
|
echo 1. Check network connection
|
|
echo 2. Run this script as administrator
|
|
echo 3. Manual run: %PYTHON_EXEC% -m pip install -r requirements.txt
|
|
echo.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo ========================================
|
|
echo Installation Complete!
|
|
echo ========================================
|
|
echo.
|
|
echo 📝 Next steps:
|
|
echo • Start ComfyUI
|
|
echo • Find JakeUpgrade nodes in node menu
|
|
echo • If issues occur, check console error messages
|
|
echo.
|
|
|
|
pause |