VNCCS RMBG2
Four background-removal models behind one dropdown
- image
- IMAGE
- MASK
- MASK_IMAGE
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 withRMBG-2.0and tryINSPYRENETon 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 lowerprocess_resdownscales 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) andmask_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(defaultAlpha, orGreen/Blue/White) - what replaces the removed background. Leave it onAlphafor 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, thencd 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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to be processed for background removal. | |
| model | COMBO | Select the background removal model to use. | |
| sensitivityopt | FLOAT | 1.000–1 | — |
| process_resopt | INT | 1024256–2048 | — |
| mask_bluropt | INT | 00–64 | — |
| mask_offsetopt | INT | 0-64–64 | — |
| invert_outputopt | BOOLEAN | false | — |
| refine_foregroundopt | BOOLEAN | false | — |
| backgroundopt | COMBO | Alpha | 4 options: Alpha, Green, Blue, White |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| MASK_IMAGE | IMAGE | — |