Nodes/GFrbmg2/🐡 GF Remove Background 2.0
ComfyUI Node

🐡 GF Remove Background 2.0

Background removal that downloads its own model β€” and the license you should read first

By gorillaframeaiΒ·Created 2 years agoΒ·Updated about a year agoΒ· 40
🐡 GF Remove Background 2.0
  • image
  • image_rgba
  • image
  • mask_rgb
  • mask
β—„invert_maskfalseβ–Ί
β—„chroma_key_colorBlackβ–Ί
β—„postprocess_strength0.0β–Ί
β—„edge_enhancement0.0β–Ί
β—„blur_edges0.0β–Ί
β—„expand_mask0.0β–Ί

GFrbmg2 ("🐡 GF Remove Background 2.0") is the laziest kind of background-removal node: you drop an image in, you get a cutout out, and you never hunt down a model file. The first time it runs, it quietly downloads BRIA's RMBG-2.0 weights (~1.5 GB) into ComfyUI/models/RMBG/RMBG-2.0 and wires itself up. No git lfs pull, no dragging a safetensors into the right subfolder. It's a thin wrapper around that segmentation model, with a solid-color compositing twist and a few edge-fix knobs on top.

Background removal is the most commoditized operation in this whole ecosystem, and it's worth placing RMBG-2.0 honestly: it's fast and clean on a solid subject against a busy background - product shots, characters, batch work - but it is not the hair-and-fur champion. That crown sits with BiRefNet, which ComfyUI has shipped natively in core since May 2026 (MIT, no strings attached). So the real reason to reach for this node is convenience plus the chroma-key compositing, not "the best model."

What it actually runs

The node loads RMBG-2.0 through the Hugging Face transformers pipeline with trust_remote_code=True. Inside, it resizes your image to a fixed 1024Γ—1024 - the model's training resolution - runs inference, then stretches the predicted mask back up to your original dimensions with bilinear interpolation. It loops over every image in the batch, so batches are fine.

The inputs that matter

A beginner sets three things:

  • image - your IMAGE tensor; a whole batch works.
  • invert_mask - flips the cutout. Off keeps the subject, on keeps everything except the subject.
  • chroma_key_color - Black, White, Green, Red, Blue, or Gray. This colors the second output's background, so Green gives you a built-in greenscreen and Black gives a preview-friendly dark backdrop.

The other four - postprocess_strength, edge_enhancement, blur_edges, expand_mask - are edge cleanup, and they all default to 0 (off). expand_mask erodes or dilates the mask, edge_enhancement pushes Canny-detected edges back into it, blur_edges softens them, and postprocess_strength runs a median blur plus a close/open morph. You only need these if the raw mask is eating flyaway hair or leaving a fringe, and then mostly a small expand_mask and a touch of blur_edges.

The outputs

  • image_rgba (IMAGE) - the cutout with a real alpha channel. Save it as PNG or feed it to any compositing node.
  • image (IMAGE) - the subject composited onto your chosen chroma_key_color. Handy when the rest of your graph silently drops alpha.
  • mask_rgb (IMAGE) - the mask as an RGB picture, for eyeballing.
  • mask (MASK) - the actual mask tensor, for inpainting, IC-Light, or anything that takes a mask.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/gorillaframeai/GF_nodes

Restart ComfyUI and you'll find it under 🐡 GorillaFrame/Image. The pack also ships Comfy Registry metadata (publisher "GorillaFrame"), so if it shows up in Manager's registry search that works too - but the clone is the documented path. The model downloads itself on first run, so keep an internet connection handy and watch the console for the download log.

Where people get burned

Read the license before you build anything commercial on this: RMBG-2.0 is CC BY-NC 4.0 - non-commercial only. The README says it in plain terms, and it's the single biggest reason to think twice versus the MIT-licensed BiRefNet sitting in core. Second trap: the model is cached per node instance, so two GFrbmg2 nodes in one graph hold two copies of the weights in VRAM. Use one node, or use the Plus sibling, which shares a single model load. Also worth knowing: the README claims BEN2 support and draws the model path differently, but the shipped code is RMBG-2.0 only - classic README rot, the source is what actually runs. And because inference happens at 1024Γ—1024, very large inputs get their mask inferred small and stretched back up, so edges soften on 4K work.

It's a decent little utility if you want RMBG-2.0 behind a node without managing the download yourself. If hair quality is the ask, BiRefNet beats it; if you're shipping a product, the license probably settles it for you.

Category🐡 GorillaFrame/Image

Inputs (7)

NameTypeDefaultDescription
imageIMAGEβ€”
invert_maskBOOLEANfalseβ€”
chroma_key_colorCOMBOBlack6 options: Black, White, Green, Red, Blue, Gray
postprocess_strengthFLOAT0.00–20β€”
edge_enhancementFLOAT0.00–50β€”
blur_edgesFLOAT0.00–50β€”
expand_maskFLOAT0.0-50–50β€”

Outputs (4)

NameTypeDescription
image_rgbaIMAGEβ€”
imageIMAGEβ€”
mask_rgbIMAGEβ€”
maskMASKβ€”