fofr / live-portrait

Portrait animation using a driving video source

  • Public
  • 72.4K runs
  • L40S
  • GitHub
  • Paper
  • License

Input

*file
Preview
face_image

An image with a face

*file
Preview

A video to drive the animation

integer

The maximum number of frames to load from the driving video. Set to 0 to use all frames.

Default: 128

integer

Select every nth frame from the driving video. Set to 1 to use all frames.

Default: 1

integer
(minimum: 64, maximum: 2048)

Size of the output image

Default: 512

number
(minimum: 1, maximum: 4)

Scaling factor for the face

Default: 2.3

number
(minimum: -1, maximum: 1)

Horizontal shift ratio

Default: 0

number
(minimum: -1, maximum: 1)

Vertical shift ratio

Default: -0.12

boolean

Enable lip zero

Default: true

boolean

Enable eye retargeting

Default: false

number
(minimum: 0.01, maximum: 10)

Multiplier for eye retargeting

Default: 1

boolean

Enable lip retargeting

Default: false

number
(minimum: 0.01, maximum: 10)

Multiplier for lip retargeting

Default: 1

boolean

Enable stitching

Default: true

boolean

Use relative positioning

Default: true

Output

Generated in

Run time and cost

This model costs approximately $0.079 to run on Replicate, or 12 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 81 seconds. The predict time for this model varies significantly based on the inputs.

Readme

Efficient Portrait Animation with Stitching and Retargeting Control

Example driving videos

Try these videos:

https://github.com/KwaiVGI/LivePortrait/tree/main/assets/examples/driving

License

LivePortrait uses InsightFace buffalo_l models, meaning this model cannot be used commercially. The LivePortrait code and weights are released under an MIT license.

Implementation

This model uses the ComfyUI custom node created by Kijai:

https://github.com/kijai/ComfyUI-LivePortraitKJ

And the safetensor weights they converted:

https://huggingface.co/Kijai/LivePortrait_safetensors/tree/main