Nodes/ComfyUI-LivePortraitKJ/LivePortrait KeypointsToImage
ComfyUI Node Runs on cloud

LivePortrait KeypointsToImage

See what the face detector actually sees

By kijai·Created 2 years ago·Updated 2 years ago· 2,199
LivePortrait KeypointsToImage
  • crop_info
  • keypoints_image
draw_linesfalse

This is the debug node you didn't know you needed until your LivePortrait output looks wrong and you can't tell why. KeypointsToImage takes a CROPINFO batch - the same crop info flowing into Process - and draws the face landmark points as an image. That's it. One input pair, one image out, and it's quietly one of the most useful sanity checks in the whole pack.

The landmarks are the 203 keypoints the detector uses to define the face: eyes, eyebrows, nose, lips, and jawline. The node colors them by region - eyes and brows in greens/blues, the mouth in reds and magentas, jaw in gray - so a single glance tells you whether the detector nailed the face or produced garbage.

Why you'd actually use it

  • Is the detector tracking at all? Before burning GPU time on a full animation run, wire the crop info into this node and look. If keypoints are missing or on the wrong face, the animation will be too - and you've just saved yourself a wasted render.
  • Which face got picked in a group shot? The cropper picks by face_index and face_index_order. Visualize the crop info and you'll see exactly whose landmarks got detected and where the crop landed.
  • Is the driving landmark data good? Retargeting and lip_zero both depend on driving landmarks being stable. A jittery keypoint image explains a twitchy retargeted eye.
  • Checking crop drift between frames. Browsing the per-frame output shows you whether the crop is stable or sliding around - the root cause of the infamous head-ballooning effect.

The inputs

  • crop_info (CROPINFO) - wire it from any cropper output. It draws lmk_crop from each frame's crop entry.
  • draw_lines (default off) - with it on, the node connects the keypoints into a face mesh instead of drawing dots. The mesh mode is genuinely better for spotting a badly deformed or swapped landmark set, because broken connections are obvious. Leave it off if you just want to check presence and position.

Output is keypoints_image - an RGB image batch sized to the original input, which you can preview in ComfyUI or pipe into a save node.

Reality check

It's a visualization, not an analysis tool - it draws dots and lines and tells you nothing numerically. If you're chasing a subtle detection problem, the dots won't give you a number to optimize against, but they'll show you the problem fast. For the price of one node in your graph, that's usually enough. Pair it with a stable source video and it'll make the difference between "why is the head pulsing" and "oh, the crop is drifting frame 40 onward."

CategoryLivePortrait

Inputs (2)

NameTypeDefaultDescription
crop_infoCROPINFO
draw_linesBOOLEANfalse

Outputs (1)

NameTypeDescription
keypoints_imageIMAGE