Nodes/ComfyUI-AdvancedLivePortrait/Expression Editor (PHM)
ComfyUI Node Runs on cloud

Expression Editor (PHM)

Puppet a face with sliders instead of a prompt

By PowerHouseMan·Created 2 years ago·Updated 2 years ago· 2,668
Expression Editor (PHM)
  • src_image
  • motion_link
  • sample_image
  • add_exp
  • image
  • motion_link
  • save_exp
rotate_pitch0.0
rotate_yaw0.0
rotate_roll0.0
blink0.0
eyebrow0.0
wink0.0
pupil_x0.0
pupil_y0.0
aaa0
eee0.0
woo0.0
smile0.00
src_ratio1.00
sample_ratio1.00
sample_parts
crop_factor1.7

Trying to nudge a facial expression with a text prompt is a losing game - you type "slightly more surprised" and get back a completely different face. Expression Editor skips prompting entirely. It gives you a face made of sliders: rotate the head, raise an eyebrow, widen the eyes, curl the smile, and watch the result update live. No sampling, no seed roulette. You're posing a face, not describing one.

Where it fits

This is the entry point of the whole AdvancedLivePortrait pack. Under the hood it drives the same LivePortrait motion model (the one converted from the original liveportrait.github.io research release, via Kijai's port) that the AdvancedLivePortrait node uses to animate video - but here it's collapsed onto a single frame with a control panel bolted on. Use it standalone to fix one photo's expression, or use several of them chained together as keyframes that feed the AdvancedLivePortrait node to build an animation. Either way, this is the node where you actually pose the face; the other nodes in the pack save, load, or render what you build here.

The trick PowerHouseMan's fork adds over vanilla LivePortrait is naming things. LivePortrait's underlying deformation space is a pile of numbers a diffusion nerd could love and nobody else could use. This node found which of those numbers correspond to a recognizable action - pitch, blink, smile - and put a labeled, live-previewed slider on each one.

The inputs that matter

Most of the required fields are self-explanatory sliders: rotate_pitch / rotate_yaw / rotate_roll for head pose, blink / eyebrow / wink / pupil_x / pupil_y for the eyes, and aaa / eee / woo for mouth shape (three viseme-ish positions - think of them as the mouth mid-way through saying those sounds) plus smile, which deliberately goes past 1.0 (up to 1.3) so you can overdrive it. sample_ratio and src_ratio are blend strengths - how much of the edit versus the original comes through - and sample_parts (OnlyExpression / OnlyRotation / OnlyMouth / OnlyEyes / All) restricts a copied expression to one region of the face. crop_factor sets how tightly the face gets cropped before any of this runs.

On the optional side: src_image is the face you're editing. sample_image is a second reference photo - hand it someone smiling and, combined with sample_ratio and sample_parts, you can lift just that smile onto your source. motion_link and add_exp are the two chaining inputs: motion_link links this node into a sequence of other Expression Editor keyframes, and add_exp layers in a previously saved expression (from SaveExpData, LoadExpData, or ExpData) on top of whatever you're dialing in by hand.

Three outputs: image is the live preview - what you're actually looking at while dragging sliders. motion_link carries this node's contribution forward, either into the next Expression Editor in a chain or into the AdvancedLivePortrait node to render. save_exp is the raw expression data, meant to wire into SaveExpData to persist it or into ExpData / PrintExpData to combine or inspect it.

Installing it

The pack is registered with ComfyUI Manager - search ComfyUI-AdvancedLivePortrait and install. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait

Restart ComfyUI. Sample workflows ship inside the pack at custom_nodes/ComfyUI-AdvancedLivePortrait/sample/ - worth opening one before building from scratch.

Where people get stuck

The single most common complaint is "I move a slider and nothing happens." It's almost always this: the preview only updates live if Auto Queue is on (Extra Options → Auto Queue in the ComfyUI menu). Without it you're just editing numbers that won't render until you manually queue a prompt.

A close second: wiring this into a bigger graph and seeing no change downstream. Make sure the image actually flows from Expression Editor into whatever consumes it - it's easy to build the node, admire the live preview, and forget to route its output onward.

On the dependency side: this pack uses InsightFace for face detection, not Kijai's MediaPipe swap from the upstream LivePortrait fork - several people have gone looking for a way to run it on MediaPipe instead (for InsightFace's non-commercial model license reasons) and come up empty; there's no documented path in this pack as of this writing. Worth knowing before you build something commercial on top of it.

Finally, if you hit a SafetensorError: Error while deserializing header: HeaderTooSmall the first time you run the node - that's a corrupted or partially-downloaded checkpoint from the pack's automatic first-run model fetch, not a broken install. Delete the partial file from the pack's checkpoints folder and let it re-download on a stable connection.

CategoryAdvancedLivePortrait

Inputs (20)

NameTypeDefaultDescription
rotate_pitchFLOAT0.0-20–20
rotate_yawFLOAT0.0-20–20
rotate_rollFLOAT0.0-20–20
blinkFLOAT0.0-20–5
eyebrowFLOAT0.0-10–15
winkFLOAT0.00–25
pupil_xFLOAT0.0-15–15
pupil_yFLOAT0.0-15–15
aaaFLOAT0-30–120
eeeFLOAT0.0-20–15
wooFLOAT0.0-20–15
smileFLOAT0.00-0.3–1.3
src_ratioFLOAT1.000–1
sample_ratioFLOAT1.00-0.2–1.2
sample_partsCOMBO5 options: OnlyExpression, OnlyRotation, OnlyMouth, OnlyEyes, All
crop_factorFLOAT1.71.5–2.5
src_imageoptIMAGE
motion_linkoptEDITOR_LINK
sample_imageoptIMAGE
add_expoptEXP_DATA

Outputs (3)

NameTypeDescription
imageIMAGE
motion_linkEDITOR_LINK
save_expEXP_DATA