FeyNoBg (RMBG)
The node you reach for when the hair is the problem
- image
- background_color
- IMAGE
- MASK
- MASK_IMAGE
Most background removers are fine until you hit flyaway hair, fur, a veil, or a glass. Then you get a hard-edged helmet of a cutout or a grey halo you paint out by hand. FeyNoBg is the pack's answer to that failure - a dichotomous-image-segmentation model from the BiRefNet family, trained on the hard edges rather than the easy ones.
One honest caveat before the sales pitch: this node landed in v3.3.0 in October 2026, and as of writing it has essentially zero community discussion. Everything below comes from the source and the author's own description, not from a hundred people agreeing.
Why you'd reach for it over the plain RMBG node
The KB's background-removal essay is blunt about where quality stopped moving: "the quality frontier has not moved much since BiRefNet HR in February 2025," and every "new SOTA" since either fizzled or turned out to be a repackaging. So treat "Ultra-Fine Matting" as a claim to test, not a fact. The realistic reason to use FeyNoBg is narrower: your subject has genuinely difficult boundaries and your current node is chewing them up. BiRefNet (now shipped in ComfyUI core, no custom node needed) is still the default. This is the variant you try on your three worst images.
How it works
Under the hood it is a BiRefNet - the node imports BiRefNet and BiRefNetConfig from the nobg library, loads a 263M-parameter deepened Swin-L backbone from 1038lab/FeyNobg, and runs it in half precision on CUDA. That matters for two reasons. First, no trimap: unlike classic matting, you don't tell it roughly where the edge is. Second, it produces fractional alpha rather than a hard yes/no, which is the actual structural difference for a veil or a wine glass - a segmentation model doesn't have a way to express "40% opaque" and no amount of model quality fixes that.
The refine_foreground toggle is real edge work, not a label. With it on, the node builds a transition band out of the model's ambiguous pixels, blends that band against a slightly blurred binary mask, and attenuates the soft region a touch - then multiplies the RGB by the refined alpha so the cutout edges don't carry background colour into the composite. It's on by default, and you should leave it on for hair, fur, and glass.
Inputs that matter
Just image is required - a batch, processed frame by frame. Everything else is cleanup:
background-Alphafor a transparent RGBA cutout,Colorto composite ontobackground_color(a hex picker, default#222222). PickColorwhen you're dropping the subject onto a known backdrop and don't want to fight alpha handling downstream.refine_foreground- leave ittrueunless you're seeing soft edges you didn't ask for.mask_blur/mask_offset- the usual pair. Blur softens the edge (1–3 is plenty; 64 is a smear), offset grows positive and shrinks negative, in pixels. Use offset to steal back one or two pixels on a cut that's just slightly too tight.invert_output,unload_model- invert flips the mask; unload drops the weights from VRAM after the run, worth turning on if you alternate this with a big diffusion model.
Note what's not here: no process_res, no sensitivity. The plain RMBG node gives you both. FeyNoBg hands you the model as-is, which is a fair trade.
Outputs
- IMAGE - cutout, RGBA in Alpha mode.
- MASK - the alpha channel as a mask. Feed it to
Mask Composite, a detailer, orVAEEncodewith a mask input. - MASK_IMAGE - the mask as a grey RGB image. Not a mask at all, technically; it's for previewing or saving, and people plug it into
MASKsockets and wonder why nothing works. Don't.
Install
Through ComfyUI Manager, search ComfyUI-RMBG, or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/1038lab/ComfyUI-RMBG
./ComfyUI/python_embeded/python -m pip install -r ComfyUI-RMBG/requirements.txt
FeyNoBg needs two Python packages that the README's dependency list doesn't mention - nobg and refiners. They are in requirements.txt as of v3.3.0, so the command above covers it. If you installed the pack before this node existed, reinstall requirements or you'll get a RuntimeError telling you to pip install nobg.
The model auto-downloads on first run - config.json, FeyNobg.safetensors, preprocessor_config.json - into ComfyUI/models/RMBG/FeyNoBg. For offline boxes, grab those three files from 1038lab/FeyNobg and drop them in that folder yourself.
Troubleshooting
Import error mentioning nobg. Requirements weren't reinstalled after the v3.3.0 update. Run the pip command against ComfyUI's embedded Python, not your system one.
The model downloads on every restart. It shouldn't - it checks for the three files first. Usually that means the files are sitting loose in models/RMBG instead of inside the FeyNoBg subfolder.
Edge quality got worse, not better. Run it against BiRefNet on the same image at the same size. FeyNoBg is a special-purpose tool; on a clean product shot with a contrasting background it has nothing to add, and InSPyReNet still wins on some material according to the corpus. Nobody owns this problem - that's why the KB's advice is "test on your own three hardest images" rather than pick a winner from a benchmark table.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image batch to remove background from. | |
| mask_bluropt | INT | 00–64 | Gaussian blur radius for softening mask edges. |
| mask_offsetopt | INT | 0-64–64 | Expand (positive) or shrink (negative) the mask boundary in pixels. |
| invert_outputopt | BOOLEAN | false | Invert the output mask. |
| refine_foregroundopt | BOOLEAN | true | Sub-pixel foreground boundary refinement for fine hairs and semi-transparent edges. |
| unload_modelopt | BOOLEAN | false | Unload model weights from VRAM immediately after execution. |
| backgroundopt | COMBO | Alpha | Output format: Alpha for transparent PNG, or Color to composite against background. |
| background_coloropt | COLORCODE | #222222 | Hex background color used when background mode is set to Color. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| MASK_IMAGE | IMAGE | — |