Comments (8)
其他模型应该也有类似问题
另外问一句 能把自动更新给关了么?? /(ㄒoㄒ)/~~
from funasr.
好的,感谢反馈,我们内部测试一下
from funasr.
刚才确认了一下,代码一直是with autocast(False),应该是你那边自己有修改,更新funasr以后,被覆盖了,导致的问题。请问你做这个修改,是有什么特殊用途么?如果涉及到自己的项目,可以把这块pr,merge进funasr。funasr是需要更新的,不然无法使用最新feature,也没法下载modelscope最新的模型
from funasr.
奇怪 我啥也没改啊,之前好好的,然后突然就报错了 CPU Autocast only supports dtype of torch.bfloat16 currently. @@
不是特殊用途 而是报错执行不了啊
就是跑了两个模型
inference_pipline = pipeline(
task=Tasks.voice_activity_detection,
model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch",
model_revision='v1.2.0',
output_dir=None,
batch_size=1,
)
param_dict = dict()
param_dict['hotword']="小五 小五月" #设置热词,用空格隔开
inference_pipeline2 = pipeline(
task=Tasks.auto_speech_recognition,
model="damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404",
param_dict=param_dict)
from funasr.
from funasr.
刚才确认了一下,代码一直是with autocast(False),应该是你那边自己有修改,更新funasr以后,被覆盖了,导致的问题。请问你做这个修改,是有什么特殊用途么?如果涉及到自己的项目,可以把这块pr,merge进funasr。funasr是需要更新的,不然无法使用最新feature,也没法下载modelscope最新的模型
我觉得这块可不可以做个设置开关 比如跑在生产环境中,不是太希望保持最新环境。
不是这块代码有问题,而是之前给的数据类型应该是支持的现在数据类型不被支持
这个警告是因为你在使用PyTorch的自动混合精度(autocast)功能时,指定了一个不受支持的数据类型(dtype)。目前,CPU autocast只支持torch.bfloat16这一种数据类型12。如果你想使用其他的数据类型,你需要禁用autocast或者切换到其他设备2。
from funasr.
完整报错信息是这样的
/www/miniconda3/envs/vits2/lib/python3.7/site-packages/torch/amp/autocast_mode.py:214: UserWarning: In CPU autocast, but the target dtype is not supported. Disabling autocast.
CPU Autocast only supports dtype of torch.bfloat16 currently.
warnings.warn(error_message)
Traceback (most recent call last):
File "asr.py", line 161, in <module>
rec_result = inference_pipeline2(audio_in=audio_in)
File "/www/miniconda3/envs/vits2/lib/python3.7/site-packages/modelscope/pipelines/audio/asr_inference_pipeline.py", line 258, in __call__
output = self.forward(output, **kwargs)
File "/www/miniconda3/envs/vits2/lib/python3.7/site-packages/modelscope/pipelines/audio/asr_inference_pipeline.py", line 533, in forward
inputs['asr_result'] = self.run_inference(self.cmd, **kwargs)
File "/www/miniconda3/envs/vits2/lib/python3.7/site-packages/modelscope/pipelines/audio/asr_inference_pipeline.py", line 612, in run_inference
cmd['fs'], cmd['param_dict'], **kwargs)
File "/www/FunASR/funasr/bin/asr_inference_paraformer.py", line 728, in _forward
results = speech2text(**batch)
File "/www/miniconda3/envs/vits2/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/www/FunASR/funasr/bin/asr_inference_paraformer.py", line 226, in __call__
enc, enc_len = self.asr_model.encode(**batch)
File "/www/FunASR/funasr/models/e2e_asr_paraformer.py", line 278, in encode
with autocast(False):
File "/www/miniconda3/envs/vits2/lib/python3.7/site-packages/torch/cuda/amp/autocast_mode.py", line 30, in __enter__
return super().__enter__()
File "/www/miniconda3/envs/vits2/lib/python3.7/site-packages/torch/amp/autocast_mode.py", line 238, in __enter__
torch.set_autocast_cpu_dtype(self.fast_dtype) # type: ignore[arg-type]
RuntimeError: Currently, AutocastCPU only support Bfloat16 as the autocast_cpu_dtype
from funasr.
好的,问题收到。关于更细遇到报错的问题,可以加我们钉钉群,更新前会提前1个礼拜在群里通知,你可以自己先测试,如果有问题,可以及时反馈给我们
from funasr.
Related Issues (20)
- 使用funasr 0.8.8 export onnx的时候报错 HOT 1
- 多进程CPU使用率剧增问题 HOT 4
- 您好,能出一个比较好的新版本的FunASR Finetune教程吗?老的对于新手来说,很难上手。 HOT 1
- check_latest typo in download_from_hub.py HOT 1
- "ct-punc" model: length mismatch between punc and timestamp HOT 4
- fsmn_vad_streaming 有实时读取麦克风的案例吗 HOT 1
- 连续的数字报音识别有误,主要是55,555,88,888 HOT 1
- funasr-runtime-sdk-online-cpu-0.1.9,异常 HOT 1
- funasr叠字问题汇总 HOT 6
- UnsupportedValueType: FunASRPipeline: GenericFunASR: Value 'CharTokenizer' is not a supported primitive type HOT 3
- 服务版可以设置不输出英文和数字,只输出中文和标点吗?
- asr-offline-parafomer微调训练事报错
- 离线版paraformer微调报错
- docker中onnx模型推理效果比较pipeline采用pt模型差 HOT 13
- 离线paraformer推理报错 HOT 1
- 关于近期docker中onnx模型推理与python推理不同,我发现了不准确的问题的根源 HOT 5
- uniasr方言模型与vad 、punc模型一起使用时的bug HOT 4
- Paraformer: Fast and Accurate Parallel Transformer for Non-autoregressive End-to-End Speech Recognition论文结果复现 HOT 4
- 可以达到 实时语音转写 , 边录边写,像 “讯飞听见”可以吗? HOT 1
- 实时的paraformer模型微调问题 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from funasr.