ComfyUI Node

VNCCS Chroma Key Experimental

The sandbox version, minus SAM3 recovery

By AHEKOT·Created 11 months ago·Updated 25 days ago· 1,446
VNCCS Chroma Key Experimental
  • image
  • image
  • matte
  • edge_debug
tolerance0.20
softness0.16
despill_strength0.50
edge_width3
matte_cleanup0.20
foreground_recover0.35
edge_decontaminate0.70
edge_choke0.20
matte_methodguided_edge
screen_modeauto
output_modestraight_rgba

Same node, one field missing, different category. Compare the schema against the regular VNCCS Chroma Key and the only difference is use_sam3_recovery_mask - the toggle that runs Meta's Segment Anything 3 over the keyed result to recover fine foreground detail - isn't here. Everything else, down to the default values, is identical.

That's a strong signal about what this node actually is: the testbed AHEKOT works in before a chroma-key change graduates into the stable node everyone's workflows depend on. When he was asked on Reddit how VNCCS gets its transparent sprites, he said plainly that it's his own chromakey node "with SAM3 restoration" - the production answer. The Experimental variant, living in its own VNCCS/Experimental category rather than the main VNCCS one, is what came before that feature landed, kept around either for comparison or because a new round of tuning is in progress on it.

The inputs that matter

Everything from the stable node, minus the SAM3 toggle:

  • tolerance (0.2) and softness (0.16) - how strictly a pixel has to match the detected backdrop color to count as background, and how soft the transition is at the edge.
  • screen_mode (default auto) - auto-detects green, blue or red from the image's border pixels; force it manually if your character's colors are close to the actual backdrop.
  • despill_strength (0.5) and edge_decontaminate (0.7) - cleaning up background color that's bled onto edge pixels, particularly hair.
  • matte_method (default guided_edge) - chroma_soft for a plain color-distance alpha, guided_edge for edge-refined (the default, and the better one), pymatting_if_available to hand off to the pymatting library if it's installed.
  • output_mode (default straight_rgba) - straight alpha versus premultiplied; match this to whatever reads the PNG downstream.

Outputs match the stable node too: image, matte as a MASK, and an edge_debug image for checking the cleanup by eye.

What it's for, practically

Use this node when you're deliberately comparing edge quality against the stable Chroma Key node on a hard case - busy hair, a costume close to your backdrop color - since without SAM3 recovery it shows you exactly what the pure chroma math gets wrong on its own, which is a useful diagnostic even if you never ship with it. For real production work on a live character batch, reach for VNCCS Chroma Key instead; it has strictly more capability and no fewer inputs.

Background removal in general is still an unsettled problem across every tool in the ecosystem - see the background-removal writeup for why hair, fur and semi-transparency remain the hard cases nobody's fully solved - so having two variants to A/B on your own toughest images, rather than trusting either blindly, is the right instinct.

How to install it

It's bundled with the main pack, nothing separate to fetch:

  • 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 let Comfy Manager install missing dependencies once.

Common issues

You're not sure which chroma key node your workflow is actually using. Check the category in the node picker - VNCCS/Experimental versus plain VNCCS. Older or hand-edited workflows sometimes still reference this one out of habit; if SAM3 recovery would help your hardest sprites, switch the node, not just the settings.

Results look worse than you remember from the stable node on the same character. That's expected if your subject has fine hair or a costume close to the backdrop - those are exactly the cases SAM3 recovery exists to fix, and this variant doesn't have it.

CategoryVNCCS/Experimental

Inputs (12)

NameTypeDefaultDescription
imageIMAGE
toleranceFLOAT0.200–1
softnessFLOAT0.160.001–1
despill_strengthFLOAT0.500–1
edge_widthINT30–32
matte_cleanupFLOAT0.200–1
foreground_recoverFLOAT0.350–1
edge_decontaminateFLOAT0.700–1
edge_chokeFLOAT0.200–1
matte_methodCOMBOguided_edge3 options: chroma_soft, guided_edge, pymatting_if_available
screen_modeCOMBOauto4 options: auto, green, blue, red
output_modeCOMBOstraight_rgba2 options: straight_rgba, premultiplied_rgba

Outputs (3)

NameTypeDescription
imageIMAGE
matteMASK
edge_debugIMAGE