mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-01 09:10:16 +08:00
Update imports and name
This commit is contained in:
parent
3290783a7e
commit
f4eef8ed82
@ -1,24 +1,23 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
from comfy_api.latest import ComfyExtension, io
|
from comfy_api.latest import ComfyExtension, io
|
||||||
from comfy_api.latest import _io
|
|
||||||
|
|
||||||
|
|
||||||
class ConvertToList(io.ComfyNode):
|
class CreateList(io.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
def define_schema(cls):
|
def define_schema(cls):
|
||||||
template_matchtype = io.MatchType.Template("type")
|
template_matchtype = io.MatchType.Template("type")
|
||||||
template_autogrow = _io.Autogrow.TemplatePrefix(
|
template_autogrow = io.Autogrow.TemplatePrefix(
|
||||||
input=io.MatchType.Input("input", template=template_matchtype),
|
input=io.MatchType.Input("input", template=template_matchtype),
|
||||||
prefix="input",
|
prefix="input",
|
||||||
)
|
)
|
||||||
return io.Schema(
|
return io.Schema(
|
||||||
node_id="ConvertToList",
|
node_id="CreateList",
|
||||||
display_name="Convert to List",
|
display_name="Create List",
|
||||||
category="logic",
|
category="logic",
|
||||||
is_input_list=True,
|
is_input_list=True,
|
||||||
search_aliases=["Image Iterator", "Text Iterator", "Iterator"],
|
search_aliases=["Image Iterator", "Text Iterator", "Iterator"],
|
||||||
inputs=[_io.Autogrow.Input("inputs", template=template_autogrow)],
|
inputs=[io.Autogrow.Input("inputs", template=template_autogrow)],
|
||||||
outputs=[
|
outputs=[
|
||||||
io.MatchType.Output(
|
io.MatchType.Output(
|
||||||
template=template_matchtype,
|
template=template_matchtype,
|
||||||
@ -29,7 +28,7 @@ class ConvertToList(io.ComfyNode):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, inputs: _io.Autogrow.Type) -> io.NodeOutput:
|
def execute(cls, inputs: io.Autogrow.Type) -> io.NodeOutput:
|
||||||
output_list = []
|
output_list = []
|
||||||
for input in inputs.values():
|
for input in inputs.values():
|
||||||
output_list += input
|
output_list += input
|
||||||
@ -40,7 +39,7 @@ class ToolkitExtension(ComfyExtension):
|
|||||||
@override
|
@override
|
||||||
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
||||||
return [
|
return [
|
||||||
ConvertToList,
|
CreateList,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user