Nodes/ComfyUI/Visualize Face Landmarks (MediaPipe)
ComfyUI Node Runs on cloud

Visualize Face Landmarks (MediaPipe)

The face-mesh wireframe overlay, now in core

By Comfy-Org·Created 4 years ago·Updated 20 days ago· 121,575
Visualize Face Landmarks (MediaPipe)
  • face_landmarks
  • color
  • image
  • IMAGE
connections
thickness1
point_size2

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), or custom (toggle each feature, including tesselation, the full 2547-edge wireframe that makes faces look like a hologram).
  • color - hex, default #00ff00. The classic green, but #ff0000 and 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.

Categoryimage/detection

Inputs (6)

NameTypeDefaultDescription
face_landmarksFACE_LANDMARKS
connectionsCOMBO'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).
colorCOLOR#00ff00
thicknessINT10–8Edge line thickness in pixels. 0 disables edge drawing.
point_sizeINT20–16Landmark dot radius in pixels. 0 disables point drawing.
imageoptIMAGEIf not connected, a black canvas will be used.

Outputs (1)

NameTypeDescription
IMAGEIMAGE