modelscope / FunASR

A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
https://www.funasr.com
Other
7.08k stars 755 forks source link

使用funasr 0.8.8 export onnx的时候报错 #1404

Closed David19970306 closed 8 months ago

David19970306 commented 9 months ago

python -m funasr.export.export_model --model-name damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch --export-dir ./export --type onnx --quantize false

export model: damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch

2024-02-29 15:24:44,705 - modelscope - INFO - PyTorch version 2.2.1 Found. 2024-02-29 15:24:44,706 - modelscope - INFO - Loading ast index from /home/cce/work/.cache/modelscope/ast_indexer 2024-02-29 15:24:44,737 - modelscope - INFO - Loading done! Current index file version is 1.11.1, with md5 1502ee5d97b61c711e7b10e5f40c2ab8 and a total number of 956 components indexed /home/cce/work/miniconda3/envs/Qwen/lib/python3.9/site-packages/transformers/utils/generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( /home/cce/work/miniconda3/envs/Qwen/lib/python3.9/site-packages/transformers/utils/generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( /home/cce/work/miniconda3/envs/Qwen/lib/python3.9/site-packages/transformers/utils/generic.py:309: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( 2024-02-29 15:24:46,764 - modelscope - WARNING - Model revision not specified, use revision: v2.0.0 Traceback (most recent call last): File "/home/cce/work/miniconda3/envs/Qwen/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/cce/work/miniconda3/envs/Qwen/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/cce/work/miniconda3/envs/Qwen/lib/python3.9/site-packages/funasr/export/export_model.py", line 296, in export_model.export(model_name) File "/home/cce/work/miniconda3/envs/Qwen/lib/python3.9/site-packages/funasr/export/export_model.py", line 190, in export mode = config_data['model']['model_config']['mode'] KeyError: 'model_config'

LauraGPT commented 8 months ago

funasr-1.0 export onnx:

https://github.com/alibaba-damo-academy/FunASR?tab=readme-ov-file#export-onnx