- 调整自定义节点文件结构,使用 `nodes.py` 和 `__init__.py` 组织代码 - 增加导入和运行时的详细日志输出,便于调试 - 为图像转换、加密和文件写入等关键步骤添加异常捕获与打印 - 新增 `install.py` 脚本自动安装依赖 - 更新 README 文档说明新的目录结构和使用方式 - 移除旧的示例脚本引用,统一通过模块导入调用核心功能
21 lines
709 B
Python
21 lines
709 B
Python
"""comfyui_encrypt package for ComfyUI custom nodes.
|
|
|
|
This package follows the ComfyUI-NodeSample pattern for node discovery.
|
|
"""
|
|
|
|
|
|
import sys
|
|
import traceback
|
|
print("[__init__.py] Importing NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS from nodes.py")
|
|
try:
|
|
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
|
print("[__init__.py] Successfully imported NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS")
|
|
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|
|
except ImportError as e:
|
|
print(f"[__init__.py] ImportError: {e}", file=sys.stderr)
|
|
traceback.print_exc()
|
|
# Fallback for when run directly or during testing
|
|
__all__ = []
|
|
|
|
|