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

怎么才能调用本地下载好的模型,而不是通过 hf 或者 ms 联网搜索? #2345

Open
piwawa opened this issue Dec 31, 2024 · 0 comments
Labels
question Further information is requested

Comments

@piwawa
Copy link

piwawa commented Dec 31, 2024

image

我已经通过 hf 参数自动下载过一次模型了,但是每次运行以下代码还会联网 download 一次,能不能直接指定文件路径不调用下载?

这样传入参数每次都报错!

        self.model = AutoModel(
            model =/home/111/.cache/huggingface/hub/models--FunAudioLLM--SenseVoiceSmall“,
            # vad_model = vad_model,
            # vad_kwargs=vad_kwargs,
            device = device,
            disable_update = disable_update
        )
[111@zernithos]$ python asr.py
funasr version: 1.1.6.
Traceback (most recent call last):
  File "asr.py", line 29, in <module>
    asr = Fun_ASR()
  File "asr.py", line 6, in __init__
    self.model = AutoModel(
  File "/home/111/miniconda3/envs/hw5/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 124, in __init__
    model, kwargs = self.build_model(**kwargs)
  File "/home/111/miniconda3/envs/hw5/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 218, in build_model
    assert model_class is not None, f'{kwargs["model"]} is not registered'
AssertionError: /home/111/.cache/huggingface/hub/models--FunAudioLLM--SenseVoiceSmall is not registered
@piwawa piwawa added the question Further information is requested label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant