Skip Lip Mask v5.1.0
Erase everything above the lips in one pass
- image
- IMAGE
Another one of those TRI3D nodes where the name points backward. Skip Lip Mask doesn't touch a lip mask at all - it finds where your lips are and blackens every pixel above them. Eyes, nose, forehead, most of the mouth: gone. What survives is the chin and everything below. If your pipeline wants to regenerate the upper face while keeping the lower one (or the other way around), this is a two-input shortcut.
It ships in tri3d-comfyui-nodes (TRI3D-LC, v5.1.0), and like most of the pack's face nodes it's pose-driven rather than model-driven - pure OpenCV over a DWPose keypoint file.
How it works
The node takes image and a keypoints_json path, reads the flattened keypoints, and pulls out the lip landmarks. The pack's keypoint format is the 130-point OpenPose layout (18 body + 70 face + hands), and the lip region lives around flat indices 61–68. It takes the lowest of those lip points, then does the signature move:
result_image[:lowest_lip_y, :] = 0
Everything above the bottom lip gets zeroed. Below it is untouched. So a portrait comes out as a black slab with the chin, jaw and neck still visible - exactly the split you want before an inpaint pass that redraws the face.
There's a fallback if no valid lip keypoints exist (bad pose, side profile, occluded face): it estimates the lip line from the nose point plus 15% of image height, or a third of the height if even that fails. So the node degrades gracefully instead of crashing - but the blackout line will be wrong, and you'll see it.
The inputs
image- the photo/portrait.keypoints_json- STRING with the file path to the keypoint JSON ({"height", "width", "keypoints": [[x,y],...]}). Produce it with the pack'stri3d_SaveFlattenedPoseKpsAsJsonFilenode wired to a DWPose detector, or write it yourself in the same format.
Output is one IMAGE with the upper face blacked out.
Install
ComfyUI Manager → search tri3d-comfyui-nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TRI3D-LC/tri3d-comfyui-nodes
Restart ComfyUI. Nothing extra to download - cv2 and numpy are already in ComfyUI.
Gotchas
The lip indices (61–68) are an assumption baked into the code, written to match OpenPose/DWPose ordering - so feed it keypoints from the pack's own SaveFlattened node and you're fine, but a JSON from a different keypoint convention will give you a garbage cutoff. Watch the fallback behavior too: if DWPose missed the face, you won't get an error, you'll get a black line drawn in the wrong place. And as with the other Skip nodes, only the first frame of a batch is processed. It's a one-trick node, but the trick is cheap and the math is transparent.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| keypoints_json | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |