Nodes/ComfyUI-NKD-Basic-Tools/😺NKD Face Rig
ComfyUI Node

😺NKD Face Rig

Pose a portrait's expression by dragging handles on the face itself

By Nekodificador·Created about a month ago·Updated 3 days ago· 71
😺NKD Face Rig
  • image
  • expression
  • image
  • face_mask
  • expression
â—„rigâ–º
â—„crop_factor2.00â–º
â—„src_ratio1.00â–º
â—„stitchingtrueâ–º

The classic way to change a face's expression in ComfyUI is a wall of sliders - brows, eyes, mouth, each a number you can't see the effect of until you run. 😺NKD Face Rig flips that: handles hang off the detected landmarks on the face itself, you drag them, and the result re-renders live while you drag. One raised brow, a wink, a one-sided smirk - every side of the face moves independently, and there's a mirror toggle for symmetric edits.

Under the hood it's LivePortrait (vendored into the pack, MIT), which is why the rig is a facial rig on the picture rather than a bank of number boxes - and why the author can promise it's byte-exact with the slider values of classic expression workflows.

How it works

The editor lives right in the node - no modal, no extra window. Handles hang off the detected landmarks and follow the face when it turns. Head turn/tilt and gaze get their own corner gizmos so the face stays clear. Ctrl+Z undoes while your pointer is over the editor, Shift is fine-adjust, double-click resets a handle. The expression presets are the standard FACS combinations rather than invented ones, which matters if you're trying to land a specific, recognized expression.

The node runs standalone - no other custom nodes needed. You don't even need a Load Image feeding it: feed it a VAE Decode, a subgraph, even a 😺NKD Face Crop that straightened the head first, and its Run button computes just that branch so the rig picks the face up from there.

Inputs and outputs

  • image - the portrait to pose. Only the first frame is used, so this is a stills tool, not a video one.
  • crop_factor - how much around the face to take in. Larger keeps more hair and shoulders but gives the model less face to work with.
  • src_ratio - how much of the expression already in the photo to keep. Lower it to neutralise a face that's already smiling before you pose it. This is the knob I'd reach for first on a photo of someone mid-laugh.
  • stitching - blends the posed face back into the original shoulders. Turn it off only to inspect the raw crop.
  • rig - the pose, written by the editor. Editing it by hand is allowed but the editor is easier.

Outputs: image, plus face_mask (the feathered paste region, aligned with the output - feed it to a face detailer to refine exactly what the renderer touched) and expression (an NKD_EXPRESSION you can layer onto another rig via the optional input).

Install and gotchas

Install via ComfyUI Manager (search ComfyUI-NKD-Basic-Tools) or:

cd ComfyUI/custom_nodes
git clone https://github.com/Nekodificador/ComfyUI-NKD-Basic-Tools

This is the heavyweight of the pack's face nodes. It needs onnxruntime (a real pack dependency, used for the LivePortrait landmark model), and the LivePortrait weights (~600 MB) download automatically from Hugging Face into models/liveportrait on first use. That download is the #1 "why isn't it working" moment - give it a minute and an internet connection. If ultralytics is installed the crop uses the standard YOLOv8 face detector; otherwise OpenCV's own detector stands in.

Category😺NKD Nodes/Face

Inputs (6)

NameTypeDefaultDescription
imageIMAGEThe portrait to pose. Only the first frame is used.
rigSTRINGThe rig pose, written by the editor. Editing it by hand is allowed but the editor is easier.
crop_factorFLOAT2.001.5–3How much around the face to take in. Larger keeps more hair and shoulders but gives the model less face to work with.
src_ratioFLOAT1.000–1How much of the expression already in the photo to keep. Lower it to neutralise a face that is already smiling before posing it.
stitchingBOOLEANtrueBlend the posed face back into the original shoulders. Turn it off only to see the raw crop.
expressionoptNKD_EXPRESSIONAn expression from another rig, added on top of this one.

Outputs (3)

NameTypeDescription
imageIMAGE—
face_maskMASKThe feathered paste region, aligned with the output image — feed it to a face detailer to refine exactly what the 512 renderer touched.
expressionNKD_EXPRESSION—