diff --git a/comfy_extras/nodes_toolkit.py b/comfy_extras/nodes_toolkit.py index 07d235fa6..71faf7226 100644 --- a/comfy_extras/nodes_toolkit.py +++ b/comfy_extras/nodes_toolkit.py @@ -1,24 +1,23 @@ from __future__ import annotations from typing_extensions import override from comfy_api.latest import ComfyExtension, io -from comfy_api.latest import _io -class ConvertToList(io.ComfyNode): +class CreateList(io.ComfyNode): @classmethod def define_schema(cls): template_matchtype = io.MatchType.Template("type") - template_autogrow = _io.Autogrow.TemplatePrefix( + template_autogrow = io.Autogrow.TemplatePrefix( input=io.MatchType.Input("input", template=template_matchtype), prefix="input", ) return io.Schema( - node_id="ConvertToList", - display_name="Convert to List", + node_id="CreateList", + display_name="Create List", category="logic", is_input_list=True, search_aliases=["Image Iterator", "Text Iterator", "Iterator"], - inputs=[_io.Autogrow.Input("inputs", template=template_autogrow)], + inputs=[io.Autogrow.Input("inputs", template=template_autogrow)], outputs=[ io.MatchType.Output( template=template_matchtype, @@ -29,7 +28,7 @@ class ConvertToList(io.ComfyNode): ) @classmethod - def execute(cls, inputs: _io.Autogrow.Type) -> io.NodeOutput: + def execute(cls, inputs: io.Autogrow.Type) -> io.NodeOutput: output_list = [] for input in inputs.values(): output_list += input @@ -40,7 +39,7 @@ class ToolkitExtension(ComfyExtension): @override async def get_node_list(self) -> list[type[io.ComfyNode]]: return [ - ConvertToList, + CreateList, ]