LivePortrait Cropper
The node that decides whose face you're animating
- pipeline
- cropper
- source_image
- cropped_image
- crop_info
Before LivePortrait can animate a face, it needs to find the face, center it, and compute the geometry that lets the result be pasted back later. That's this node's entire job. It's not the flashy part of the workflow - it's the part that silently decides whether the animation is watchable or garbage.
The confusing thing about the name: LivePortrait Cropper doesn't load any model itself. It takes a cropper from one of the three loader nodes (InsightFace, MediaPipe, or FaceAlignment) and a pipeline from the model loader, and actually runs the detection-and-crop pass on your source image.
What it does under the hood
For every source frame it calls the detector's crop_single_image, which finds the face, computes the affine transform that maps the full frame to a normalized crop, and returns a 256×256 face image. Then - this is the bit that makes it fast - it runs the pipeline's source prep right there: extracting the appearance features, keypoints, and rotation that the Process node would otherwise redo. All of that goes into the crop_info output. You get a head start on inference for free.
The inputs you'll actually touch
- scale (default 2.3) - how tight the crop is around the face. Bigger = closer. This is the dial for "the head is too small/large in frame."
- vy_ratio (default -0.125) and vx_ratio (default 0) - shift the crop window up/down and left/right. The -0.125 default biases the crop upward so the forehead has breathing room.
- rotate (default on) - rotates the crop so a tilted head sits upright. Leave it on unless your source is already perfectly aligned and you want to avoid the extra transform.
- dsize (default 512) - the internal crop resolution. 512 is plenty for LivePortrait.
- face_index (default 0) and face_index_order - which face to animate when there are several. The order options (
large-small,left-right,distance-from-retarget-face, …) let you say "pick the biggest face" instead of guessing indices. If you're driving a two-person photo, this is where you pick the target.
Outputs
- cropped_image - the 256×256 normalized face batch, what the pipeline actually consumes.
- crop_info - the dict holding the per-frame crop transforms, detected landmarks, and the precomputed source features. It wires into LivePortraitProcess, and also into LivePortraitRetargeting when you're doing eye/lip control.
Common issues
- Black cropped frames with a warning - a source frame where no face was detected. The node logs
No face detected on frame X, skippingand pads with a zero image so the batch doesn't break. If every frame is black, the detector isn't finding the face at all (face too small, extreme angle, or the wrong detector for the job - MediaPipe's short-range blazeface misses small faces that the FaceAlignment cropper'sblazeface_back_cameracatches). - The head-zooming effect - a crop that shifts scale between frames, which reads as the face ballooning. It's mostly a source-video stability problem: keep the camera steady, and let the Process node's relative motion modes smooth the rest. People used to pre-stabilize driving video in DaVinci Resolve before this rework; with the current relative modes it's usually not necessary.
- Wrong face in a group shot - fix with
face_indexplus a sensibleface_index_order, or switch to a detector with a better detection threshold (the InsightFace loader exposesdetection_threshold).
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | LIVEPORTRAITPIPE | — | |
| cropper | LPCROPPER | — | |
| source_image | IMAGE | — | |
| dsize | INT | 51264–2048 | — |
| scale | FLOAT | 2.301–4 | — |
| vx_ratio | FLOAT | 0.000-1–1 | — |
| vy_ratio | FLOAT | -0.125-1–1 | — |
| face_index | INT | 00–100 | — |
| face_index_order | COMBO | 7 options: large-small, left-right, right-left, top-bottom, bottom-top, small-large, +1 | |
| rotate | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| cropped_image | IMAGE | — |
| crop_info | CROPINFO | — |