Nodes/ComfyUI-Image-Tools/ImageBgRemoveProcessor
ComfyUI Node

ImageBgRemoveProcessor

One-click background removal in your graph — but you get white, not transparency

By knuknX·Created 3 years ago·Updated 2 years ago· 3
ImageBgRemoveProcessor
  • image
  • IMAGE

Background removal is the most commoditized operation in the whole ecosystem - rembg has been the standard CLI/library tool since 2020 - and ImageBgRemoveProcessor wraps it as one ComfyUI node. Feed it an image, get the background stripped out. That's the entire appeal: no separate tool, no leaving the graph.

It's one of the eight utilities in ComfyUI-Image-Tools, and the only genuinely heavy one in the pack - it's the node that drags in a real segmentation model. The others are IO and math; this one is inference.

How it works

Each image in the batch is passed to rembg's remove(), which runs the default u2net salient-object model and returns an RGBA cutout. Then comes the part you need to know: the node slices off the alpha channel ([:, :, :3]) and the background is filled with solid white (bgcolor=(255, 255, 255, 255)).

Read that again, because it's the whole gotcha. You do not get a transparent PNG out of this. You get an RGB image with a white background where the subject isn't. If you were planning to composite the subject over a new scene, the white will be right there in the middle of your composite - this node is for "subject on a clean white field" output (think product shots), not for "extract a cutout layer."

Inputs and outputs

  • image (IMAGE) - the only input. Single image or batch; each frame gets processed independently.
  • Output: IMAGE - same size batch, background removed to white.

Install and first-run note

It ships in a pack, so install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/knuknX/ComfyUI-Image-Tools

Restart ComfyUI, or install Image Tools via ComfyUI Manager. This is the one node in the pack whose dependency list matters: requirements.txt includes rembg, which pulls in onnxruntime. The first time you run the node it also downloads the u2net model (~170MB) to a local cache - so first run needs internet and a minute of patience, and it happens silently. If the download is interrupted, rerun it.

Where people get burned

  • White, not transparent. Already covered, but it's the thing most people discover the hard way. If you genuinely need an alpha cutout, ComfyUI's core BiRefNet support (or an InSPyReNet node) gives you real transparency and better edges anyway.
  • u2net is the quality floor, not the ceiling. It's fast and runs on CPU, and it's fine on a solid subject against a simple background. Hair, fur, transparent material, thin structures - that's where it visibly falls apart, and it's been true since 2020. The background-removal knowledge base in this ecosystem is blunt about it: for fine edges, BiRefNet (which rembg itself can now wrap) or InSPyReNet will beat u2net on most hard images. Reach for this node for speed and simplicity, not for edge quality.
  • No knobs. The background color is hardcoded to white and you can't switch the segmentation model. It's a one-button node; anything more sophisticated belongs elsewhere.
  • Batch cost. Every frame in a batch runs the model separately, so a 50-image batch is 50 inference passes. u2net is cheap, but a slow CPU will notice.

Honest verdict: it's the quick-and-dirty option, and it knows it. For a fast white-background cutout on a cooperative image, it's perfect. For production-grade extraction, the ecosystem has moved well past this node - and past the model it wraps.

CategoryTools

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE