下载源码并安装依赖

git clone http://github.com/OpenTalker/SadTalker.git

cd SadTalker 

conda create -n sadtalker python=3.8

conda activate sadtalker

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url http://download.pytorch.org/whl/cu113

conda install ffmpeg

pip install -r requirements.txt

自动下载或者手动下载模型依赖

bash scripts/download_models.sh

启动命令

python inference.py --driven_audio ./examples/driven_audio/bus_chinese.wav --source_image ./examples/source_image/full_body_1.png --checkpoint_dir ./checkpoints --result_dir ./results --pose_style 0 --batch_size 2 --size 256 --expression_scale 1.0 --enhancer gfpgan   --preprocess crop  --still --net_recon resnet5
0 --focal 1015 --center 112 --camera_d 10 --z_near 5 --z_far 15

效果比较好的启动命令

pip install realesrgan
python inference.py --driven_audio ./yuchang/1.m4a --source_image ./yuchang/1.jpg --checkpoint_dir ./checkpoints --result_dir ./yuchang --pose_style 0 --batch_size 2 --size 512 --expression_scale 1.5 --enhancer gfpgan --background_enhancer realesrgan --preprocess crop --still --net_recon resnet50 --focal 1015 --center 112 --camera_d 10 --z_near 5 --z_far 15 
本站无任何商业行为
个人在线分享 » 用SadTalker搭建数字的步骤
E-->