Move bg_removal_model input socket to first position for nicer display (#14353)

This commit is contained in:
Alexis Rolland 2026-06-09 23:36:56 +08:00 committed by GitHub
parent 184009c2f6
commit 9fc6f5f6dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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)