😺NKD Face Rig
Pose a portrait's expression by dragging handles on the face itself
- image
- expression
- image
- face_mask
- expression
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.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The portrait to pose. Only the first frame is used. | |
| rig | STRING | The rig pose, written by the editor. Editing it by hand is allowed but the editor is easier. | |
| crop_factor | FLOAT | 2.001.5–3 | 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 | FLOAT | 1.000–1 | How much of the expression already in the photo to keep. Lower it to neutralise a face that is already smiling before posing it. |
| stitching | BOOLEAN | true | Blend the posed face back into the original shoulders. Turn it off only to see the raw crop. |
| expressionopt | NKD_EXPRESSION | An expression from another rig, added on top of this one. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| face_mask | MASK | The feathered paste region, aligned with the output image — feed it to a face detailer to refine exactly what the 512 renderer touched. |
| expression | NKD_EXPRESSION | — |