Use IterateList to express that a common list ancestor should not be run combinatorially many times

This commit is contained in:
doctorpangloss 2025-02-24 08:57:25 -08:00
parent fb4ea2dc6d
commit 51bb02e96b

View File

@ -1,5 +1,7 @@
import typing
from decimal import Decimal
from comfy.comfy_types import IO
from comfy.node_helpers import export_custom_nodes
from comfy.nodes.package_typing import CustomNode, InputTypes
@ -121,4 +123,21 @@ class StringSplit(CustomNode):
return value.split(delimiter),
class IterateList(CustomNode):
@classmethod
def INPUT_TYPES(cls) -> InputTypes:
return {
"required": {
"value": (IO.ANY, {})
}
}
CATEGORY = "generators"
RETURN_TYPES = IO.ANY,
FUNCTION = "execute"
def execute(self, value: typing.Any) -> tuple[typing.Any]:
return value,
export_custom_nodes()