ComfyUI > Nodes > ComfyUI > Remove Background

ComfyUI Node: Remove Background

Class Name

RemoveBackground

Category
image/background removal
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Remove Background Description

Efficiently removes image backgrounds, isolating foreground elements for editing or creative projects.

Remove Background:

The RemoveBackground node is designed to efficiently eliminate the background from an image, leaving only the foreground elements intact. This node is particularly useful for artists and designers who need to isolate subjects from their backgrounds for further editing or creative projects. By leveraging a background removal model, the node generates a mask that distinguishes the foreground from the background, allowing for seamless integration into new environments or compositions. This process enhances the flexibility and creativity of your image editing tasks, enabling you to focus on the essential elements of your artwork without the distraction of unwanted backgrounds.

Remove Background Input Parameters:

image

The image parameter is the input image from which you want to remove the background. This parameter is crucial as it serves as the primary source material for the background removal process. The quality and resolution of the input image can significantly impact the accuracy and effectiveness of the background removal, so it is advisable to use high-quality images for optimal results.

bg_removal_model

The bg_removal_model parameter specifies the background removal model used to generate the mask. This model is responsible for analyzing the input image and distinguishing between the foreground and background elements. The choice of model can affect the precision and quality of the mask generated, so selecting an appropriate model that suits your specific needs is important for achieving the best results.

Remove Background Output Parameters:

mask

The mask output parameter is the generated foreground mask that results from the background removal process. This mask highlights the areas of the image that have been identified as the foreground, effectively separating them from the background. The mask can be used in various applications, such as compositing the foreground onto a different background or further editing the isolated elements. Understanding the mask's structure and how it represents the foreground is essential for effectively utilizing it in your creative projects.

Remove Background Usage Tips:

  • Ensure that the input image is of high quality and resolution to improve the accuracy of the background removal process.
  • Experiment with different background removal models to find the one that best suits your specific image and desired outcome.
  • Use the generated mask to seamlessly integrate the foreground into new backgrounds or compositions, enhancing your creative possibilities.

Remove Background Common Errors and Solutions:

ERROR: background model file is invalid and does not contain a valid background removal model.

  • Explanation: This error occurs when the specified background removal model file is either corrupted or not properly formatted, preventing the node from executing the background removal process.
  • Solution: Verify that the background removal model file is correctly formatted and not corrupted. Ensure that you have selected the correct model file and try reloading it. If the problem persists, consider using a different model file that is known to be valid.

Remove Background Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Remove Background