mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-12 07:10:52 +08:00
Add InputZip, InputUnzip
This commit is contained in:
parent
173bdd280b
commit
dce406d851
@ -53,7 +53,42 @@ class LoopCounterCondition:
|
||||
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 = {
|
||||
"LoopControl": LoopControl,
|
||||
"LoopCounterCondition": LoopCounterCondition,
|
||||
"InputZip": InputZip,
|
||||
"InputUnzip": InputUnzip,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user