The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Move bg_removal_model input socket to first position for nicer display (#14353)
Alexis Rolland9fc6f5f6dd80
diff --git a/comfy_extras/nodes_bg_removal.py b/comfy_extras/nodes_bg_removal.pyindex 9dc9ad854..c7b33a821 100644--- a/comfy_extras/nodes_bg_removal.py+++ b/comfy_extras/nodes_bg_removal.py@@ -36,15 +36,15 @@ class RemoveBackground(IO.ComfyNode):category="image/background removal",description="Generates a foreground mask to remove the background from an image using a background removal model.",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=[IO.Mask.Output("mask", tooltip="Generated foreground mask")])@classmethod- def execute(cls, image, bg_removal_model):+ def execute(cls, bg_removal_model, image):mask = bg_removal_model.encode_image(image)return IO.NodeOutput(mask)