mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 20:30:25 +08:00
Add InputZip, InputUnzip
This commit is contained in:
parent
173bdd280b
commit
dce406d851
@ -53,7 +53,42 @@ class LoopCounterCondition:
|
|||||||
return (CounterCondition(count), )
|
return (CounterCondition(count), )
|
||||||
|
|
||||||
|
|
||||||
|
# To facilitate the use of multiple inputs as loopback inputs, InputZip and InputUnzip are provided.
|
||||||
|
class InputZip:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {"required": {
|
||||||
|
"input1": ("*", ),
|
||||||
|
"input2": ("*", ),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = ("*", )
|
||||||
|
FUNCTION = "doit"
|
||||||
|
|
||||||
|
def doit(s, input1, input2):
|
||||||
|
return ((input1, input2), )
|
||||||
|
|
||||||
|
|
||||||
|
class InputUnzip:
|
||||||
|
@classmethod
|
||||||
|
def INPUT_TYPES(s):
|
||||||
|
return {"required": {
|
||||||
|
"zipped_input": ("*", ),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
RETURN_TYPES = ("*", "*", )
|
||||||
|
FUNCTION = "doit"
|
||||||
|
|
||||||
|
def doit(s, zipped_input):
|
||||||
|
input1, input2 = zipped_input
|
||||||
|
return (input1, input2, )
|
||||||
|
|
||||||
|
|
||||||
NODE_CLASS_MAPPINGS = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"LoopControl": LoopControl,
|
"LoopControl": LoopControl,
|
||||||
"LoopCounterCondition": LoopCounterCondition,
|
"LoopCounterCondition": LoopCounterCondition,
|
||||||
|
"InputZip": InputZip,
|
||||||
|
"InputUnzip": InputUnzip,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user