Nodes/ComfyUI-AdvancedLivePortrait/Advanced Live Portrait (PHM)
ComfyUI Node Runs on cloud

Advanced Live Portrait (PHM)

The node that actually renders the animation

By PowerHouseMan·Created 2 years ago·Updated 2 years ago· 2,668
Advanced Live Portrait (PHM)
  • src_images
  • motion_link
  • driving_images
  • images
retargeting_eyes0.00
retargeting_mouth0.00
crop_factor1.7
turn_ontrue
tracking_src_vidfalse
animate_without_vidfalse
command

If Expression Editor is the puppeteer's control panel, this is the camera. It's the node that actually produces frames: feed it a source face and either a driving video, a chain of Expression Editor keyframes, or both, and it renders the motion. No diffusion sampling involved - this is a dedicated motion-transfer model, which is why it's fast and doesn't need the VRAM a Face Detailer round-trip does.

What it's actually doing

The pack does three distinct jobs, all through this one node: edit a still photo's expression, transfer facial motion from a driving video onto a source face or video, or animate a still using nothing but a chain of Expression Editor keyframes and no driving footage at all. A 2024-08-21 update added a fourth trick - tracking the face inside the source video itself, so you don't need a separate clip to drive it.

Mechanically, it walks a motion_link chain built by one or more upstream ExpressionEditor nodes - each one a waypoint - and warps src_images toward each waypoint using the same LivePortrait motion model. When driving_images is connected, it extracts motion from that footage instead of (or alongside) the keyframe chain and retargets it onto the source. animate_without_vid tells the node explicitly to render from the motion_link chain with no driving footage present, and tracking_src_vid turns on the face-tracking-within-source-video mode from that update.

There's also a command field - a multiline string the README references via a workflow2_advanced.json sample, described as a way to script a sequence of motions and timings ("[Motion index] = [Changing frame length] : [Length of frames waiting for next motion]") without hand-wiring a dozen Expression Editor nodes. The README shows the syntax as a screenshot rather than spelling it out in text, so honestly: open workflow2_advanced.json from the pack's sample/ folder and read it directly rather than guessing at the format from the README alone.

The inputs that matter

retargeting_eyes and retargeting_mouth (0–1) control how much of the driving motion's eye and mouth movement gets applied versus keeping the source's own - useful when a driving video's blink rate or mouth shape doesn't suit your source face. crop_factor matches the same setting on Expression Editor. turn_on is a master switch - flip it off while you're still wiring the rest of the graph so you're not re-rendering on every change. tracking_src_vid and animate_without_vid toggle the two rendering modes above, and command is the scripting field.

On the optional side: src_images is the face (or video) being driven, motion_link is the keyframe chain from Expression Editor, and driving_images is the footage to extract motion from. The single output, images, is the rendered sequence - wire it into a Save Image or Video Combine node depending on what you built.

Installing it

Registered with ComfyUI Manager - search ComfyUI-AdvancedLivePortrait. Or:

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

Restart. Grab a starting point from the pack's sample/ folder rather than wiring this from scratch - the driving-video and keyframe-chain setups both have a few connections that are easy to get backwards on a first attempt.

Where people get stuck

The limitation that comes up most in the wild: this node only tracks one face. If your source image has a group of people, there's no built-in index or selection to pick which face gets driven - people work around it by segmenting each face out with a detector, running it through separately, and compositing the results back, which is real DIY work, not a flag you flip.

Second: "I changed the sliders upstream and nothing renders here." Make sure src_images and motion_link are actually connected end to end - it's a common mistake to build the Expression Editor chain, get a nice live preview there, and forget to route the image into this node too.

For live preview while iterating, the same rule as Expression Editor applies: turn on Auto Queue (Extra Options menu) or you're only editing values, not rendering them.

And the shared dependency gotcha: this pack relies on InsightFace for face detection rather than the MediaPipe alternative Kijai's upstream LivePortrait fork offers - no documented swap exists here as of this writing, so factor InsightFace's non-commercial model license in if this is headed into a commercial product. If you hit a SafetensorError: HeaderTooSmall on first run, that's a partially-downloaded model checkpoint, not a bad install - delete it and let the automatic download retry.

One honest positive to close on: people who've compared this against face-detailer-style workflows consistently note it doesn't degrade the surrounding image and runs noticeably faster (peak VRAM in the low single digits of GB in third-party benchmarks) - the tradeoff is it's less documented online than its quality would suggest, so lean on the sample workflows over searching for tutorials.

CategoryAdvancedLivePortrait

Inputs (10)

NameTypeDefaultDescription
retargeting_eyesFLOAT0.000–1
retargeting_mouthFLOAT0.000–1
crop_factorFLOAT1.71.5–2.5
turn_onBOOLEANtrue
tracking_src_vidBOOLEANfalse
animate_without_vidBOOLEANfalse
commandSTRING
src_imagesoptIMAGE
motion_linkoptEDITOR_LINK
driving_imagesoptIMAGE

Outputs (1)

NameTypeDescription
imagesIMAGE