Skip to content

FunAudioLLM/Fun-ASR-Nano-2512 AssertionError: FunASRNano is not registered #2757

@Zyx-A

Description

@Zyx-A

Notice: In order to resolve issues more efficiently, please raise issue following the template.
(注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

❓ Questions and Help

Before asking:

  1. search the issues.
  2. search the docs.

What is your question?

无论是直接拉取registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-gpu-0.2.1使用二进制,还是基于cd /workspace/FunASR && pip install -e ./

cmake -DCMAKE_BUILD_TYPE=release .. \
    -DONNXRUNTIME_DIR=/workspace/onnxruntime-linux-x64-1.14.0 \
    -DFFMPEG_DIR=/workspace/ffmpeg-master-latest-linux64-gpl-shared \
    --debug-output \
    && make -j 8

进行源码编译安装,都会报AssertionError: FunASRNano is not registered,请问各位大佬,这个问题该如何解决?

我已按 #2741 方法尝试,及 FunAudioLLM/Fun-ASR#21 (comment) 都未能解决。

甚至尝试修改 FunASR/funasr/models/fun_asr_nano/model.py 6ebf4f3 代码,注册并绕过Qwen3的检查,也会报错。

修改的代码内容如下:
 12 #from funasr import AutoModel

 45             #model = AutoModel(model=audio_encoder, model_revision="master")

 73         llm_load_kwargs = llm_conf.get("load_kwargs", {})
 74 
 75         # model_root_dir = kwargs.get("model_path", "")
 76         # model_root_dir = "/workspace/models/FunAudioLLM/Fun-ASR-Nano-2512/"
 77         # if init_param_path and not os.path.isabs(init_param_path):
 78         #     full_llm_path = os.path.join(model_root_dir, init_param_path)
 79         #     if os.path.exists(full_llm_path):
 80         #         init_param_path = full_llm_path
 81 
 82         # Resolve relative path using model_path from kwargs
 83         # model_root_dir = kwargs.get("model_path", "")
 84         # if init_param_path and model_root_dir and not os.path.isabs(init_param_path):
 85         #     candidate_path = os.path.join(model_root_dir, init_param_path)
 86         #     if os.path.isdir(candidate_path):
 87         #         init_param_path = candidate_path
 88         #         logging.info(f"Resolved LLM path to: {init_param_path}")
 89 
 90         # config = AutoConfig.from_pretrained(init_param_path)
 91         from transformers.models.qwen2 import Qwen2Config
 92         #llm_dir = os.path.join(init_param_path, "Qwen3-0.6B")
 93         config_path = os.path.join(init_param_path, "config.json")
 94         with open(config_path, "r", encoding="utf-8") as f:
 95             config_dict = json.load(f)
 96         config_dict["model_type"] = "qwen2"
 97         config = Qwen2Config.from_dict(config_dict)
 98 
 99         model = AutoModelForCausalLM.from_config(config, **llm_load_kwargs)
# 修改FunASR/funasr/models/fun_asr_nano/model.py代码后,执行出现的代码报错
>>> from funasr import AutoModel
>>> 
>>> model_dir = "FunAudioLLM/Fun-ASR-Nano-2512"
>>> 
>>> model = AutoModel(
...     model=model_dir,
...     vad_model="fsmn-vad",
...     vad_kwargs={"max_single_segment_time": 30000},
...     device="cuda:0",
... )
funasr version: 1.2.9.
Check update of funasr, and it would cost few times. You may disable it by set `disable_update=True` in AutoModel
You are using the latest version of funasr-1.2.9
2025-12-21 16:02:47,726 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found.
2025-12-21 16:02:47,727 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2025-12-21 16:02:47,727 - modelscope - INFO - No valid ast index found from /root/.cache/modelscope/ast_indexer, generating ast index from prebuilt!
2025-12-21 16:02:47,795 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 a45732a5f78d119a2e9a95be3c05108c and a total number of 980 components indexed
WARNING:root:trust_remote_code: False
[DEBUG] Loaded config: hidden_size=1024, rope_theta=1000000
Warning, miss key in ckpt: llm.model.layers.0.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.0.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.0.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.1.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.1.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.1.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.2.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.2.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.2.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.3.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.3.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.3.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.4.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.4.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.4.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.5.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.5.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.5.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.6.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.6.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.6.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.7.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.7.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.7.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.8.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.8.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.8.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.9.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.9.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.9.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.10.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.10.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.10.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.11.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.11.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.11.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.12.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.12.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.12.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.13.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.13.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.13.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.14.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.14.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.14.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.15.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.15.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.15.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.16.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.16.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.16.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.17.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.17.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.17.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.18.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.18.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.18.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.19.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.19.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.19.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.20.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.20.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.20.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.21.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.21.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.21.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.22.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.22.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.22.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.23.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.23.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.23.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.24.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.24.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.24.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.25.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.25.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.25.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.26.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.26.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.26.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.27.self_attn.q_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.27.self_attn.k_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
Warning, miss key in ckpt: llm.model.layers.27.self_attn.v_proj.bias, /root/.cache/modelscope/hub/FunAudioLLM/Fun-ASR-Nano-2512/model.pt
2025-12-21 16:03:09,200 - modelscope - WARNING - Using the master branch is fragile, please use it with caution!
2025-12-21 16:03:09,200 - modelscope - INFO - Use user-specified model revision: master
WARNING:root:trust_remote_code: False
>>> wav_path="/workspace/FunASR/runtime/funasr_api/asr_example.wav"
>>> res = model.generate(input=[wav_path], cache={}, batch_size_s=0)
rtf_avg: 0.120: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  1.51it/s]
  0%|                                                                                                                                                                   | 0/1 [00:00<?, ?it/s]The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.00<?, ?it/s]
Setting `pad_token_id` to `eos_token_id`:None for open-end generation.
The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/FunASR/funasr/auto/auto_model.py", line 311, in generate
    return self.inference_with_vad(
  File "/workspace/FunASR/funasr/auto/auto_model.py", line 485, in inference_with_vad
    results = self.inference(
  File "/workspace/FunASR/funasr/auto/auto_model.py", line 361, in inference
    res = model.inference(**batch, **kwargs)
  File "/workspace/FunASR/funasr/models/fun_asr_nano/model.py", line 627, in inference
    return self.inference_llm(
  File "/workspace/FunASR/funasr/models/fun_asr_nano/model.py", line 661, in inference_llm
    generated_ids = self.llm.generate(
  File "/usr/local/lib/python3.8/dist-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/generation/utils.py", line 2215, in generate
    result = self._sample(
  File "/usr/local/lib/python3.8/dist-packages/transformers/generation/utils.py", line 3206, in _sample
    outputs = self(**model_inputs, return_dict=True)
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/models/qwen2/modeling_qwen2.py", line 1164, in forward
    outputs = self.model(
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/models/qwen2/modeling_qwen2.py", line 895, in forward
    layer_outputs = decoder_layer(
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/models/qwen2/modeling_qwen2.py", line 623, in forward
    hidden_states, self_attn_weights, present_key_value = self.self_attn(
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/transformers/models/qwen2/modeling_qwen2.py", line 309, in forward
    query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
  File "/usr/local/lib/python3.8/dist-packages/transformers/models/qwen2/modeling_qwen2.py", line 206, in apply_rotary_pos_emb
    q_embed = (q * cos) + (rotate_half(q) * sin)
RuntimeError: The size of tensor a (64) must match the size of tensor b (128) at non-singleton dimension 3

Code

直接拉取registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-gpu-0.2.1,直接二进制执行代码和报错信息如下:

# bash run_server.sh   --download-model-dir /workspace/models   --model-dir FunAudioLLM/Fun-ASR-Nano-2512    --vad-dir iic/speech_fsmn_vad_zh-cn-16k-common-onnx   --punc-dir iic/punc_ct-transformer_cn-en-common-vocab471067-large-onnx   --lm-dir iic/speech_ngram_lm_zh-cn-ai-wesp-fst   --itn-dir thuduj12/fst_itn_zh   --port 10095   --decoder-thread-num 3   --model-thread-num 30   --certfile 0   --model-revision master   --hotword /workspace/models/hotwords.txt
I20251223 15:16:51.062440  1098 funasr-wss-server.cpp:25] model-dir : FunAudioLLM/Fun-ASR-Nano-2512
I20251223 15:16:51.062510  1098 funasr-wss-server.cpp:25] quantize : true
I20251223 15:16:51.062520  1098 funasr-wss-server.cpp:25] bladedisc : true
I20251223 15:16:51.062528  1098 funasr-wss-server.cpp:25] vad-dir : iic/speech_fsmn_vad_zh-cn-16k-common-onnx
I20251223 15:16:51.062536  1098 funasr-wss-server.cpp:25] vad-quant : true
I20251223 15:16:51.062543  1098 funasr-wss-server.cpp:25] punc-dir : iic/punc_ct-transformer_cn-en-common-vocab471067-large-onnx
I20251223 15:16:51.062551  1098 funasr-wss-server.cpp:25] punc-quant : true
I20251223 15:16:51.062561  1098 funasr-wss-server.cpp:25] itn-dir : thuduj12/fst_itn_zh
I20251223 15:16:51.062574  1098 funasr-wss-server.cpp:25] lm-dir : iic/speech_ngram_lm_zh-cn-ai-wesp-fst
I20251223 15:16:51.062582  1098 funasr-wss-server.cpp:25] hotword : /workspace/models/hotwords.txt
I20251223 15:16:51.062588  1098 funasr-wss-server.cpp:25] model-revision : master
I20251223 15:16:51.062597  1098 funasr-wss-server.cpp:25] vad-revision : v2.0.6
I20251223 15:16:51.062608  1098 funasr-wss-server.cpp:25] punc-revision : v2.0.5
I20251223 15:16:51.062615  1098 funasr-wss-server.cpp:25] itn-revision : v1.0.1
I20251223 15:16:51.062623  1098 funasr-wss-server.cpp:25] lm-revision : v1.0.2
I20251223 15:16:51.062644  1098 funasr-wss-server.cpp:216] Download model: iic/speech_fsmn_vad_zh-cn-16k-common-onnx from modelscope: 
Downloading Model from https://www.modelscope.cn to directory: /workspace/models/iic/speech_fsmn_vad_zh-cn-16k-common-onnx
2025-12-23 15:16:56,763 - modelscope - INFO - Use user-specified model revision: v2.0.6
I20251223 15:16:57.502612  1098 funasr-wss-server.cpp:235] Set vad-dir : /workspace/models/iic/speech_fsmn_vad_zh-cn-16k-common-onnx
I20251223 15:16:57.502676  1098 funasr-wss-server.cpp:289] Download model: FunAudioLLM/Fun-ASR-Nano-2512 from modelscope: 
Downloading Model from https://www.modelscope.cn to directory: /workspace/models/FunAudioLLM/Fun-ASR-Nano-2512
model is not exist, begin to export /workspace/models/FunAudioLLM/Fun-ASR-Nano-2512/model_blade.torchscript
funasr version: 1.2.9.
Check update of funasr, and it would cost few times. You may disable it by set `disable_update=True` in AutoModel
You are using the latest version of funasr-1.2.9
Downloading Model from https://www.modelscope.cn to directory: /root/.cache/modelscope/hub/models/FunAudioLLM/Fun-ASR-Nano-2512
WARNING:root:trust_remote_code: False
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.10/dist-packages/funasr/download/runtime_sdk_download_tool.py", line 58, in <module>
    main()
  File "/usr/local/lib/python3.10/dist-packages/funasr/download/runtime_sdk_download_tool.py", line 50, in main
    export_model = AutoModel(model=args.model_name, output_dir=output_dir, device=args.device)
  File "/usr/local/lib/python3.10/dist-packages/funasr/auto/auto_model.py", line 125, in __init__
    model, kwargs = self.build_model(**kwargs)
  File "/usr/local/lib/python3.10/dist-packages/funasr/auto/auto_model.py", line 264, in build_model
    assert model_class is not None, f'{kwargs["model"]} is not registered'
AssertionError: FunASRNano is not registered
I20251223 15:17:44.659392  1098 funasr-wss-server.cpp:308] Failed to download model from modelscope. If you set local asr model path, you can ignore the errors.
E20251223 15:17:44.659463  1098 funasr-wss-server.cpp:312] /workspace/models/FunAudioLLM/Fun-ASR-Nano-2512/model_blade.torchscript do not exists.

What have you tried?

详见What is your question?部分的内容

What's your environment?

  • OS (e.g., Linux): Ubuntu 22.04.4 LTS by Docker
  • FunASR Version (e.g., 1.0.0):
  • ModelScope Version (e.g., 1.11.0):
  • PyTorch Version (e.g., 2.0.0):
  • How you installed funasr (pip, source):
  • Python version:
  • GPU (e.g., V100M32) NVIDIA 2080 Ti 22G
  • CUDA/cuDNN version (e.g., cuda11.7):
  • Docker version (e.g., funasr-runtime-sdk-cpu-0.4.1)
  • Any other relevant information:
# Ubuntu 22.04.4 LTS by Docker: registry.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-gpu-0.2.1

$ docker images | grep funasr_repo                                                                                              
registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr   funasr-runtime-sdk-gpu-0.2.1               84c4ce3267ac   6 months ago     23GB
registry.aliyuncs.com/funasr_repo/funasr               funasr-runtime-sdk-gpu-0.2.1               84c4ce3267ac   6 months ago     23GB

# NVIDIA 2080 Ti 22G
# 二进制直接使用的环境(一:什么都没改变,仅仅更换了模型名称)

root@18c4073fc453:/workspace/FunASR/runtime# cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@18c4073fc453:/workspace/FunASR/runtime# pip list | grep funasr
funasr                 1.0.28             /workspace/FunASR

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@18c4073fc453:/workspace/FunASR/runtime# pip list | grep -i ModelScope
modelscope             1.15.0

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@18c4073fc453:/workspace/FunASR/runtime# pip list | grep -i transformers

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@18c4073fc453:/workspace/FunASR/runtime# pip list | grep -i Torch
pytorch-wpe            0.0.1
torch                  1.12.0+cu113
torch-blade            0.2.0+1.12.0.cu113
torch-complex          0.4.3
torchaudio             0.12.0+cu113

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@18c4073fc453:/workspace/FunASR/runtime# python --version
Python 3.8.10
root@18c4073fc453:/workspace/FunASR/runtime# pip list | grep -i cuda

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@18c4073fc453:/workspace/FunASR/runtime# dpkg -l | grep -i python
ii  libpython3-dev:amd64            3.8.2-0ubuntu2                    amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64         3.8.2-0ubuntu2                    amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.8:amd64              3.8.10-0ubuntu1~20.04.5           amd64        Shared Python runtime library (version 3.8)
ii  libpython3.8-dev:amd64          3.8.10-0ubuntu1~20.04.5           amd64        Header files and a static library for Python (v3.8)
ii  libpython3.8-minimal:amd64      3.8.10-0ubuntu1~20.04.5           amd64        Minimal subset of the Python language (version 3.8)
ii  libpython3.8-stdlib:amd64       3.8.10-0ubuntu1~20.04.5           amd64        Interactive high-level object-oriented language (standard library, version 3.8)
ii  python-pip-whl                  20.0.2-5ubuntu1.6                 all          Python package installer
ii  python3                         3.8.2-0ubuntu2                    amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-dev                     3.8.2-0ubuntu2                    amd64        header files and a static library for Python (default)
ii  python3-distutils               3.8.10-0ubuntu1~20.04             all          distutils package for Python 3.x
ii  python3-lib2to3                 3.8.10-0ubuntu1~20.04             all          Interactive high-level object-oriented language (lib2to3)
ii  python3-minimal                 3.8.2-0ubuntu2                    amd64        minimal subset of the Python language (default python3 version)
ii  python3-pip                     20.0.2-5ubuntu1.6                 all          Python package installer
ii  python3-pkg-resources           45.2.0-1                          all          Package Discovery and Resource Access using pkg_resources
ii  python3-setuptools              45.2.0-1                          all          Python3 Distutils Enhancements
ii  python3-wheel                   0.34.2-1                          all          built-package format for Python
ii  python3.8                       3.8.10-0ubuntu1~20.04.5           amd64        Interactive high-level object-oriented language (version 3.8)
ii  python3.8-dev                   3.8.10-0ubuntu1~20.04.5           amd64        Header files and a static library for Python (v3.8)
ii  python3.8-minimal               3.8.10-0ubuntu1~20.04.5           amd64        Minimal subset of the Python language (version 3.8)
# Ubuntu 22.04.4 LTS by Docker: registry.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-gpu-0.2.1

$ docker images | grep funasr_repo                                                                                              
registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr   funasr-runtime-sdk-gpu-0.2.1               84c4ce3267ac   6 months ago     23GB
registry.aliyuncs.com/funasr_repo/funasr               funasr-runtime-sdk-gpu-0.2.1               84c4ce3267ac   6 months ago     23GB

# NVIDIA 2080 Ti 22G
# 二进制直接使用的环境(二: pip更新了funasr包和pip安装了transformers包)

root@6e8290baa254:/workspace/FunASR/runtime# cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
root@6e8290baa254:/workspace/FunASR/runtime# pip list | grep funasr
funasr                 1.0.28             /workspace/FunASR

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@6e8290baa254:/workspace/FunASR/runtime# pip list | grep -i ModelScope
modelscope             1.15.0

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@6e8290baa254:/workspace/FunASR/runtime# pip list | grep -i transformers
transformers           4.46.3

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@6e8290baa254:/workspace/FunASR/runtime# pip list | grep -i Torch
pytorch-wpe            0.0.1
torch                  1.12.0+cu113
torch-blade            0.2.0+1.12.0.cu113
torch-complex          0.4.3
torchaudio             0.12.0+cu113

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@6e8290baa254:/workspace/FunASR/runtime# python --version
Python 3.8.10
root@6e8290baa254:/workspace/FunASR/runtime# pip list | grep -i cuda

[notice] A new release of pip available: 22.3.1 -> 25.0.1
[notice] To update, run: python3 -m pip install --upgrade pip
root@6e8290baa254:/workspace/FunASR/runtime# dpkg -l | grep -i python
ii  libpython3-dev:amd64            3.8.2-0ubuntu2                    amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64         3.8.2-0ubuntu2                    amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.8:amd64              3.8.10-0ubuntu1~20.04.5           amd64        Shared Python runtime library (version 3.8)
ii  libpython3.8-dev:amd64          3.8.10-0ubuntu1~20.04.5           amd64        Header files and a static library for Python (v3.8)
ii  libpython3.8-minimal:amd64      3.8.10-0ubuntu1~20.04.5           amd64        Minimal subset of the Python language (version 3.8)
ii  libpython3.8-stdlib:amd64       3.8.10-0ubuntu1~20.04.5           amd64        Interactive high-level object-oriented language (standard library, version 3.8)
ii  python-pip-whl                  20.0.2-5ubuntu1.6                 all          Python package installer
ii  python3                         3.8.2-0ubuntu2                    amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-dev                     3.8.2-0ubuntu2                    amd64        header files and a static library for Python (default)
ii  python3-distutils               3.8.10-0ubuntu1~20.04             all          distutils package for Python 3.x
ii  python3-lib2to3                 3.8.10-0ubuntu1~20.04             all          Interactive high-level object-oriented language (lib2to3)
ii  python3-minimal                 3.8.2-0ubuntu2                    amd64        minimal subset of the Python language (default python3 version)
ii  python3-pip                     20.0.2-5ubuntu1.6                 all          Python package installer
ii  python3-pkg-resources           45.2.0-1                          all          Package Discovery and Resource Access using pkg_resources
ii  python3-setuptools              45.2.0-1                          all          Python3 Distutils Enhancements
ii  python3-wheel                   0.34.2-1                          all          built-package format for Python
ii  python3.8                       3.8.10-0ubuntu1~20.04.5           amd64        Interactive high-level object-oriented language (version 3.8)
ii  python3.8-dev                   3.8.10-0ubuntu1~20.04.5           amd64        Header files and a static library for Python (v3.8)
ii  python3.8-minimal               3.8.10-0ubuntu1~20.04.5           amd64        Minimal subset of the Python language (version 3.8)
root@6e8290baa254:/workspace/FunASR/runtime#
# Ubuntu 22.04.4 LTS by Docker: nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
# NVIDIA 2080 Ti 22G
# 源码编译的环境

root@628cc3d2fc6f:/workspace/FunASR/runtime# cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@628cc3d2fc6f:/workspace/FunASR/runtime# pip list | grep funasr
funasr                   1.2.9
root@628cc3d2fc6f:/workspace/FunASR/runtime# pip list | grep -i ModelScope
modelscope               1.33.0
root@628cc3d2fc6f:/workspace/FunASR/runtime# pip list | grep -i Torch
pytorch-wpe              0.0.1
torch                    2.9.1
torch-complex            0.4.4
torchaudio               2.9.1
root@628cc3d2fc6f:/workspace/FunASR/runtime# dpkg -l | grep -i python
ii  libpython3-dev:amd64            3.10.6-1~22.04.1                        amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64         3.10.6-1~22.04.1                        amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.10:amd64             3.10.12-1~22.04.12                      amd64        Shared Python runtime library (version 3.10)
ii  libpython3.10-dev:amd64         3.10.12-1~22.04.12                      amd64        Header files and a static library for Python (v3.10)
ii  libpython3.10-minimal:amd64     3.10.12-1~22.04.12                      amd64        Minimal subset of the Python language (version 3.10)
ii  libpython3.10-stdlib:amd64      3.10.12-1~22.04.12                      amd64        Interactive high-level object-oriented language (standard library, version 3.10)
ii  python3                         3.10.6-1~22.04.1                        amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-dev                     3.10.6-1~22.04.1                        amd64        header files and a static library for Python (default)
ii  python3-distutils               3.10.8-1~22.04                          all          distutils package for Python 3.x
ii  python3-lib2to3                 3.10.8-1~22.04                          all          Interactive high-level object-oriented language (lib2to3)
ii  python3-minimal                 3.10.6-1~22.04.1                        amd64        minimal subset of the Python language (default python3 version)
ii  python3-pip                     22.0.2+dfsg-1ubuntu0.7                  all          Python package installer
ii  python3-pkg-resources           59.6.0-1.2ubuntu0.22.04.3               all          Package Discovery and Resource Access using pkg_resources
ii  python3-setuptools              59.6.0-1.2ubuntu0.22.04.3               all          Python3 Distutils Enhancements
ii  python3-wheel                   0.37.1-2ubuntu0.22.04.1                 all          built-package format for Python
ii  python3.10                      3.10.12-1~22.04.12                      amd64        Interactive high-level object-oriented language (version 3.10)
ii  python3.10-dev                  3.10.12-1~22.04.12                      amd64        Header files and a static library for Python (v3.10)
ii  python3.10-minimal              3.10.12-1~22.04.12                      amd64        Minimal subset of the Python language (version 3.10)
root@628cc3d2fc6f:/workspace/FunASR/runtime# python --version
Python 3.10.12
root@628cc3d2fc6f:/workspace/FunASR/runtime# pip list | grep -i cuda
nvidia-cuda-cupti-cu12   12.8.90
nvidia-cuda-nvrtc-cu12   12.8.93
nvidia-cuda-runtime-cu12 12.8.90
root@628cc3d2fc6f:/workspace/FunASR/runtime#

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions