Move bg_removal_model input socket to first position for nicer display (#14353)
This commit is contained in:
parent
184009c2f6
commit
9fc6f5f6dd
|
|
@ -36,15 +36,15 @@ class RemoveBackground(IO.ComfyNode):
|
||||||
category="image/background removal",
|
category="image/background removal",
|
||||||
description="Generates a foreground mask to remove the background from an image using a background removal model.",
|
description="Generates a foreground mask to remove the background from an image using a background removal model.",
|
||||||
inputs=[
|
inputs=[
|
||||||
IO.Image.Input("image", tooltip="Input image to remove the background from"),
|
IO.BackgroundRemoval.Input("bg_removal_model", tooltip="Background removal model used to generate the mask"),
|
||||||
IO.BackgroundRemoval.Input("bg_removal_model", tooltip="Background removal model used to generate the mask")
|
IO.Image.Input("image", tooltip="Input image to remove the background from")
|
||||||
],
|
],
|
||||||
outputs=[
|
outputs=[
|
||||||
IO.Mask.Output("mask", tooltip="Generated foreground mask")
|
IO.Mask.Output("mask", tooltip="Generated foreground mask")
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, image, bg_removal_model):
|
def execute(cls, bg_removal_model, image):
|
||||||
mask = bg_removal_model.encode_image(image)
|
mask = bg_removal_model.encode_image(image)
|
||||||
return IO.NodeOutput(mask)
|
return IO.NodeOutput(mask)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue