代码拉取完成,页面将自动刷新
__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')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。