diff --git a/README.md b/README.md index 084cc3f..ac65a87 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ Tips: base64格式字符串比较长,会导致界面卡顿,接口请求带 | × | FilterSortDependSubGraphs | 使前置依赖子图按指定顺序执行(且只执行配置的前置依赖),如:配置filter_sort为1,4,3 表示按 depend_1 => depend_4 => depend_3 依次执行, 而depend_2不会被执行。 | | × | SortDependSubGraphs | 使前置依赖子图按指定顺序执行(未配置的依赖输入项在指定项后按默认顺序执行),如:配置sort为1,4 表示先按 depend_1 => depend_4 依次执行, 然后depend_3和depend_2按默认顺序执行。 | | × | NoneNode | 返回None | +| × | NodeListToList | 将节点列表类型输入转为普通列表 | ### 示例 ![save api extended](docs/example_note.png) @@ -104,6 +105,8 @@ Tips: base64格式字符串比较长,会导致界面卡顿,接口请求带 ![批量裁剪打标](example/example_image_crop_tag.png) ## 更新记录 +### 2025-06-30 (v1.1.6) +- 新增节点:NodeListToList ### 2025-05-15 (v1.1.5) - Fix: FilterSortDependSubGraphs和SortDependSubGraphs前置节点运行异常后,再次提交任务,前置节点没有被执行 ### 2025-05-12 (v1.1.4) diff --git a/easyapi/UtilNode.py b/easyapi/UtilNode.py index c7a9d20..0981b14 100644 --- a/easyapi/UtilNode.py +++ b/easyapi/UtilNode.py @@ -1179,6 +1179,26 @@ class SortDependSubGraphs: return [i for i in kwargs.keys() if kwargs.get(i, None) is None] +class NodeListToList: + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "lst": (any_type, {"forceInput": True}) + }, + } + + INPUT_IS_LIST = True + RETURN_NAMES = ("lst",) + RETURN_TYPES = (any_type,) + FUNCTION = "execute" + CATEGORY = "EasyApi/Utils" + DESCRIPTION = "将节点列表类型输入转为普通列表" + + def execute(self, list): + return (list,) + + NODE_CLASS_MAPPINGS = { "GetImageBatchSize": GetImageBatchSize, "JoinList": JoinList, @@ -1219,6 +1239,7 @@ NODE_CLASS_MAPPINGS = { "IfElseForEmptyObject": IfElseForEmptyObject, "FilterSortDependSubGraphs": FilterSortDependSubGraphs, "SortDependSubGraphs": SortDependSubGraphs, + "NodeListToList": NodeListToList, } # A dictionary that contains the friendly/humanly readable titles for the nodes @@ -1262,4 +1283,5 @@ NODE_DISPLAY_NAME_MAPPINGS = { "IfElseForEmptyObject": "If Else For Empty Object", "FilterSortDependSubGraphs": "Filter And Sort Depend SubGraphs", "SortDependSubGraphs": "Sort Depend SubGraphs", + "NodeListToList": "NodeListToList", } diff --git a/pyproject.toml b/pyproject.toml index 1969fa3..5befc55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-easyapi-nodes" description = "Provides some features and nodes related to API calls. 开发独立应用调用ComfyUI服务的一些补充节点。" -version = "1.1.5" +version = "1.1.6" license = { file = "LICENSE" } dependencies = ["segment_anything", "simple_lama_inpainting", "insightface", "simplejson", "pycocotools"]