SapiensSplit
Keep just the shirt, or just the legs — pick your body parts
- conds
You've got a person in a frame. You want to regenerate just their jacket, just their shoes, or just the upper half - without touching their face, hands, or pose. That's the job SapiensSplit exists for: it's a body-part filter that tells the rest of the pack which parts of the person to keep and which to clear out.
It rides on the quality of Sapiens' segmentation, which is the best thing about this whole pack - the same Meta Goliath class set that made people notice human vision models in the first place. Where a generic "person mask" is a binary blob, this gives you 29 named parts: left and right socks, shoes, upper and lower arms and legs, torso, apparel, hair, even the lips and teeth as separate classes. That granularity is what makes outfit-specific editing actually work.
How it works
The node is deceptively simple: 29 boolean toggles, one per body part, plus a keep_all shortcut. Whatever you tick becomes a list of segmentation class indices, and that list flows out of the conds output into SapiensSampler's optional cond input. The sampler's segmentation pass then colors in only the parts you selected and paints everything else with the background color (the BG_R/G/B you set on the sampler - white by default, which is exactly what you want for mask-style output).
Here's the part that makes it powerful: it's not just the seg map that gets filtered. The sampler passes that same kept-mask along to the normal, depth, pose, pointmap, and albedo paths. So when you say "keep only the jacket," every map the pack produces is now constrained to the jacket - you get a normal map of just the jacket, a depth map of just the jacket, and so on. Wire those into ControlNet and you can re-render the jacket in a new style or lighting while the rest of the person stays pinned.
Inputs that matter
- keep_all - the shortcut. On, and every part is kept; you're effectively saying "whole person." Handy when you want the filter off without unticking 28 boxes.
- The part toggles - Background, Apparel, Eyeglass, Face_Neck, Hair, the left/right limbs (Foot, Hand, Lower_Arm, Lower_Leg, Shoe, Sock, Upper_Arm, Upper_Leg), Torso, Upper_Clothing, Lower_Clothing, and the facial bits (Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue).
A couple of gotchas baked into the defaults. Tick nothing and leave keep_all off, and you get no filtering - the default whole-person map, because the sampler treats an empty selection as "just do the normal thing." And note the naming: these are Goliath dataset labels, so it's Upper_Clothing not "jacket," Left_Sock not "sock." Close enough to guess, weird enough to trip you up the first time.
The output
conds - typed as CONDITIONING, which is a lie worth knowing about. It's really a list of class indices, not a text-prompt conditioning vector. Do not wire it into a KSampler's positive/negative input; it only makes sense feeding the SapiensSampler's cond slot. That type label is just the pack reusing a convenient wire type to carry a list.
Where you'd reach for it
This is a character-consistency and editing tool more than a generation tool. Classic moves: keep face, hands, and background but regenerate the outfit; keep only the head for a head-swap or relight; keep only the shoes for product-style consistency shots; or use keep_all as a glorified "just give me the clean person mask." Combined with the pack's mask output and inpainting, it covers a surprising amount of the "change one thing, keep everything else" territory that character-consistency discussions always land on.
Install and caveats
Same pack as everything else - ComfyUI Manager, search ComfyUI_Sapiens, or clone into custom_nodes and pip install -r requirements.txt. SapiensSplit needs a seg model loaded in SapiensLoader to have anything to split, so the practical order is: load seg → run sampler with an image → then start ticking parts and re-running.
The only real annoyance is ergonomic: 29 toggles is a lot of clicking to build a "shirt only" selection every time, and there's no preset save. If that bugs you, remember keep_all is your "undo" button and that the background color lives on the sampler, not here. For everything else - granular, part-level control over what a person in your workflow actually is - SapiensSplit is a genuinely useful little node hiding behind a wall of checkboxes.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| keep_all | BOOLEAN | false | — |
| Background | BOOLEAN | false | — |
| Apparel | BOOLEAN | false | — |
| Eyeglass | BOOLEAN | false | — |
| Face_Neck | BOOLEAN | false | — |
| Hair | BOOLEAN | false | — |
| Left_Foot | BOOLEAN | false | — |
| Left_Hand | BOOLEAN | false | — |
| Left_Lower_Arm | BOOLEAN | false | — |
| Left_Lower_Leg | BOOLEAN | false | — |
| Left_Shoe | BOOLEAN | false | — |
| Left_Sock | BOOLEAN | false | — |
| Left_Upper_Arm | BOOLEAN | false | — |
| Left_Upper_Leg | BOOLEAN | false | — |
| Lower_Clothing | BOOLEAN | false | — |
| Right_Foot | BOOLEAN | false | — |
| Right_Hand | BOOLEAN | false | — |
| Right_Lower_Arm | BOOLEAN | false | — |
| Right_Lower_Leg | BOOLEAN | false | — |
| Right_Shoe | BOOLEAN | false | — |
| Right_Sock | BOOLEAN | false | — |
| Right_Upper_Arm | BOOLEAN | false | — |
| Right_Upper_Leg | BOOLEAN | false | — |
| Torso | BOOLEAN | false | — |
| Upper_Clothing | BOOLEAN | false | — |
| Lower_Lip | BOOLEAN | false | — |
| Upper_Lip | BOOLEAN | false | — |
| Lower_Teeth | BOOLEAN | false | — |
| Upper_Teeth | BOOLEAN | false | — |
| Tongue | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conds | CONDITIONING | — |