π¬ Studio42 Background Remover Enhanced
A serious background remover β BiRefNet, chroma keying, and spill suppression in one node
- images
- guidance_mask
- depth_map
- reference_background
- result_rgb
- result_rgba
- result_mask
- processing_info
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-portraitfor people, and thechroma_key_professional/luma_key_professionalentries for studio-shot footage.u2netremains 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:
then restart.cd ComfyUI/custom_nodes/ git clone https://github.com/GeekyGhost/24oiduts-ComfyUI pip install -r 24oiduts-ComfyUI/requirements.txt
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_resolutionagainst 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/rembgare installed. Restart after the first download. - Out of memory - switch to fp16, drop
processing_resolution, or useu2netfor 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.
Inputs (35)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | β | |
| method | COMBO | birefnet-general | Background removal method. BiRefNet models are state-of-the-art and working great with FP16! |
| guidance_maskopt | MASK | β | |
| depth_mapopt | IMAGE | β | |
| reference_backgroundopt | IMAGE | β | |
| processing_resolutionopt | INT | 1024256β4096 | Processing resolution. Higher = better quality but slower. |
| use_gpuopt | BOOLEAN | true | Use GPU acceleration. Highly recommended for AI methods. |
| model_precisionopt | COMBO | fp16 | FP16 uses 50% less memory and is 2x faster with great quality! |
| use_guidance_maskopt | BOOLEAN | true | Use guidance mask if provided. White areas = keep, black areas = remove. |
| guidance_mask_strengthopt | FLOAT | 0.700β1 | Strength of guidance mask influence. |
| use_depth_guidanceopt | BOOLEAN | true | Use depth map if provided. Closer objects (brighter) = foreground. |
| depth_thresholdopt | FLOAT | 0.500β1 | Depth threshold. Objects closer than this are considered foreground. |
| depth_falloffopt | FLOAT | 0.200.05β0.5 | Smooth transition distance around depth threshold. |
| combine_depth_with_aiopt | BOOLEAN | true | Combine depth guidance with AI predictions for best results. |
| chroma_coloropt | COMBO | green | Chroma key background color. Green is most common for LED walls. |
| primary_thresholdopt | FLOAT | 0.120.01β0.5 | Primary color tolerance. Lower = more precise. 0.12 optimal for LED walls. |
| secondary_thresholdopt | FLOAT | 0.030.01β0.3 | Secondary refinement for edges. Lower = cleaner edges. |
| saturation_thresholdopt | FLOAT | 0.400.1β1 | Minimum saturation. 0.4 optimal for modern LED screens. |
| brightness_minopt | FLOAT | 0.150β1 | Minimum brightness for chroma key detection. |
| brightness_maxopt | FLOAT | 0.950β1 | Maximum brightness for chroma key detection. |
| multi_pass_keyingopt | BOOLEAN | true | Multi-stage processing for professional edge quality. |
| spill_suppressionopt | FLOAT | 0.850β1 | Remove color bleeding on subject edges. 0.85 optimal for most scenarios. |
| spill_preserve_luminanceopt | BOOLEAN | true | Preserve brightness during spill removal for natural results. |
| edge_softnessopt | FLOAT | 1.500β10 | Edge blur for smooth transitions. 1.5 optimal for most images. |
| core_matte_chokeopt | FLOAT | 0.00-0.5β0.5 | Expand (negative) or contract (positive) the matte core. |
| luma_key_modeopt | COMBO | shadows_highlights | Luma key removal mode. |
| shadow_thresholdopt | FLOAT | 0.080β0.5 | Shadow removal threshold. Lower = more shadows removed. |
| highlight_thresholdopt | FLOAT | 0.920.5β1 | Highlight removal threshold. Higher = more highlights removed. |
| luma_softnessopt | FLOAT | 0.050β0.5 | Luma key soft transition distance. |
| difference_thresholdopt | FLOAT | 0.080.01β0.5 | Difference key sensitivity. Lower = more sensitive. |
| color_space_modeopt | COMBO | hsv | Color space for processing. HSV recommended for chroma key, LAB for quality. |
| garbage_matte_enabledopt | BOOLEAN | false | Automatically remove obvious background areas. |
| remove_small_objectsopt | BOOLEAN | true | Remove small noise objects from mask. |
| small_object_thresholdopt | INT | 30050β2000 | Size threshold for small object removal (pixels). |
| mask_bluropt | FLOAT | 0.80β5 | Final mask blur for smoother edges. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| result_rgb | IMAGE | β |
| result_rgba | IMAGE | β |
| result_mask | MASK | β |
| processing_info | STRING | β |