mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-10 06:10:50 +08:00
Use IterateList to express that a common list ancestor should not be run combinatorially many times
This commit is contained in:
parent
fb4ea2dc6d
commit
51bb02e96b
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user