MuseTalk icon indicating copy to clipboard operation
MuseTalk copied to clipboard

No module named 'mmcv._ext' 怎么解决

Open gangxu822 opened this issue 2 months ago • 2 comments

from mmpose.models.builder import build_pose_estimator

File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmpose/models/init.py", line 8, in from .heads import * # noqa File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmpose/models/heads/init.py", line 11, in from .transformer_heads import EDPoseHead File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmpose/models/heads/transformer_heads/init.py", line 2, in from .edpose_head import EDPoseHead File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmpose/models/heads/transformer_heads/edpose_head.py", line 14, in from mmcv.ops import MultiScaleDeformableAttention File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmcv/ops/init.py", line 3, in from .active_rotated_filter import active_rotated_filter File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in ext_module = ext_loader.load_ext( File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/opt/nas/p/conda/envs/MuseTalk/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named 'mmcv._ext'

gangxu822 avatar Nov 04 '25 08:11 gangxu822

If you are running on mac, there is a repo which showcases how to run this. When I tried it was instanely slow though on macos, since this repo doesn't support MPS too well. Most of this repo requires CUDA.

https://github.com/rrfunde/MuseTalk/blob/61ef17f0fc5b522ef660ac08a9b81de374b630e5/MACOS_COMPATIBILITY_NOTE.md?plain=1#L205

AhmadAFS1 avatar Nov 16 '25 23:11 AhmadAFS1

I faced the same error you have above on a GPU machine with CUDA and I was able to solve it by downgrading the mmcv package and used this version instead of 2.1.0:

mim install "mmcv==2.0.1"

hanee-shousha avatar Nov 26 '25 17:11 hanee-shousha

I solved it by building from source

ajeema avatar Dec 01 '25 02:12 ajeema

mim install "mmcv==2.0.1"

not work

chenyujie2580 avatar Dec 02 '25 01:12 chenyujie2580

I solved it by building from source

not work

chenyujie2580 avatar Dec 02 '25 01:12 chenyujie2580