Nodes/lip_mask_from_pose/Mouth Masks (A+B) from Sapiens2 Seg
ComfyUI Node

Mouth Masks (A+B) from Sapiens2 Seg

Two-mask Sapiens2 seg extractor: pick up to 4 classes per mask (e.g. mask_a = Tongue [preserve], mask_b = Upper_Teeth + Lower_Teeth [subtract from preserve]). Pair with the Sapiens2 Body-Part Segmentation node's class_id_mask output.

By Jalen-Brunson·Created 4 months ago·Updated 3 months ago· 1
Mouth Masks (A+B) from Sapiens2 Seg
  • class_id_mask
  • mask_a
  • mask_b
  • selected_a
  • selected_b
mask_a_class_1Tongue
mask_a_class_2none
mask_a_class_3none
mask_a_class_4none
mask_a_blur_radius0
mask_a_grow_pixels0
mask_a_fill_holesfalse
mask_a_invertfalse
mask_b_class_1Upper_Teeth
mask_b_class_2Lower_Teeth
mask_b_class_3none
mask_b_class_4none
mask_b_blur_radius0
mask_b_grow_pixels0
mask_b_fill_holesfalse
mask_b_invertfalse
num_classes29
Categorymask/pose

Inputs (18)

NameTypeDefaultDescription
class_id_maskMASK
mask_a_class_1COMBOTongue30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_a_class_2COMBOnone30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_a_class_3COMBOnone30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_a_class_4COMBOnone30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_a_blur_radiusINT00–100Mask A: Gaussian blur radius for feathered edges.
mask_a_grow_pixelsINT00–200Mask A: dilate outward by this many pixels.
mask_a_fill_holesBOOLEANfalseMask A: close small interior holes.
mask_a_invertBOOLEANfalseMask A: invert the binary mask.
mask_b_class_1COMBOUpper_Teeth30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_b_class_2COMBOLower_Teeth30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_b_class_3COMBOnone30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_b_class_4COMBOnone30 options: none, Upper_Lip, Lower_Lip, Upper_Teeth, Lower_Teeth, Tongue, +24
mask_b_blur_radiusINT00–100Mask B: Gaussian blur radius for feathered edges.
mask_b_grow_pixelsINT00–200Mask B: dilate outward by this many pixels.
mask_b_fill_holesBOOLEANfalseMask B: close small interior holes.
mask_b_invertBOOLEANfalseMask B: invert the binary mask.
num_classesINT292–256Total classes in the source segmentation. Sapiens2 standard = 29.

Outputs (4)

NameTypeDescription
mask_aMASK
mask_bMASK
selected_aSTRING
selected_bSTRING