Visualize Face Landmarks (MediaPipe)
The face-mesh wireframe overlay, now in core
- face_landmarks
- color
- image
- IMAGE
This is the image that started MediaPipe's whole life in the Stable Diffusion world: the glowing green wireframe draped over a face. For years that overlay meant installing a ControlNet Aux preprocessor; since May 2026 it's a core ComfyUI node fed by the equally-core MediaPipe detector. The main use is straightforward - feed this wireframe to a face-mesh ControlNet and you can re-shape an expression or a face angle the way pose ControlNet reshapes a body - but it's also just the fastest way to see whether your face detection is any good.
MediaPipe's FaceMesh isn't the coarse 68-point face of OpenPose. It's a dense mesh - 478 landmarks and thousands of edges - that tracks the contours of the face, eyes, brows, lips, irises and nose. That density is what makes the ControlNet conditioning expressive: the mesh is detailed enough that a matching ControlNet can genuinely follow a changed expression rather than just a face outline.
How it works
The connection topology - which landmark pairs form the mesh edges - is carried along with the landmark data from detection time, so this node doesn't need to know anything about MediaPipe internals. You pick which connection sets to draw, pick a color, and it renders the mesh over the input image using straightforward line drawing: edges as lines, landmarks as dots. If you don't connect an image, it draws the mesh on a black canvas instead, which is handy for building a pure conditioning image.
The inputs and outputs that matter
- face_landmarks - from
MediaPipeFaceLandmarker. Required. - image - optional; the frame to draw over.
- connections -
all(oval, eyes, brows, lips, irises and nose - the standard look),fill(a solid silhouette polygon from the face oval - basically a mask you can see), orcustom(toggle each feature, includingtesselation, the full 2547-edge wireframe that makes faces look like a hologram). - color - hex, default
#00ff00. The classic green, but#ff0000and friends work fine for contrast against your footage. - thickness - edge width in pixels, 0 disables edge drawing.
- point_size - landmark dot radius, 0 disables dots.
The IMAGE output is what you connect to your ControlNet conditioning input (via the normal controlnet-apply path), or to a preview to sanity-check detection.
The gotchas
The full tesselation wireframe looks spectacular and conditions terribly - it's noise to a ControlNet. For conditioning, the default all set, or a custom set of just the oval plus eyes and brows, gives a model something it can actually match. Save the hologram for screenshots. Second, remember the overlay inherits detection quality: if MediaPipeFaceLandmarker's num_faces caps at one and there are three people in frame, you get one pretty mesh and two empty faces. Set num_faces up (or 0 for uncapped) before you blame the drawing. Third, this node draws over your image; if you need the mesh as the only thing on screen, leave the image input unconnected rather than trying to subtract the original later.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| face_landmarks | FACE_LANDMARKS | — | |
| connections | COMBO | 'all' = oval+eyes+brows+lips+irises+nose. 'fill' = solid face_oval polygon (silhouette mask). 'custom' = toggle each feature individually (including 'tesselation', the full 2547-edge wireframe). | |
| color | COLOR | #00ff00 | — |
| thickness | INT | 10–8 | Edge line thickness in pixels. 0 disables edge drawing. |
| point_size | INT | 20–16 | Landmark dot radius in pixels. 0 disables point drawing. |
| imageopt | IMAGE | If not connected, a black canvas will be used. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |