Files
zccrs-comfyui-dci/install.sh
T
JiDe Zhang 57d780292a fix: Improve ComfyUI custom node implementation following best practices
- 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'调用方式
- 更新文档以反映节点命名变更
- 添加全面的节点注册验证测试套件
2025-06-04 17:22:37 +08:00

51 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# ComfyUI DCI Extension Installation Script
# This script installs the required dependencies for the DCI extension
echo "Installing ComfyUI DCI Extension dependencies..."
# Check if we're in a virtual environment
if [[ "$VIRTUAL_ENV" != "" ]]; then
echo "Virtual environment detected: $VIRTUAL_ENV"
else
echo "Warning: No virtual environment detected. Consider using one."
fi
# Check if python is available
if ! command -v python &> /dev/null; then
echo "Error: python is not installed or not in PATH"
exit 1
fi
# Install dependencies using the recommended method
echo "Installing Python dependencies..."
python -m pip install -r requirements.txt
if [ $? -eq 0 ]; then
echo "Dependencies installed successfully!"
else
echo "Error: Failed to install dependencies"
exit 1
fi
# Check if ComfyUI is available
if [ -d "../../../ComfyUI" ]; then
echo "ComfyUI installation detected"
elif [ -d "../../ComfyUI" ]; then
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/"
fi
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"