仓库
https://github.com/TMElyralab/MuseTalk
安装
1. 在项目中建一个conda环境,便于移植
conda create --prefix ./.env python==3.10
conda activate conda activate ./.env
2. 安装ffmpeg
apt install ffmpeg
3. 模型下载
执行完模型下载sh ./download_weights.sh后确认一下是否全部下载成功,下面这样就是没有完全下载成功dwpose与syncnet下没有文件。
bash
(.env) root@C.22771731:/workspace/live_human$ tree models/
models/
├── dwpose
├── face-parse-bisent
│ ├── 79999_iter.pth
│ └── resnet18-5c106cde.pth
├── musetalk
│ └── musetalk.json
├── musetalkV15
│ └── musetalk.json
├── sd-vae
│ ├── config.json
│ └── diffusion_pytorch_model.bin
├── syncnet
└── whisper
├── config.json
├── preprocessor_config.json
└── pytorch_model.bin官方的模型文件目录如下:
bash
./models/
├── musetalk
│ └── musetalk.json
│ └── pytorch_model.bin
├── musetalkV15
│ └── musetalk.json
│ └── unet.pth
├── syncnet
│ └── latentsync_syncnet.pt
├── dwpose
│ └── dw-ll_ucoco_384.pth
├── face-parse-bisent
│ ├── 79999_iter.pth
│ └── resnet18-5c106cde.pth
├── sd-vae
│ ├── config.json
│ └── diffusion_pytorch_model.bin
└── whisper
├── config.json
├── pytorch_model.bin
└── preprocessor_config.json如何下载不完整属于正常现象,是网络问题,下载过程中会有如下日志,意思是文件下载了一部分,没有下载完整。
bash
OSError: Consistency check failed: file should be of size 1488019828 but has size 1187647746 (latentsync_syncnet.pt).
This is usually due to network issues while downloading the file. Please retry with `force_download=True`.可以多执行几次sh ./download_weights.sh,每次又会多下载几个。实在下载不了的,可以手动下载,放到指定的位置即可:
- Download our trained weights
- Download the weights of other components:
导入环境
可以通过导入以下conda环境实现安装。
conda env create -f environment.yml
问题
1. 缺少安装软件依赖
bash
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
triton 2.0.0 requires cmake, which is not installed.
triton 2.0.0 requires lit, which is not installed.解决:
conda install cmake lit
2. MKL 2024.1与pytorch==2.0.1 不兼容
bash
(.env) root@C.22771731:/workspace/live_human$ mim install mmengine
Traceback (most recent call last):
File "/workspace/live_human/.env/bin/mim", line 8, in <module>
rv = self.invoke(ctx)
File "/workspace/live_human/.env/lib/python3.10/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/workspace/live_human/.env/lib/python3.10/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/workspace/live_human/.env/lib/python3.10/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/workspace/live_human/.env/lib/python3.10/site-packages/mim/commands/install.py", line 72, in cli
exit_code = install(list(args), index_url=index_url, is_yes=is_yes)
File "/workspace/live_human/.env/lib/python3.10/site-packages/mim/commands/install.py", line 128, in install
install_args += ['-f', get_mmcv_full_find_link(mmcv_base_url)]
File "/workspace/live_human/.env/lib/python3.10/site-packages/mim/commands/install.py", line 165, in get_mmcv_full_find_link
torch_v, cuda_v = get_torch_cuda_version()
File "/workspace/live_human/.env/lib/python3.10/site-packages/mim/utils/utils.py", line 340, in get_torch_cuda_version
raise err
File "/workspace/live_human/.env/lib/python3.10/site-packages/mim/utils/utils.py", line 338, in get_torch_cuda_version
import torch
File "/workspace/live_human/.env/lib/python3.10/site-packages/torch/__init__.py", line 229, in <module>
from torch._C import * # noqa: F403
ImportError: /workspace/live_human/.env/lib/python3.10/site-packages/torch/lib/libtorch_cpu.so: undefined symbol: iJIT_NotifyEvent**解决:**将mkl版本降低到2024.0.0
bash
conda install mkl=2024.0.0