- Add unique DCI_ prefix to all node names to avoid conflicts - Define custom data types (DCI_IMAGE_DATA, DCI_BINARY_DATA, BINARY_DATA) - Replace bare except statements with specific exception handling - Improve folder_paths import error handling with proper fallbacks - Update install scripts to use recommended 'python -m pip' invocation - Update documentation to reflect node naming changes - Add comprehensive test suite for node registration validation 修复:按照最佳实践改进ComfyUI自定义节点实现 - 为所有节点名称添加唯一的DCI_前缀以避免冲突 - 定义自定义数据类型(DCI_IMAGE_DATA, DCI_BINARY_DATA, BINARY_DATA) - 将裸except语句替换为具体的异常处理 - 改进folder_paths导入错误处理,提供适当的回退方案 - 更新安装脚本使用推荐的'python -m pip'调用方式 - 更新文档以反映节点命名变更 - 添加全面的节点注册验证测试套件
48 lines
1.2 KiB
Batchfile
48 lines
1.2 KiB
Batchfile
@echo off
|
|
REM ComfyUI DCI Extension Installation Script for Windows
|
|
REM This script installs the required dependencies for the DCI extension
|
|
|
|
echo Installing ComfyUI DCI Extension dependencies...
|
|
|
|
REM Check if python is available
|
|
python --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo Error: python is not installed or not in PATH
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
REM Install dependencies using the recommended method
|
|
echo Installing Python dependencies...
|
|
python -m pip install -r requirements.txt
|
|
|
|
if errorlevel 1 (
|
|
echo Error: Failed to install dependencies
|
|
pause
|
|
exit /b 1
|
|
) else (
|
|
echo Dependencies installed successfully!
|
|
)
|
|
|
|
REM Check if ComfyUI is available
|
|
if exist "..\..\..\ComfyUI" (
|
|
echo ComfyUI installation detected
|
|
) else if exist "..\..\ComfyUI" (
|
|
echo ComfyUI installation detected
|
|
) else (
|
|
echo Warning: ComfyUI installation not found in expected locations
|
|
echo Make sure this extension is installed in ComfyUI\custom_nodes\
|
|
)
|
|
|
|
echo.
|
|
echo Installation completed!
|
|
echo.
|
|
echo To use the DCI extension:
|
|
echo 1. Restart ComfyUI
|
|
echo 2. Look for DCI nodes in the node menu under 'DCI' category
|
|
echo 3. Check the examples\ directory for sample workflows
|
|
echo.
|
|
echo For more information, see README.md
|
|
echo.
|
|
pause
|