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
6.98k stars 740 forks source link

docker gpu启动离线推理服务,报错 failed PropagateTensorShapeOnNode with schema #2007

Closed lemon3853 closed 1 month ago

lemon3853 commented 3 months ago

使用镜像:registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-gpu-0.1.1 启动命令:

bash run_server.sh \
  --download-model-dir /workspace/models \
  --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
  --model-dir damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404  \
  --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx \
  --lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst \
  --itn-dir thuduj12/fst_itn_zh \
  --hotword /workspace/models/hotwords.txt \
  --certfile 0

宿主机环境: cuda:CUDA Version: 12.4 报错异常:

/workspace/FunASR/funasr/utils/export_utils.py:155: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
  fp16_scale = int(2 * absmax // 65536)
rescale encoder modules with factor=10
[W shape_analysis.cpp:841] failed PropagateTensorShapeOnNode with schema:
aten::pad(Tensor self, int[] pad, str mode="constant", float? value=None) -> (Tensor)
%input.7 : Float(2, 512, 40, strides=[20480, 40, 1], requires_grad=0, device=cuda:0) = aten::pad(%input.5, %5521, %118, %119), scope: __module.model.encoders0/__module.model.encoders0.0/__module.model.encoders0.0.self_attn/__module.model.encoders0.0.self_attn.pad_fn # /usr/local/lib/python3.8/dist-packages/torch/nn/modules/padding.py:23:0

[W shape_analysis.cpp:841] failed PropagateTensorShapeOnNode with schema:
aten::pad(Tensor self, int[] pad, str mode="constant", float? value=None) -> (Tensor)
%input.27 : Float(2, 512, 40, strides=[20480, 40, 1], requires_grad=0, device=cuda:0) = aten::pad(%input.25, %5521, %118, %119), scope: __module.model.encoders/__module.model.encoders.0/__module.model.encoders.0.self_attn/__module.model.encoders.0.self_attn.pad_fn # /usr/local/lib/python3.8/dist-packages/torch/nn/modules/padding.py:23:0
zhanglv0209 commented 3 months ago

+1 遇到同样的问题

80boys commented 2 months ago

+1 遇到同样的问题

ruifengma commented 2 months ago

+1

lyblsgo commented 1 month ago

[W shape_analysis.cpp:841] 这是warning,模型导出比较慢,耐心等待

corey1202 commented 1 month ago

请问这个问题解决了吗,如何解决的

caoshiny commented 2 days ago

等待就行