Files
jammyfu-ComfyUI_PaintingCod…/__init__.py
T
jammyfu 1610fce3f4 Introduce DynamicImageCombiner class and update init.py for node integration.
This commit adds the DynamicImageCombiner class, enabling dynamic addition of multiple image inputs and outputting a list of connected images. The init.py file now includes this new node in NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS. A new JavaScript file has also been created to manage the node's behavior, enhancing image processing functionality.
引入DynamicImageCombiner类并更新__init__.py以实现节点集成。
此提交添加了DynamicImageCombiner类,可以动态地添加多个图像输入,并输出所有连接图像的列表。init.py文件现在在NODE_CLASS_MAPPINGS和NODE_DISPLAY_NAME_MAPPINGS中包含了这个新节点。此外,还创建了一个新的JavaScript文件来管理该节点的行为,增强了图像处理功能。
2024-12-25 22:23:01 +08:00

55 lines
1.7 KiB
Python

# 首先导入安装模块并执行安装
from .install import setup
setup()
import os
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
# 设置 web 目录
WEB_DIRECTORY = os.path.join(os.path.dirname(os.path.realpath(__file__)), "web")
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
try:
from .image_resolution_adjuster import ImageResolutionAdjuster
from .color_picker import ColorPicker
from .remove_empty_lines import RemoveEmptyLinesAndLeadingSpaces
from .text_combiner import TextCombiner
from .multiline_text_input import MultilineTextInput
from .click_popup import ClickPopup
from .dynamic_image_input import DynamicImageCombiner
# 节点映射
NODE_CLASS_MAPPINGS = {
"ImageResolutionAdjuster": ImageResolutionAdjuster,
"ColorPicker": ColorPicker,
"RemoveEmptyLinesAndLeadingSpaces": RemoveEmptyLinesAndLeadingSpaces,
"TextCombiner": TextCombiner,
"MultilineTextInput": MultilineTextInput,
"ClickPopup": ClickPopup,
"DynamicImageCombiner": DynamicImageCombiner,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ImageResolutionAdjuster": "Image Resolution Adjuster",
"ColorPicker": "Color Picker",
"RemoveEmptyLinesAndLeadingSpaces": "Remove Empty Lines And Leading Spaces",
"TextCombiner": "Text Combiner",
"MultilineTextInput": "Multiline Text Input",
"ClickPopup": "Click Popup",
"DynamicImageCombiner": "Dynamic Image Combiner"
}
except ImportError as e:
print(f"Error importing modules: {e}")
print("Please restart ComfyUI after the installation is complete.")
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}