Nodes/GraftingRayman/GR Background Remover REMBG
ComfyUI Node

GR Background Remover REMBG

The classic rembg model lineup as a ComfyUI dropdown

By GraftingRayman·Created 2 years ago·Updated about a month ago· 76
GR Background Remover REMBG
  • image
  • output_image
rembg_modelu2net

Background removal is the most commoditized operation in this whole ecosystem, and rembg is the tool that made it a one-click thing back in 2020 by wrapping the u2net model family behind a simple API. This node exposes seven of rembg's classic model choices as a dropdown, with the README calling out two of them specifically: the general-use model for anything, and the anime-tuned model for illustration.

Worth knowing before you reach for it: rembg has quietly absorbed BiRefNet, the model that's now the community's default recommendation for anything with a tricky edge - flyaway hair, semi-transparent fabric, fine detail. This node's dropdown, though, only lists the pre-BiRefNet lineup (u2net and its variants, silueta, isnet). That's not a knock on the node - u2net is still fast, reliable, and genuinely good enough for a solid subject on a contrasting background, which covers a lot of real use cases - but if your subject has fine hair or fur and the result looks a little rough around the edges, that's the model ceiling talking, not a bug. Reach for a BiRefNet-based node elsewhere in that case.

How it works

Feed it an image, pick a rembg_model, and it runs that model's segmentation pass, returning an image with the background stripped. Under the hood this is exactly what the standalone rembg library does - this node just gives you the model picker as a ComfyUI dropdown instead of a CLI flag.

The inputs and outputs that matter

  • image - required, the only mandatory input.
  • rembg_model (optional, default u2net) - seven choices: u2net (general purpose, the historical default), u2netp (lighter/faster version of the same), u2net_human_seg (tuned for people), u2net_cloth_seg (garment segmentation), silueta (same network as u2net, much smaller file), isnet-general-use, and isnet-anime. Use the general-use model for photos, the anime model for illustration - that's the README's own guidance, and it holds.

One output: output_image - the subject with the background removed.

How to install it

Search GraftingRayman in ComfyUI Manager, or install manually:

cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman

Restart afterward. The pack-wide dependency applies: install OpenAI's CLIP separately or nothing in the pack imports. Portable ComfyUI: .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git. System Python: pip install git+https://github.com/openai/CLIP.git.

Common issues & troubleshooting

Pack fails to load entirely. Check your startup console for a CLIP import error and run the pip install above - this takes down every node in the pack, not just this one.

First run stalls or looks frozen. rembg downloads the chosen model on first use if it isn't already cached locally - expect a delay the first time you pick a given rembg_model, and don't kill the process thinking it's hung.

Hair, fur, or semi-transparent edges look rough. That's the known limit of the u2net-family models this node exposes - fine edge quality has been their weak point since 2020, and it's unfixed by design in this model family. If edge quality matters for your shot, this specific model lineup isn't the current ceiling; look for a BiRefNet-based node.

Wrong model for the content. If results look off on an anime or illustrated image, try isnet-anime specifically rather than the general-purpose models - the anime-tuned weights handle flat color and line art differently than photo-trained ones.

CategoryGraftingRayman/Images

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
rembg_modeloptCOMBOu2net7 options: u2net, u2netp, u2net_human_seg, u2net_cloth_seg, silueta, isnet-general-use, +1

Outputs (1)

NameTypeDescription
output_imageIMAGE