diff --git a/README.MD b/README.MD index ccdf2f9..765aed5 100644 --- a/README.MD +++ b/README.MD @@ -147,6 +147,7 @@ When this error has occurred, please check the network environment. **If the dependency package error after updating, please double clicking ```repair_dependency.bat``` (for Official ComfyUI Protable) or ```repair_dependency_aki.bat``` (for ComfyUI-aki-v1.x) in the plugin folder to reinstall the dependency packages.
+* Commit [AnyRerouter](#AnyRerouter) node, Used for reroute any type of data. * Commit [ICMask](#ICMask) and [ICMaskCropBack](#ICMaskCropBack) nodes, Used for generating In-Context image and mask, and automatic crop back. The code is from [lrzjason/Comfyui-In-Context-Lora-Utils](https://github.com/lrzjason/Comfyui-In-Context-Lora-Utils) , Thanks to the original author @小志Jason. * Commit [GetMainColorsV2](#GetMainColorsV2) node, add sorting by color area and output color values and proportions in the preview image. This part of the code was improved by @ HL, thanks. * Optimize dependency packages. Optimize some algorithms. @@ -1408,6 +1409,11 @@ Output: * height: The height of image. * original_size: The original size data of the image is used for subsequent node recovery. +### AnyRerouter +![image](image/any_rerouter_node.jpg) +Used for rerouter any type of data, this node allows for any type of input. + + ### ImageHub Switch output from multiple input images and masks, supporting 9 sets of inputs. All input items are optional. if there is only image or mask in a set of input, the missing item will be output as None. @@ -1449,6 +1455,7 @@ Used to provide assistance for workflow debugging. When running, the properties This node allows any type of input. + ### TextBox ![image](image/text_box_node.jpg) diff --git a/README_CN.MD b/README_CN.MD index 4234ca9..940c8ec 100644 --- a/README_CN.MD +++ b/README_CN.MD @@ -128,6 +128,7 @@ os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' ## 更新说明 **如果本插件更新后出现依赖包错误,请双击运行插件目录下的```install_requirements.bat```(官方便携包),或 ```install_requirements_aki.bat```(秋叶整合包) 重新安装依赖包。 +* 添加 [AnyRerouter](#AnyRerouter) 节点,用于将任意类型数据中转转发。 * 添加 [ICMask](#ICMask) 和 [ICMaskCropBack](#ICMaskCropBack) 节点,用于生成一致性上下文图片和遮罩,以及自动回裁。代码来自[lrzjason/Comfyui-In-Context-Lora-Utils](https://github.com/lrzjason/Comfyui-In-Context-Lora-Utils) 感谢原作者@小志Jason * 添加 [GetMainColorsV2](#GetMainColorsV2) 节点,增加按颜色面积排序,并在预览图中输出色值和比例。这部分代码由@HL完善,感谢。 * 优化依赖包。优化部分图形算法。 @@ -1251,6 +1252,10 @@ GradientImage的V2升级版。 * height: 图像高度。 * original_size: 图像的原始大小数据,用于后续节点进行恢复。 +### AnyRerouter +![image](image/any_rerouter_node.jpg) +用于将任意类型数据中转转发,这个节点允许任意类型的输入。 + ### ImageHub 从多路输入图片和遮罩中切换其中一组输出,支持9组输入。所有的输入项都是可选项。如果一组输入中只有image或者只有mask, 缺失项将输出为None。 ![image](image/image_hub_example.jpg) diff --git a/image/any_rerouter_node.jpg b/image/any_rerouter_node.jpg new file mode 100644 index 0000000..6e9020d Binary files /dev/null and b/image/any_rerouter_node.jpg differ diff --git a/py/any_rerouter.py b/py/any_rerouter.py new file mode 100644 index 0000000..1e80079 --- /dev/null +++ b/py/any_rerouter.py @@ -0,0 +1,35 @@ +from .imagefunc import AnyType + +anything = AnyType('*') + +class LS_AnyRerouter(): + + def __init__(self): + self.NODE_NAME = 'AnyRerouter' + + + @classmethod + def INPUT_TYPES(self): + return { + "required": { + "any": (anything, {}), + }, + "optional": { # + } + } + + RETURN_TYPES = (anything,) + RETURN_NAMES = ('any',) + FUNCTION = 'any_rerouter' + CATEGORY = '😺dzNodes/LayerUtility/Data' + + def any_rerouter(self, any,): + return (any,) + +NODE_CLASS_MAPPINGS = { + "LayerUtility: AnyRerouter": LS_AnyRerouter +} + +NODE_DISPLAY_NAME_MAPPINGS = { + "LayerUtility: AnyRerouter": "LayerUtility: Any Rerouter" +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b2c7a65..8eba27c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_layerstyle" description = "A set of nodes for ComfyUI it generate image like Adobe Photoshop's Layer Style. the Drop Shadow is first completed node, and follow-up work is in progress." -version = "2.0.8" +version = "2.0.9" license = "MIT" dependencies = ["numpy", "pillow", "torch", "matplotlib", "Scipy", "scikit_image", "scikit_learn", "opencv-contrib-python", "pymatting", "timm", "colour-science", "transformers", "blend_modes", "huggingface_hub", "loguru"]