commit AnyRerouter node

This commit is contained in:
chflame163
2024-12-15 18:16:27 +08:00
parent fe5b659f10
commit fc764f2834
5 changed files with 48 additions and 1 deletions
+7
View File
@@ -147,6 +147,7 @@ When this error has occurred, please check the network environment.
<font size="4">**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. </font><br />
* 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.
### <a id="table1">AnyRerouter</a>
![image](image/any_rerouter_node.jpg)
Used for rerouter any type of data, this node allows for any type of input.
### <a id="table1">ImageHub</a>
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.
### <a id="table1">TextBox</a>
![image](image/text_box_node.jpg)
+5
View File
@@ -128,6 +128,7 @@ os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
## 更新说明
<font size="4">**如果本插件更新后出现依赖包错误,请双击运行插件目录下的```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: 图像的原始大小数据,用于后续节点进行恢复。
### <a id="table1">AnyRerouter</a>
![image](image/any_rerouter_node.jpg)
用于将任意类型数据中转转发,这个节点允许任意类型的输入。
### <a id="table1">ImageHub</a>
从多路输入图片和遮罩中切换其中一组输出,支持9组输入。所有的输入项都是可选项。如果一组输入中只有image或者只有mask, 缺失项将输出为None。
![image](image/image_hub_example.jpg)
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

+35
View File
@@ -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"
}
+1 -1
View File
@@ -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"]