Body Segment (RMBG)
Body Segment (RMBG)
- images
- background_color
- IMAGE
- MASK
- MASK_IMAGE
Body Segment masks body parts. Tick Torso-skin, or Left-arm, or Face, or Top-clothes, and it hands back a mask covering exactly those regions of a person. It's the whole-body companion to Face Segment and Clothes Segment - same idea, wider scope. Reach for it when you need to isolate limbs, skin, or coarse clothing zones: masking arms and legs for a skin retouch, grabbing the torso for a shirt swap, or keeping a person while dropping everything else.
Like its siblings, it's a human-parsing model rather than a prompt-driven segmenter. The model was trained to label every pixel of a person into body categories, so you don't describe anything - you check boxes for the parts it already knows. No detector to wire up, no text prompt, no point-clicking. That's what makes this family fast and predictable compared to the SAM/GroundingDINO nodes.
The inputs are the part toggles: Hair, Glasses, Top-clothes, Bottom-clothes, Torso-skin, Face, Left-arm, Right-arm, Left-leg, Right-leg, Left-foot, and Right-foot. Flip on any combination and they merge into a single mask - so "both arms" is two boxes, "all skin" is Torso-skin plus the arms and legs (and Face if you want it), and "the outfit" is Top-clothes plus Bottom-clothes. The settings underneath are lean: mask_blur and mask_offset for edge cleanup and growing/shrinking, invert_output to flip the selection, and background / background_color to output transparency or a solid fill. Note there's no process_res slider on this one - it runs at the parser's own working resolution. Outputs are the standard IMAGE, MASK, and MASK_IMAGE; MASK is the one that goes downstream.
Install is the usual pack routine: "Comfyui-RMBG" in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/1038lab/ComfyUI-RMBG, then pip install -r requirements.txt and restart. The body-parsing model auto-downloads on first use and caches. It's a small, quick model.
A few things worth knowing. The Left/Right split is assigned from the image's orientation, not the subject's own left and right, so don't agonize over it - glance at the MASK_IMAGE preview and pick whichever side lit up. The category set here is coarser than Clothes Segment's (Top-clothes / Bottom-clothes rather than shirt / skirt / dress), which is exactly right for broad zone work and wrong if you need a specific garment - for that, drop down to Clothes Segment or the Fashion nodes. The invert_output trick applies here too: select the parts you don't want and invert to keep everything else, which is often the fastest way to build a "person minus their clothes" or "everything but the arms" mask. And as always, add a touch of mask_blur before inpainting so the edited region blends instead of showing a hard boundary.
Where it fits against the pack: Body Segment is the tool for limb- and zone-level masks on a person. If you want fine garment detail, use Clothes/Fashion Segment; for facial features, Face Segment; for a plain full-person cutout, RMBG or BiRefNet is simpler. This one earns its place when the thing you're after is "that arm" or "the torso skin" - a body region a general remover can't isolate and a text-prompt segmenter would need coaxing to find.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| Hairopt | BOOLEAN | false | — |
| Glassesopt | BOOLEAN | false | — |
| Top-clothesopt | BOOLEAN | false | — |
| Bottom-clothesopt | BOOLEAN | false | — |
| Torso-skinopt | BOOLEAN | false | — |
| Faceopt | BOOLEAN | false | — |
| Left-armopt | BOOLEAN | false | — |
| Right-armopt | BOOLEAN | false | — |
| Left-legopt | BOOLEAN | false | — |
| Right-legopt | BOOLEAN | false | — |
| Left-footopt | BOOLEAN | false | — |
| Right-footopt | BOOLEAN | false | — |
| mask_bluropt | INT | 00–64 | Blur amount for mask edges |
| mask_offsetopt | INT | 0-64–64 | Expand/Shrink mask boundary |
| invert_outputopt | BOOLEAN | false | Invert both image and mask output |
| backgroundopt | COMBO | Alpha | Choose background type: Alpha (transparent) or Color (custom background color). |
| background_coloropt | COLORCODE | #222222 | Choose background color (Alpha = transparent) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| MASK_IMAGE | IMAGE | — |