Landmarks to Image
Render facial landmarks into a keypoints image
- landmarks
- image
- keypoints_image
Small, single-purpose utility: it takes facial landmarks and draws them into an image. Landmarks are the numeric keypoints of a face - the dozens of little coordinates tracing the jaw, brows, eyes, nose, and lips that face-tracking produces. Those numbers are useful to a model but invisible to you, so LandmarksToImage renders them into a keypoints_image you can actually see, sanity-check, or pass along as a visual control signal.
The category tag here is a giveaway: it's LivePortrait, the face-reenactment world, where you drive a portrait's expression from a source face. Landmark visualization is bread-and-butter tooling for that kind of work - you extract landmarks from a driving face, and this turns them into the overlay/control frame.
How it works
You feed it a set of LANDMARKS (the keypoint coordinates from a face detector/tracker upstream) plus a canvas size, and it plots those points onto an image. Optionally you can pass an image to draw the landmarks over - handy for checking alignment against the actual face rather than looking at dots on a black field. The output is a standard IMAGE, so it slots into any downstream node that wants a keypoints/control frame or that you just want to eyeball.
The inputs and output that matter
landmarks(LANDMARKS, required) - the facial keypoints to draw, from a landmark-extraction node upstream.width/height(default 512 × 512) - the canvas size. Match it to the resolution the landmarks were detected at (or the image you're overlaying) so the points land correctly.image(IMAGE, optional) - a background to draw the landmarks on top of. Leave it empty for landmarks on a blank canvas; provide the source face to visualize alignment.
The output is keypoints_image (IMAGE) - the rendered landmarks, for inspection or as a control input downstream.
How to install it
ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt
then restart. This node just draws - no model download - but the LANDMARKS it needs come from a face-landmark detector, so you'll have a face-analysis dependency upstream feeding it.
Common issues & troubleshooting
Landmarks land in the wrong spot / wrong scale. The width/height need to match the coordinate space the landmarks were detected in. If they were extracted from a 1024-wide frame but you render at 512, the points scale off. Keep the canvas consistent with the detection resolution, or with the image you're overlaying.
Nothing draws. Empty output almost always means the landmarks input is empty - the upstream detector found no face (too small, obscured, off-frame). Fix the detection before blaming the draw node.
It's a visualizer, not a driver. LandmarksToImage renders keypoints; it doesn't animate anything by itself. In a full reenactment or expression-driving pipeline it's one utility step - extract landmarks, optionally visualize/align them here, then feed the actual driving model. If you wanted the face to move, this isn't the node that does it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| landmarks | LANDMARKS | — | |
| width | INT | 5121–2048 | Width of the output image |
| height | INT | 5121–2048 | Height of the output image |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| keypoints_image | IMAGE | — |