- install CUDA toolkit, see here
- if not already done, add cuda bin to path by appending
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}to the end of~/.bashrc, then dosource ~/.bashrcto refresh. Finally verify withnvcc -V. - install ffmpeg
sudo apt install ffmpeg- install rustup compiler
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shcd path/to/diffusions
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtNote: LivePortrait requirements include transformers, exclude that!
download LivePortrait model (see here)
Note that the downloaded models need to be put into ./LivePortrait/pretrained_weights, the default model directory can be modified in ./LivePortrait/src/config/inference_config.py, but not necessary. For some reason, the huggingface repo does not contain all the model files, you can just put the downloaed liveportrait models, the script will automatically download the rest, more complete version of models.
huggingface-cli download KwaiVGI/LivePortrait --local-dir ./models/live_portrait_hf --exclude "*.git*" "README.md" "docs"
download DensePose model (see here)
wget https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/165712039/model_final_162be9.pklsudo apt install nvidia-modprobe
sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm