1 Star 0 Fork 0

suifengpiao/ComfyScript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
__init__.py 1020 Bytes
一键复制 编辑 原始数据 按行查看 历史
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
success = True
import sys
from pathlib import Path
if sys.version_info < (3, 9):
success = False
print('\033[34mComfyScript: \033[91mPython 3.9+ is required.\033[0m')
root = Path(__file__).resolve().parent
sys.path.insert(0, str(root / 'src'))
import comfy_script.nodes
from comfy_script.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
success &= comfy_script.nodes.success
# Load comfyui-legacy custom nodes
import importlib.metadata
import importlib.util
import traceback
import nodes
for entry_point in importlib.metadata.entry_points(group='comfyui_legacy.custom_nodes'):
try:
spec = importlib.util.find_spec(entry_point.module)
nodes.load_custom_node(spec.submodule_search_locations[0])
except Exception as e:
print(f'ComfyScript: Failed to load legacy custom nodes from {entry_point}: {e}')
traceback.print_exc()
if success:
print('\033[34mComfyScript: \033[92mLoaded\033[0m')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/piaoddang/ComfyScript.git
git@gitee.com:piaoddang/ComfyScript.git
piaoddang
ComfyScript
ComfyScript
main

搜索帮助