LiveTalking icon indicating copy to clipboard operation
LiveTalking copied to clipboard

使用musetalk训练数字人模型报错

Open tangyong2000 opened this issue 4 months ago • 4 comments

命令:python genavatar_musetalk.py --avatar_id musetalk_avatar1 --file E:\1.mp4 报错: E:\anaconda3\envs\nerfstream\lib\site-packages\mmengine\optim\optimizer\zero_optimizer.py:11: DeprecationWarning: TorchScript support for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the torch.compile optimizer instead. from torch.distributed.optim import
Traceback (most recent call last):

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

请问这个问题怎么解决,我是用的Windows系统。如果可以,麻烦大佬能发一下依赖包

tangyong2000 avatar Jul 31 '25 10:07 tangyong2000

numpy 降级到1.xx版本

lipku avatar Jul 31 '25 10:07 lipku

pip install numpy==1.24.0 这个版本可以

jefferyglt avatar Aug 01 '25 01:08 jefferyglt

pip install numpy==1.24.0 这个版本可以

牵一发动全身,opencv-python==4.6.0.66 opencv-python-headless==4.6.0.66 numpy==1.23.5 numba==0.58 scikit-image==0.24.0 llvmlite==0.41.1 scipy==1.10.0,现在好多都有问题了。大佬能不能把你的所有依赖版本发一下

tangyong2000 avatar Aug 01 '25 02:08 tangyong2000

numpy 降级到1.xx版本

(nerfstream) E:\1yiji\LiveTalking-main>python genavatar_musetalk.py --avatar_id musetalk_avatar2 --file E:\1yiji\1.mp4 E:\anaconda3\envs\nerfstream\lib\site-packages\torch\cuda_init_.py:129: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at C:\cb\pytorch_1000000000000\work\c10\cuda\CUDAFunctions.cpp:108.) return torch._C.cuda_getDeviceCount() > 0 E:\anaconda3\envs\nerfstream\lib\site-packages\mmengine\optim\optimizer\zero_optimizer.py:11: DeprecationWarning: TorchScript support for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the torch.compile optimizer instead. from torch.distributed.optim import
Loads checkpoint by local backend from path: ./models/dwpose/dw-ll_ucoco_384.pth E:\anaconda3\envs\nerfstream\lib\site-packages\mmengine\runner\checkpoint.py:347: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. checkpoint = torch.load(filename, map_location=map_location) load unet model from models\musetalkV15\unet.pth E:\1yiji\LiveTalking-main\musetalk\models\unet.py:44: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. weights = torch.load(model_path) if torch.cuda.is_available() else torch.load(model_path, map_location=self.device) E:\1yiji\LiveTalking-main\musetalk\utils\face_parsing\resnet.py:83: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. state_dict = torch.load(model_path) #modelzoo.load_url(resnet18_url) E:\1yiji\LiveTalking-main\musetalk\utils\face_parsing_init
.py:67: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. net.load_state_dict(torch.load(model_pth, map_location=torch.device('cpu'))) extracting landmarks... reading images... 100%|████████████████████████████████████████████████████████████████████████████████| 919/919 [00:12<00:00, 71.72it/s] get key_landmark and face bounding boxes with the default value 0%| | 0/919 [00:00<?, ?it/s]E:\anaconda3\envs\nerfstream\lib\site-packages\mmdet\models\layers\se_layer.py:158: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead. with torch.cuda.amp.autocast(enabled=False): E:\anaconda3\envs\nerfstream\lib\site-packages\mmdet\models\backbones\csp_darknet.py:118: FutureWarning: torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead. with torch.cuda.amp.autocast(enabled=False): 100%|████████████████████████████████████████████████████████████████████████████████| 919/919 [33:01<00:00, 2.16s/it] bbox_shift parameter adjustment************** Total frame:「919」 Manually adjust range : [ -9~9 ] , the current value: 0


形象文件里只有avator_info.json和full_imgs的切片图片。我理解到的似乎让我修改某个数值然后重新运行?能否麻烦帮忙看一下,谢谢

tangyong2000 avatar Aug 05 '25 01:08 tangyong2000