Skin Feathered Padded Mask v5.1.0
The skin seam mask that fixes two-pass virtual try-on
- garment_masks
- first_pass_masks
- IMAGE
If you've done any virtual try-on in ComfyUI you know the pain this node exists for. First pass looks great in the preview, then you zoom in and the new garment's edge sits on a ghostly strip of old-shirt pixels - a seam that reads instantly as "this was AI pasted." Skin Feathered Padded Mask computes exactly that seam region so you can mask it and blend it away in a second pass.
It's part of TRI3D-LC's tri3d-comfyui-nodes pack (v5.1.0), a virtual try-on toolbox from the same person who built the tri3d-openpose-editor. The good news: this node is pure pixel math. No models, no downloads, nothing to warm up.
How it works
You feed it two masks and it builds a feathered band between them. For each frame it:
- resizes
garment_masksto the first-pass size, - dilates
first_pass_masksbypadding_marginpixels, - erodes
first_pass_masksby a hard-coded 25px, - dilates
garment_masksby a hard-coded 30px, - and outputs
(padded first-pass XOR eroded first-pass) AND dilated garment.
The result is a 0/255 binary band - the border zone of the first-pass mask, clipped to where the garment actually is. In a two-pass try-on that band is exactly the ghosting/skin strip where old garment meets new. Mask it, feed it to an inpainting pass at low denoise, and the seam gets blended instead of reinforced. That's the whole trick, and it's why "feathered" is in the name.
The inputs that matter
garment_masks- the mask of the garment you're trying on.first_pass_masks- the mask from your first generation/inpaint pass.padding_margin(INT, default 20) - how thick the band is. Bigger gives a more aggressive re-blend but risks eating into the garment edge itself.
Output is a single IMAGE (the binary band), not a MASK - you'll want ImageToMask or similar before most inpainting nodes. Keep both input batches the same length; the node loops over first_pass_masks and indexes garment_masks[i], so a length mismatch throws.
How to install
Via ComfyUI Manager (search tri3d-comfyui-nodes), or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/TRI3D-LC/tri3d-comfyui-nodes
Then restart ComfyUI. No model downloads for this node - the pack only pulls the InSPyReNet/ATR weights when you run its segmentation nodes, which you don't need here. The pack's requirements.txt does install some heavy stuff (transparent-background, facer from git) on Manager install; that's overkill for this one node but harmless.
Gotchas
The 25px and 30px erosion/dilation are hard-coded, so the band's thickness scales with image size - on a 512px canvas it's proportionally much chunkier than on a 1536px one. Drop padding_margin if the seam looks heavy. Also, "skin" is the author's shorthand: this is the boundary zone, not a skin-tone mask, so don't go hunting for a skin color check here. It's a niche node from a niche pack with an empty upstream README - expect the rough edges, but the math is sound and it does one thing well.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| garment_masks | IMAGE | — | |
| first_pass_masks | IMAGE | — | |
| padding_margin | INT | 20 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |