How to run LivePortrait on a cloud GPU

Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install LivePortrait from the official repository, download the weights the readme tells you to copy from that page, run inference.py or the Gradio app, and copy the mp4 off the instance before you destroy it. Destroying the instance deletes its disk.

Only animate a face you have the right to use. A driving video is a recording of a person. The readme does not add a permission line. The LICENSE file is the MIT license for the code. It says the models of InsightFace are for non-commercial research purposes only, and that commercial use of the project should remove and replace InsightFace detection models. Read that file before commercial use. This page does not restate the rest of it.

The commands below are copied from the upstream files named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked.

What the readme and the model card say about memory

The LivePortrait readme publishes no GB figure (read 2026-11-12). The model card for the Hub id in the readme download command, read the same day, has license: mit, pipeline_tag: image-to-video, and the model API reported gated: false. The card text has no GB figure. assets/docs/speed.md reports per-module parameter counts, model sizes in MB, and inference times in milliseconds on an RTX 4090, with torch.compile. This page leaves that table in the file. Catalog RTX 4090 is 24 in gpu-prices.json. That is the catalog value, not a LivePortrait requirement.

GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from gpu-prices.json, updated_at 2026-11-12T10:02:26.669Z. GET /v1/public/gpu-catalog the same day (generated_at 2026-11-12T10:02:27.380Z) listed the same names and the same vram_gb values, plus Ascend 910B, which is not in gpu-prices.json and is not listed here. There is no upstream GB cutoff to match these values against. Which listing you can start is on Deploy. This page does not say which listings are available.

Catalog name vram_gb
RTX 2080 8
RTX 3080 10
RTX 2080 Ti 11
RTX 3080 Ti 12
V100 16G 16
A30 24
RTX 3090 24
RTX 4090 24
RTX 4090D 24
RTX 4080 SUPER 32G 32
RTX 5090 32
RTX 5090D 32
V100 32G 32
A100 40G 40
A800 40G 40
A40 48
RTX 4090 48G 48
RTX 4090D 48G 48
RTX A6000 48
NVIDIA RTX PRO 5000 72G 72
RTX PRO 5000 72G 72
A100 80G 80
A800 80G 80
H800 80
RTX 6000D 83
H20 96G 96
RTX PRO 6000 96G 96
RTX PRO 6000 Max-Q 96

Install on Linux

On Deploy, choose Raw GPU. The readme says the system needs git, conda, and FFmpeg. inference.py raises ImportError if ffmpeg -version fails, and the message names ffmpeg and ffprobe. The conda line in assets/docs/how-to-install-ffmpeg.md, copied:

conda install ffmpeg

The Ubuntu block in that same doc, copied:

sudo apt install ffmpeg
sudo apt install libsox-dev
conda install -c conda-forge 'ffmpeg<7'

If conda is not on PATH, use how to set up a conda environment on a cloud GPU. This page did not check whether the Raw GPU image already has conda.

The clone and the environment, copied from the readme. Humans mode is the path below. The readme says the CUDA-version step is optional if you only want Humans mode.

git clone https://github.com/KlingTeam/LivePortrait
cd LivePortrait
conda create -n LivePortrait python=3.10
conda activate LivePortrait
pip install -r requirements.txt

requirements.txt includes requirements_base.txt and does not pin torch (read 2026-11-12). The optional CUDA section prints three torch examples and says to visit the PyTorch site if your CUDA version is not listed. The examples, copied:

pip install torch==1.10.1+cu111 torchvision==0.11.2 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu118
pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121

How to install a specific PyTorch CUDA version says to use an index that is not newer than the CUDA Version in the nvidia-smi header. This page did not run those three wheels.

Weights

The readme download section says to copy a huggingface-cli download line. That line sets --local-dir pretrained_weights and excludes *.git*, README.md, and docs. Copy the line from the readme. This page does not copy the Hub id on it. The model API fields above were read from that id. How to download a Hugging Face model is the hf download reference. cloudgpu-net is not in the LivePortrait readme. The download speed guide says to leave it off during pip, then turn it on for a weight download. The readme also points at two other download locations. This page follows the Hugging Face line and does not copy those links.

The huggingface_hub comment in that section is # !pip install -U "huggingface_hub[cli]". It was not run.

Inference

The readme humans command, copied:

python inference.py

The readme says a successful run writes animations/s6--d0_concat.mp4, and that the file includes the driving video, the input image or video, and the generated result. src/config/argument_config.py defaults source to assets/examples/source/s0.jpg, driving to assets/examples/driving/d0.mp4, and output_dir to animations/. src/live_portrait_pipeline.py builds {basename(source)}--{basename(driving)}_concat.mp4 under output_dir. Those defaults and the filename in the readme are not the same pair of basenames. This page did not run the script, so it does not decide which file appears. Copy the animations directory.

The readme command for a chosen source and driving video, copied:

python inference.py -s assets/examples/source/s9.jpg -d assets/examples/driving/d0.mp4

For your own driving video, the readme says to crop it to a 1:1 aspect ratio, with 512x512 or 256x256 as the examples, or to pass --flag_crop_driving_video, and to make the first frame a frontal face with a neutral expression. The command it prints:

python inference.py -s assets/examples/source/s9.jpg -d assets/examples/driving/d13.mp4 --flag_crop_driving_video

Animals mode, the readme says, is only tested on Linux and Windows with an NVIDIA GPU. It needs the X-Pose op. The build and the inference command, copied:

cd src/utils/dependencies/XPose/models/UniPose/ops
python setup.py build install
cd -
python inference_animals.py -s assets/examples/source/s39.jpg -d assets/examples/driving/wink.pkl --driving_multiplier 1.75 --no_flag_stitching

The readme says that animals command writes animations/s39--wink_concat.mp4. This page did not run it.

Gradio

The readme humans command, copied:

python app.py

src/config/argument_config.py defaults server_name to 127.0.0.1, server_port to 8890, and share to False. app.py passes those three into demo.launch. On your own computer:

ssh -N -L 8890:127.0.0.1:8890 -p <ssh-port> <ssh-user>@<ssh-host>

Then open http://localhost:8890. How to use SSH port forwarding is the forwarding reference. This page did not run app.py.

The readme says you can pass --server_port, --share, and --server_name. It also documents --flag_do_torch_compile and says that flag is not supported on Windows and macOS. The same paragraph gives a duration and a speed change. This page leaves that sentence in the readme.

Getting Started does not include ComfyUI steps. A later community table links ComfyUI projects. This page does not copy those projects. For the ComfyUI template itself, see how to choose a rental GPU for ComfyUI.

When it fails

CUDA out of memory. The readme and the model card publish no GB cutoff. Then use how to fix CUDA out of memory on a cloud GPU.

“CUDA error: no kernel image is available” on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32 GB. That is the catalog value, not a LivePortrait requirement. The torch examples in the readme are cu111, cu118, and cu121. The RTX 5090 guide says that card needs a PyTorch build for CUDA 12.8 or newer. The readme says to use the PyTorch site when the CUDA version is not in its list. This page did not re-test the three example wheels on an RTX 5090.

FFmpeg missing. inference.py and app.py raise ImportError when ffmpeg -version fails. The conda and apt lines above are the Linux lines in assets/docs/how-to-install-ffmpeg.md.

Save the mp4, then destroy

Copy the animations directory before you destroy the instance. Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed. The billing rule is on the pricing page. Prices are not copied here.

Frequently asked questions

How much VRAM does LivePortrait publish?

The LivePortrait readme and the model card for the Hub id in the readme download command publish no GB figure (read 2026-11-12). assets/docs/speed.md reports per-module sizes in MB and inference times in milliseconds on an RTX 4090. Those figures are not a VRAM requirement, and this page leaves that table in the file. Catalog RTX 4090 is 24 in gpu-prices.json. That is the catalog value, not a LivePortrait requirement. This page does not mark any catalog vram_gb as enough or not enough. Which listing you can start is on https://cloudgpu.app/deploy.

How do I animate a portrait from a driving video?

Run python inference.py, or pass -s and -d as the readme shows. The readme says a successful run of the default command writes animations/s6--d0_concat.mp4. src/config/argument_config.py defaults the source to s0.jpg and the driving video to d0.mp4, and output_dir to animations/. src/live_portrait_pipeline.py names the file from those basenames. This page did not run the script. Only animate a face you have the right to use.

Does the official LivePortrait readme document ComfyUI?

The Getting Started section does not include ComfyUI steps. A later community table links ComfyUI projects. This page does not copy those projects. The Gradio command is python app.py. argument_config.py defaults server_name to 127.0.0.1 and server_port to 8890.

Can the result be used commercially?

The LICENSE file is the MIT license for the code. It says the models of InsightFace are for non-commercial research purposes only, and that commercial use of the project should remove and replace InsightFace detection models. Read that file before commercial use. Copy the animations directory before you destroy the instance. The terms say data on local instance storage is permanently deleted when the instance is destroyed.

Sources (read 2026-11-12, Asia/Shanghai)

  • LivePortrait readme (clone, Python 3.10, torch examples, inference commands, Gradio, community ComfyUI table): https://github.com/KlingTeam/LivePortrait/blob/main/readme.md
  • assets/docs/how-to-install-ffmpeg.md (conda install ffmpeg, Ubuntu apt and conda-forge lines): that repository
  • src/config/argument_config.py (source s0.jpg, driving d0.mp4, output_dir animations/, server 127.0.0.1 port 8890): that repository
  • src/live_portrait_pipeline.py (concat filename from basenames): that repository
  • inference.py and app.py (FFmpeg check, Gradio launch arguments): that repository
  • assets/docs/speed.md (MB sizes and millisecond times on an RTX 4090; left in the file): that repository
  • LICENSE (MIT for the code; InsightFace models for non-commercial research; replace them for commercial use): that repository
  • Model API for the Hub id in the readme download line (gated: false, license: mit, pipeline_tag: image-to-video, no GB figure)
  • Public GPU memory: https://cloudgpu.app/gpu-prices.json and https://cloudgpu.app/v1/public/gpu-catalog. GET /v1/public/compute-capabilities returned feature flags and no GPU list.

Cards you can start are on the Deploy page. Prices are on https://cloudgpu.app/pricing and are not repeated here.

Last updated: 2026-11-12 (Asia/Shanghai).