Nodes/easy-comfy-nodes/Remove Img Background (EZ)
ComfyUI Node

Remove Img Background (EZ)

Background removal in one click, with rembg doing the heavy lifting

By wmatson·Created 3 years ago·Updated about a year ago· 18
Remove Img Background (EZ)
  • image
  • image
  • imageWithAlpha

Remove Img Background (EZ) is the lazy person's background remover. Feed it an image, get two versions back: one with the background gone and flattened onto black, and one that keeps the transparency as an alpha channel. No extra models to download by hand, no workflow archaeology - the node handles the whole thing.

Why you'd reach for it

You generated (or loaded) an image and now want a clean cutout - for a product shot, a sticker, compositing onto a new background, or feeding an img2img pass where you only want the subject. This is a one-node solution for that. It's the ComfyUI equivalent of dropping a photo on an online bg-remover, except it stays inside your graph and costs nothing.

How it works

The node wraps rembg, the classic Python background-segmentation library, using its default u2net model. Under the hood: your IMAGE tensor becomes a PIL image, rembg.remove() produces a cutout with alpha, and the node returns both a flattened RGB version and the RGBA version. Two things worth knowing:

  • On first run rembg downloads its u2net weights (roughly 175 MB) into ~/.u2net. Nothing for you to fetch - just be ready for a longer first execution and a big hidden folder on your disk.
  • The flattened image output is RGB with the background replaced by black, which is handy for quick previews. The imageWithAlpha output is the one you actually want for compositing - it carries the RGBA data.

The inputs and outputs

  • image (IMAGE) - what you want cut out.
  • image (IMAGE, output) - flattened RGB cutout, background swapped for black.
  • imageWithAlpha (IMAGE, output) - the same subject with a real alpha channel.

Installing it

Via ComfyUI Manager (search easy-comfy-nodes) or:

cd ComfyUI/custom_nodes
git clone https://github.com/wmatson/easy-comfy-nodes
# restart ComfyUI

This is the one node in the pack with a real model dependency - rembg is in the pack's requirements and pulls its weights at runtime.

Where people get burned

  • Edge quality is 2020-era. u2net is rembg's historical default, and it shows on hair, fur, glasses and anything semi-transparent. If you need a clean silhouette of a human with flyaway hair, this is not the node - the community's default recommendation now is BiRefNet, which ComfyUI has shipped natively since mid-2026 with far better edge handling. This node is for the easy stuff.
  • Only the first frame is processed. The code grabs image[0], so if you feed it a batch, the rest is silently ignored. Feed it single images.
  • No model choice. You get u2net, period. rembg can wrap better models, but this node doesn't expose that knob.
  • It's marked as an output node, so it sits at the end of the graph by design - that's fine for a finishing step like this.
Categoryimage

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (2)

NameTypeDescription
imageIMAGE
imageWithAlphaIMAGE