Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

所有的依赖跟模型都下载好了以后,运行 python -m scripts.inference --inference_config configs/inference/test.yaml直接报错 请问是缺少什么依赖了吗? #264

Open
zhaorongxi opened this issue Mar 6, 2025 · 1 comment

Comments

@zhaorongxi
Copy link

(base) (venv) PS D:\museTalk\MuseTalk> python -m scripts.inference --inference_config configs/inference/test.yaml
add ffmpeg to path
Traceback (most recent call last):
File "D:\soft\python3.10\lib\runpy.py", line 196, in run_module_as_main
return run_code(code, main_globals, None,
File "D:\soft\python3.10\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "D:\museTalk\MuseTalk\scripts\inference.py", line 12, in
from musetalk.utils.utils import get_file_type,get_video_fps,datagen
File "D:\museTalk\MuseTalk\musetalk\utils\utils.py", line 16, in
from musetalk.models.vae import VAE
File "D:\museTalk\MuseTalk\musetalk\models\vae.py", line 1, in
from diffusers import AutoencoderKL
File "D:\museTalk\venv\lib\site-packages\diffusers_init
.py", line 5, in
from .utils import (
File "D:\museTalk\venv\lib\site-packages\diffusers\utils_init
.py", line 38, in
from .dynamic_modules_utils import get_class_from_dynamic_module
File "D:\museTalk\venv\lib\site-packages\diffusers\utils\dynamic_modules_utils.py", line 28, in
from huggingface_hub import cached_download, hf_hub_download, model_info
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (D:\museTalk\venv\lib\site-packages\huggingface_hub_init.py)

@Amoukai
Copy link

Amoukai commented Mar 6, 2025

我也有遇到,以下是詢問Claude 3.7 的回答,我執行之後成功

解決方案
降級 huggingface_hub 到包含 cached_download 函數的版本:

bash
pip uninstall huggingface_hub -y
pip install huggingface_hub==0.13.4
這個版本通常與 diffusers 0.18.0 兼容良好。如果您的 diffusers 版本不同,可能也需要調整:

bash
pip uninstall diffusers -y
pip install diffusers==0.18.0
確保相關依賴的兼容性
為了處理可能的依賴樹問題,建議還檢查以下包的版本:

bash
pip install transformers==4.29.0
pip install accelerate==0.20.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants