开发者社区 > ModelScope模型即服务 > 自然语言处理 > 正文

modelscope-funasr直接运行这个出现错误,如何解决?

modelscope-funasr直接运行 bash infer_from_localme.sh 出现错误,如何解决?
Error executing job with overrides: ['++init_param=/home/jqxxuser/FunASR-main/examples/industrial_data_pretraining/paraformer/modelscope_models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.pt', '++tokenizer_conf.token_list=/home/jqxxuser/FunASR-main/examples/industrial_data_pretraining/paraformer/modelscope_models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/tokens.json', '++frontend_conf.cmvn_file=/home/jqxxuser/FunASR-main/examples/industrial_data_pretraining/paraformer/modelscope_models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/am.mvn', '++input=https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav', '++output_dir=./outputs/debug', '++device=cuda:0']
Traceback (most recent call last):
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/funasr/bin/inference.py", line 31, in
main_hydra()
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
_run_app(
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/_internal/utils.py", line 457, in _run_app
run_and_report(
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/_internal/utils.py", line 458, in
lambda: hydra.run(
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/internal/hydra.py", line 132, in run = ret.return_value
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/core/utils.py", line 260, in return_value
raise self._return_value
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/hydra/core/utils.py", line 186, in run_job
ret.return_value = task_function(task_cfg)
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/funasr/bin/inference.py", line 25, in main_hydra
model = AutoModel(kwargs)
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/funasr/auto/auto_model.py", line 106, in init
model, kwargs = self.build_model(
kwargs)
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/funasr/auto/auto_model.py", line 202, in build_model
load_pretrained_model(
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/funasr/train_utils/load_pretrained_model.py", line 67, in load_pretrained_model
src_state = torch.load(path, map_location=map_location)
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/torch/serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args)
File "/home/jqxxuser/miniconda3/envs/funasr/lib/python3.8/site-packages/torch/serialization.py", line 1258, in _legacy_load
magic_number = pickle_module.load(f,
pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.

展开
收起
三分钟热度的鱼 2024-04-17 20:53:37 71 0
1 条回答
写回答
取消 提交回答
  • 你在报错的那个地方,设置一个断点,从错误来看是模型不对。此回答整理自钉群“modelscope-funasr社区交流”

    2024-04-17 21:22:31
    赞同 1 展开评论 打赏

包含命名实体识别、文本分类、分词、关系抽取、问答、推理、文本摘要、情感分析、机器翻译等多个领域

热门讨论

热门文章

相关电子书

更多
视觉AI能力的开放现状及ModelScope实战 立即下载
ModelScope助力语音AI模型创新与应用 立即下载
低代码开发师(初级)实战教程 立即下载