ComfyUI Node
CoachBate H3 Segm Mask (YOLO)
Runs a YOLO segmentation model on the crops from H3 Subject Track + Crop and returns temporally smoothed masks for H3 Subject Stitch Back -> masks. Use with a segm detector (e.g. segm/CockAndBallYolo8x.pt) so the paste follows the real silhouette instead of a rectangle.
CoachBate H3 Segm Mask (YOLO)
- crops
- transform
- refined_crops
- masks
- report
◄model▾►
◄confidence0.30►
◄instancebest_overlap►
◄dilation0►
◄temporal_smooth5►
◄mask_sourceunion►
◄detect_scales1.0, 0.7, 0.5, 0.35, 0.25►
◄fallback_shapenone►
CategoryCoachBate/H3
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| crops | IMAGE | The 'crops' output of H3 Subject Track + Crop - the INPUT crops, not the decoded result. The mask must describe where the subject is in the footage being replaced. | |
| transform | H3FACEXFORM | From H3 Subject Track + Crop. Supplies the tracked rect per frame, used to pick the right instance and as the fallback mask on frames the model misses. | |
| model | COMBO | A YOLO *segmentation* model from models/ultralytics/segm. A bbox-only model produces no masks and every frame falls back to the rect. | |
| confidence | FLOAT | 0.300.05–0.95 | — |
| instance | COMBO | best_overlap | Which detection to keep when the model finds several in a crop. best_overlap: the one whose box overlaps the tracked rect most (the subject the tracker is following). union: all of them. largest: biggest mask area. |
| dilation | INT | 00–128 | Grow the mask here, in canvas px. H3 Subject Stitch Back has its own mask_dilation that does the same thing, so leave this at 0 and use that one unless you need growth before temporal smoothing. |
| temporal_smooth | INT | 51–31 | Frames of averaging across the mask stack. 1 disables it and the mask edge will shimmer. |
| mask_source | COMBO | union | Which crops the silhouette is traced from. input: the tracker's crops (FaceDetailer's rule - right when the subject keeps its shape). output: the refined crops H3 returned - the NEW silhouette, for a subject the model reshapes or enlarges; with input masking everything it added outside the old outline is cut off. union: both, so neither the old nor the new edge is left behind. output/union need refined_crops connected and fall back to input if it is not. |
| detect_scalesopt | STRING | 1.0, 0.7, 0.5, 0.35, 0.25 | Scales the crop is detected at, best score wins. A segm model trained on medium shots scores a subject filling half the crop near zero; the same crop at half size scores 0.7-0.8. Comma separated, 0.1-1.0. |
| fallback_shapeopt | COMBO | none | What to paste on frames the model finds no silhouette on (input or refined crop). none: nothing - those frames keep their original pixels, which is right when the subject is not actually there yet. ellipse / rect: the tracked box, for detectors that miss frames the subject IS in. |
| refined_cropsopt | IMAGE | The decoded result of the H3 pass (VAEDecode output), same frame count as crops. Used by mask_source output / union. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| masks | MASK | — |
| report | STRING | — |