ComfyUI Node
🎭 S42 CutFlow Background Remover
A ComfyUI node in S42 CutFlow/Expanded with 20 inputs and 4 outputs.
🎭 S42 CutFlow Background Remover
- images
- guidance_mask
- reference_bg
- result_rgb
- result_rgba
- mask
- info
◄methodbirefnet-general►
◄use_gpuyes►
◄processing_resolution1024►
◄mask_blur0.8►
◄mask_dilation1►
◄mask_erosion1►
◄remove_small_objects300►
◄invert_maskno►
◄chroma_threshold0.12►
◄chroma_softness0.08►
◄spill_suppress0.70►
◄luma_modeshadows_highlights►
◄shadow_threshold0.08►
◄highlight_threshold0.92►
◄luma_softness0.10►
◄temporal_smooth0►
◄guidance_strength1.00►
CategoryS42 CutFlow/Expanded
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Image or video batch [B,H,W,C]. | |
| method | COMBO | birefnet-general | birefnet-general = best all-around AI. birefnet-portrait = people. birefnet-massive = highest quality. birefnet-hr = high-res 2048px. birefnet-dynamic = robust across resolutions. birefnet-matting = soft edges (hair, fur). u2net/isnet/silueta = classic AI (rembg). chroma_green/blue/red = screen keying. luma_key = brightness-based. |
| use_gpu | COMBO | yes | GPU for AI inference. |
| processing_resolution | INT | 1024256–2048 | AI inference resolution. 1024=standard, 2048=BiRefNet_HR. |
| mask_blur | FLOAT | 0.80–5 | Edge blur. 0=sharp, 0.8=smooth. |
| mask_dilation | INT | 10–10 | Expand mask N px. Helps with hair. |
| mask_erosion | INT | 10–10 | Shrink mask N px. Removes fringe. |
| remove_small_objects | INT | 3000–5000 | Remove noise < N px. Disabled for traditional methods. |
| invert_mask | COMBO | no | Swap foreground/background. |
| chroma_threshold | FLOAT | 0.120.01–0.5 | Chroma key sensitivity (chroma_* only). |
| chroma_softness | FLOAT | 0.080.01–0.3 | Chroma edge softness. |
| spill_suppress | FLOAT | 0.700–1 | Color spill suppression. |
| luma_mode | COMBO | shadows_highlights | What to KEEP. shadows=keep dark. highlights=keep bright. both=keep midtones. |
| shadow_threshold | FLOAT | 0.080–0.5 | Below = removed. Luma key only. |
| highlight_threshold | FLOAT | 0.920.5–1 | Above = removed. Luma key only. |
| luma_softness | FLOAT | 0.100.02–0.3 | Luma edge softness. Min 0.02 prevents freezes. |
| temporal_smooth | INT | 00–5 | Video mask smoothing window. 0=off, 1-5=flicker reduction. |
| guidance_strength | FLOAT | 1.000–1 | How hard the guidance mask gates the output. 0 = guidance ignored. 1.0 = strictly removes everything outside the white mask areas. Recommended: 1.0 for clean isolation. |
| guidance_maskopt | MASK | Paint white over the subject you want to KEEP. Leave everything else black. The BG remover will ONLY keep what's inside your white area. How it works: this mask GATES the AI output. White = AI mask passes through (subject kept). Black = forced to zero (guaranteed removed). | |
| reference_bgopt | IMAGE | Clean background plate. Enhances AI with difference info. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| result_rgb | IMAGE | — |
| result_rgba | IMAGE | — |
| mask | MASK | — |
| info | STRING | — |