ComfyUI Node
Remove background (full)
Removes or replaces the background from the input image. Gives more options and also generates masks and other stuff.
Remove background (full)
- model
- images
- depths
- background
- images
- masks
- depths
- edges
◄width1024►
◄height1024►
◄upscale_methodbicubic►
◄blur_size90►
◄blur_size_two6►
◄fill_colorfalse►
◄color#000000►
◄mask_threshold0.000►
◄batch_size1►
◄out_dtypeAUTO►
CategoryRemBG_SET/Advanced
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | SET_REMBG | The remove background model from `Load RemBG model by file` or any of the `Load XXXXXX model by name` nodes | |
| images | IMAGE | One or more images to process, will be scaled to a size that is good for the model. | |
| width | INT | 10240–16384 | The width of the pre-processing image, does not affect the final output image size |
| height | INT | 10240–16384 | The height of the pre-processing image, does not affect the final output image size |
| upscale_method | COMBO | bicubic | Interpolation method for pre-processing image and post-processing mask |
| blur_size | INT | 901–255 | Diameter for the coarse gaussian blur used for the `Approximate Fast Foreground Colour Estimation` |
| blur_size_two | INT | 61–255 | Diameter for the fine gaussian blur (see `blur_size`) |
| fill_color | BOOLEAN | false | When enabled and no background is provided we fill the background using a color. |
| color | STRING | #000000 | Color for fill. Can be an hexadecimal (#RRGGBB). Can be comma separated RGB values in [0-255] or [0-1.0] range. Also `rgb(R,G,B)`, `hsv(H,S,V)` and `hsl(H,S,L) are supported. 'In addition around 140 color names are recognized |
| mask_threshold | FLOAT | 0.0000–1 | Most models generates masks that contain a value from 0 to 1, but can be any value in between. Matte models can estimate transparency using it. If you need to make the mask 0 or 1, but nothing in between, you can provide a threshold here. Values above it will become 1 and the rest 0. |
| batch_size | INT | 11–256 | How many images to process at once |
| depthsopt | MASK | For models that starts with a depth map | |
| backgroundopt | IMAGE | Image to use as background | |
| out_dtypeopt | COMBO | AUTO | Data type used for the outputs. `AUTO` means the same as the input.Using `float16` can help when processing videos. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | The images with the background removed (transparent) or replaced by the background image |
| masks | MASK | The estimated masks, where a higher value means the model estimates it belongs to the foreground with more confidence. |
| depths | MASK | The estimated depth map. Either from the `depths` input or computed. Note this applies only to PDFNet. This is the map generated by `Depth Anything V2` |
| edges | MASK | The estimated edges. This is only generated by the DiffDIS model. |