passthrough fix

This commit is contained in:
kijai 2024-08-08 21:04:00 +03:00
parent 0bc25cfe55
commit 855aef479f
2 changed files with 12 additions and 6 deletions

View File

@ -28,7 +28,9 @@ class ImagePass:
@classmethod @classmethod
def INPUT_TYPES(s): def INPUT_TYPES(s):
return { return {
"required": { "required": {
},
"optional": {
"image": ("IMAGE",), "image": ("IMAGE",),
}, },
} }
@ -39,7 +41,7 @@ class ImagePass:
Passes the image through without modifying it. Passes the image through without modifying it.
""" """
def passthrough(self, image): def passthrough(self, image=None):
return image, return image,
class ColorMatch: class ColorMatch:

View File

@ -261,6 +261,8 @@ class CondPassThrough:
def INPUT_TYPES(s): def INPUT_TYPES(s):
return { return {
"required": { "required": {
},
"optional": {
"positive": ("CONDITIONING", ), "positive": ("CONDITIONING", ),
"negative": ("CONDITIONING", ), "negative": ("CONDITIONING", ),
}, },
@ -275,14 +277,16 @@ class CondPassThrough:
workaround for Set node not allowing bypassed inputs. workaround for Set node not allowing bypassed inputs.
""" """
def passthrough(self, positive, negative): def passthrough(self, positive=None, negative=None):
return (positive, negative,) return (positive, negative,)
class ModelPassThrough: class ModelPassThrough:
@classmethod @classmethod
def INPUT_TYPES(s): def INPUT_TYPES(s):
return { return {
"required": { "required": {
},
"optional": {
"model": ("MODEL", ), "model": ("MODEL", ),
}, },
} }
@ -296,8 +300,8 @@ class ModelPassThrough:
workaround for Set node not allowing bypassed inputs. workaround for Set node not allowing bypassed inputs.
""" """
def passthrough(self, model): def passthrough(self, model=None):
return (model,) return (model,)
def append_helper(t, mask, c, set_area_to_bounds, strength): def append_helper(t, mask, c, set_area_to_bounds, strength):
n = [t[0], t[1].copy()] n = [t[0], t[1].copy()]