Nodes/24oiduts-ComfyUI/🎬 Studio42 Background Remover Enhanced
ComfyUI Node

🎬 Studio42 Background Remover Enhanced

A serious background remover β€” BiRefNet, chroma keying, and spill suppression in one node

By GeekyGhostΒ·Created 12 months agoΒ·Updated 10 months agoΒ· 0
🎬 Studio42 Background Remover Enhanced
  • images
  • guidance_mask
  • depth_map
  • reference_background
  • result_rgb
  • result_rgba
  • result_mask
  • processing_info
β—„methodbirefnet-generalβ–Ί
β—„processing_resolution1024β–Ί
β—„use_gputrueβ–Ί
β—„model_precisionfp16β–Ί
β—„use_guidance_masktrueβ–Ί
β—„guidance_mask_strength0.70β–Ί
β—„use_depth_guidancetrueβ–Ί
β—„depth_threshold0.50β–Ί
β—„depth_falloff0.20β–Ί
β—„combine_depth_with_aitrueβ–Ί
β—„chroma_colorgreenβ–Ί
β—„primary_threshold0.12β–Ί
β—„secondary_threshold0.03β–Ί
β—„saturation_threshold0.40β–Ί
β—„brightness_min0.15β–Ί
β—„brightness_max0.95β–Ί
β—„multi_pass_keyingtrueβ–Ί
β—„spill_suppression0.85β–Ί
β—„spill_preserve_luminancetrueβ–Ί
β—„edge_softness1.50β–Ί
β—„core_matte_choke0.00β–Ί
β—„luma_key_modeshadows_highlightsβ–Ί
β—„shadow_threshold0.08β–Ί
β—„highlight_threshold0.92β–Ί
β—„luma_softness0.05β–Ί
β—„difference_threshold0.08β–Ί
β—„color_space_modehsvβ–Ί
β—„garbage_matte_enabledfalseβ–Ί
β—„remove_small_objectstrueβ–Ί
β—„small_object_threshold300β–Ί
β—„mask_blur0.8β–Ί

Studio42 Background Remover Enhanced is the most substantive node in this pack, and it's genuinely good. This is a real, multi-method background removal node: 21 methods spanning the BiRefNet family (state of the art for hair and fur), u2net/ISNet, plus professional chroma key, luma key, and difference key - with spill suppression, edge softness, and matte controls that Nuke and After Effects users will recognize. It ships in the 24oiduts-ComfyUI pack, but it's the rare custom node here that holds its own against the dedicated background-removal packs.

If you've been cutting out subjects with rembg's u2net and hating the hair edges, this is the upgrade path without leaving your existing graph. The KB is clear on the state of play: BiRefNet displaced u2net as the community default because the difference is visible on flyaway hair, fur, and fabric - and ComfyUI even shipped it in core in 2026. This node bundles that same model family behind one interface.

What you set

  • images - the IMAGE batch to process.
  • method - the big dropdown. Start with birefnet-general (the default) for anything with tricky edges, birefnet-portrait for people, and the chroma_key_professional / luma_key_professional entries for studio-shot footage. u2net remains the fast, tiny fallback for easy cuts.

The controls that matter most after the method:

  • processing_resolution - 256–4096. The KB's biggest practical warning: feeding a 4K image to a 1024-native model downscales internally and destroys the edges you wanted. Raise this for large inputs.
  • model_precision - fp16 (default) is the right call: ~2Γ— faster and roughly half the VRAM at no meaningful quality cost. Leave it.
  • use_gpu - on by default; AI methods want it.
  • guidance_mask - optional MASK where white = keep, black = remove, with guidance_mask_strength to blend it in.
  • depth_map - optional; brighter = closer = foreground, with depth_threshold and depth_falloff.
  • Chroma key block: chroma_color, primary_threshold (lower = more precise; 0.12 is the LED-wall default), spill_suppression (0.85 default), spill_preserve_luminance.
  • Edge/matte cleanup: edge_softness, core_matte_choke (expand/contract the matte), mask_blur, remove_small_objects.

What comes out

Four outputs: result_rgb (the cutout on transparent/black handling per the pipeline), result_rgba (RGBA with alpha), result_mask (the MASK), and processing_info (a STRING log). For compositing, wire the RGBA or mask into a layer node - this pack's Studio42 Layer Composer is the natural partner.

How it works

Models load via transformers (BiRefNet through AutoModelForImageSegmentation) with a rembg fallback, and sessions are cached globally. Model weights land in ComfyUI/models/rembg - that's the folder to check if you're wondering where the download went. Traditional methods run on CPU with minimal memory.

Installing it

Same pack:

  • ComfyUI Manager: search 24oiduts, install, restart.
  • Manual:
    cd ComfyUI/custom_nodes/
    git clone https://github.com/GeekyGhost/24oiduts-ComfyUI
    pip install -r 24oiduts-ComfyUI/requirements.txt
    then restart.

For this node the meaningful deps are transformers, timm, and rembg + onnxruntime-gpu. First use downloads the selected model. The GitHub README is a stale Studio42 template ("not recommended for use", no license) - this code is the pack's most maintained corner.

Troubleshooting

  • Hair edges look rough - check processing_resolution against your input size; that's the classic self-inflicted wound.
  • Models not loading - confirm internet for the first download, disk space (models are 100MB+), and that transformers/rembg are installed. Restart after the first download.
  • Out of memory - switch to fp16, drop processing_resolution, or use u2net for the easy cuts.

It's the node people should actually search this pack for: a competent, multi-method background remover with the best available open models on tap.

Category🎬 Studio42/Background Removal

Inputs (35)

NameTypeDefaultDescription
imagesIMAGEβ€”
methodCOMBObirefnet-generalBackground removal method. BiRefNet models are state-of-the-art and working great with FP16!
guidance_maskoptMASKβ€”
depth_mapoptIMAGEβ€”
reference_backgroundoptIMAGEβ€”
processing_resolutionoptINT1024256–4096Processing resolution. Higher = better quality but slower.
use_gpuoptBOOLEANtrueUse GPU acceleration. Highly recommended for AI methods.
model_precisionoptCOMBOfp16FP16 uses 50% less memory and is 2x faster with great quality!
use_guidance_maskoptBOOLEANtrueUse guidance mask if provided. White areas = keep, black areas = remove.
guidance_mask_strengthoptFLOAT0.700–1Strength of guidance mask influence.
use_depth_guidanceoptBOOLEANtrueUse depth map if provided. Closer objects (brighter) = foreground.
depth_thresholdoptFLOAT0.500–1Depth threshold. Objects closer than this are considered foreground.
depth_falloffoptFLOAT0.200.05–0.5Smooth transition distance around depth threshold.
combine_depth_with_aioptBOOLEANtrueCombine depth guidance with AI predictions for best results.
chroma_coloroptCOMBOgreenChroma key background color. Green is most common for LED walls.
primary_thresholdoptFLOAT0.120.01–0.5Primary color tolerance. Lower = more precise. 0.12 optimal for LED walls.
secondary_thresholdoptFLOAT0.030.01–0.3Secondary refinement for edges. Lower = cleaner edges.
saturation_thresholdoptFLOAT0.400.1–1Minimum saturation. 0.4 optimal for modern LED screens.
brightness_minoptFLOAT0.150–1Minimum brightness for chroma key detection.
brightness_maxoptFLOAT0.950–1Maximum brightness for chroma key detection.
multi_pass_keyingoptBOOLEANtrueMulti-stage processing for professional edge quality.
spill_suppressionoptFLOAT0.850–1Remove color bleeding on subject edges. 0.85 optimal for most scenarios.
spill_preserve_luminanceoptBOOLEANtruePreserve brightness during spill removal for natural results.
edge_softnessoptFLOAT1.500–10Edge blur for smooth transitions. 1.5 optimal for most images.
core_matte_chokeoptFLOAT0.00-0.5–0.5Expand (negative) or contract (positive) the matte core.
luma_key_modeoptCOMBOshadows_highlightsLuma key removal mode.
shadow_thresholdoptFLOAT0.080–0.5Shadow removal threshold. Lower = more shadows removed.
highlight_thresholdoptFLOAT0.920.5–1Highlight removal threshold. Higher = more highlights removed.
luma_softnessoptFLOAT0.050–0.5Luma key soft transition distance.
difference_thresholdoptFLOAT0.080.01–0.5Difference key sensitivity. Lower = more sensitive.
color_space_modeoptCOMBOhsvColor space for processing. HSV recommended for chroma key, LAB for quality.
garbage_matte_enabledoptBOOLEANfalseAutomatically remove obvious background areas.
remove_small_objectsoptBOOLEANtrueRemove small noise objects from mask.
small_object_thresholdoptINT30050–2000Size threshold for small object removal (pixels).
mask_bluroptFLOAT0.80–5Final mask blur for smoother edges.

Outputs (4)

NameTypeDescription
result_rgbIMAGEβ€”
result_rgbaIMAGEβ€”
result_maskMASKβ€”
processing_infoSTRINGβ€”