ComfyUI Node

VNCCS RMBG2

Four background-removal models behind one dropdown

By AHEKOT·Created 10 months ago·Updated 20 days ago· 1,446
VNCCS RMBG2
  • image
  • IMAGE
  • MASK
  • MASK_IMAGE
model
sensitivity1.00
process_res1024
mask_blur0
mask_offset0
invert_outputfalse
refine_foregroundfalse
backgroundAlpha

This is VNCCS's answer to the other half of the transparency problem. VNCCS Chroma Key handles the case where you control the background - a flat color you can key out cleanly. RMBG2 is for everything else: AI segmentation that finds the subject regardless of what's behind it, which matters if you're bringing in a reference image you didn't generate against a clean backdrop, or cloning a character from an arbitrary source photo the way VNCCS's Character Cloner workflow supports.

Rather than committing to one segmentation model, this node bundles four of the field's actual current contenders behind a single model dropdown: RMBG-2.0, INSPYRENET, BEN, BEN2. That's a deliberate hedge, and a reasonable one - the background-removal writeup covers this at length, but the short version is that nobody has actually won this fight. BiRefNet and InSPyReNet trade wins on different hard cases (hair, fur, semi-transparency) depending on the specific image, and an arena built specifically to rank them never produced a community-accepted verdict. RMBG-2.0 is broadly the safe general-purpose default; InSPyReNet still wins specific comparisons often enough that it's worth trying on your hardest sprites before you commit to one model pack-wide.

The inputs that matter

  • model - pick your segmentation backend. If you're not sure, start with RMBG-2.0 and try INSPYRENET on whichever sprite gives you the worst edges.
  • sensitivity (default 1, 0–1) - how aggressively the model commits to foreground versus background at the mask boundary.
  • process_res (default 1024, 256–2048) - the resolution the model actually runs segmentation at. This one's worth understanding rather than leaving on default: feeding a high-resolution character sprite through a model running at a lower process_res downscales internally before segmenting, which throws away exactly the fine edge detail - flyaway hair, thin fabric - that you're relying on the model to get right. Push this up for detailed sprites, at the cost of speed.
  • mask_blur (0–64) and mask_offset (−64–64) - post-processing on the mask itself: blur softens hard mask edges, offset shrinks (negative) or grows (positive) the mask boundary, useful for pulling a mask in slightly to kill background-color fringing along the edge.
  • refine_foreground - an extra pass to clean up the foreground result, at additional cost.
  • background (default Alpha, or Green/Blue/White) - what replaces the removed background. Leave it on Alpha for a genuinely transparent sprite; the solid-color options exist for previewing against a known backdrop or feeding into a workflow that expects an opaque image.

Three outputs: IMAGE (the composited result), MASK (the alpha mask on its own, ready to wire into other masking nodes - unlike VNCCS Mask Extractor, this is a genuine MASK type), and MASK_IMAGE, a visual grayscale render of that same mask for quick inspection without a separate preview node.

How to install it

Bundled with the main pack:

  • ComfyUI Manager - search VNCCS - Visual Novel Character Creation Suite, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/AHEKOT/ComfyUI_VNCCS.git, then cd ComfyUI_VNCCS_Utils && pip install -r requirements.txt, restart, and click "Install missing custom nodes" in Comfy Manager once - the underlying segmentation models pull in real dependency weight, and VNCCS's author has pointed people at ComfyUI-RMBG and similar packs specifically when custom-node install issues came up for VNCCS users.

Common issues

Hair or fine edges get a hard, cut-out look regardless of which model you pick. This is the genuinely unsolved case across the whole segmentation field, not specific to VNCCS - no model here does true alpha matting for semi-transparent detail. Try INSPYRENET, raise process_res, and if it's still not clean enough, VNCCS Chroma Key with use_sam3_recovery_mask on tends to do better on hair specifically when your source has a controllable backdrop.

A 4K reference image still comes out with soft, low-detail edges. Check process_res - the default 1024 downscales larger inputs internally before segmenting, and that's the most common self-inflicted cause of disappointing edges on high-resolution sources.

Fringing where the old background color still clings to the subject's outline. Nudge mask_offset negative to pull the mask boundary in slightly, and try a small amount of mask_blur to soften the transition rather than leaving a hard cut line.

CategoryVNCCS

Inputs (9)

NameTypeDefaultDescription
imageIMAGEInput image to be processed for background removal.
modelCOMBOSelect the background removal model to use.
sensitivityoptFLOAT1.000–1
process_resoptINT1024256–2048
mask_bluroptINT00–64
mask_offsetoptINT0-64–64
invert_outputoptBOOLEANfalse
refine_foregroundoptBOOLEANfalse
backgroundoptCOMBOAlpha4 options: Alpha, Green, Blue, White

Outputs (3)

NameTypeDescription
IMAGEIMAGE
MASKMASK
MASK_IMAGEIMAGE