问题一:问一下ModelScope大佬们我这个是语音识别的模型,用notebook就可以运行但在本地的话报?
问题1:问一下ModelScope大佬们我这个是语音识别的模型,用notebook就可以运行但在本地的话报错,是部署环境的事么? 我这个是Windows系统 问题2:额 是必须得linux么
参考回答:
回答1:语音识别我记得不是得用Linux系统 回答2:根据之前的经验 目前所有modelscope都是基于linux的 windos要改点源码
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/516767?spm=a2c6h.14164896.0.0.1669508erW7yXa
问题二:GPT-3诗词生成模型-中文-large推理使用问题
windows10环境 Python3.8 运行下面代码: from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks text_generation_zh = pipeline(Tasks.text_generation, model='damo/nlp_gpt3_poetry-generation_chinese-large') result_zh = text_generation_zh("金榜题名") print(result_zh['text']) 报错如下: 2023-06-08 13:36:34,700 - modelscope - INFO - PyTorch version 2.0.1 Found. 2023-06-08 13:36:34,713 - modelscope - INFO - TensorFlow version 2.11.0 Found. 2023-06-08 13:36:34,713 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer 2023-06-08 13:36:34,831 - modelscope - INFO - Loading done! Current index file version is 1.4.1, with md5 cffc52c9e200c4449701dcba46014061 and a total number of 842 components indexed 2023-06-08 13:36:51,443 - modelscope - INFO - Model revision not specified, use the latest revision: v1.0.1 2023-06-08 13:36:51,773 - modelscope - INFO - initiate model from C:\Users\Administrator.cache\modelscope\hub\damo\nlp_gpt3_poetry-generation_chinese-large 2023-06-08 13:36:51,773 - modelscope - INFO - initiate model from location C:\Users\Administrator.cache\modelscope\hub\damo\nlp_gpt3_poetry-generation_chinese-large. 2023-06-08 13:36:51,778 - modelscope - INFO - initialize model from C:\Users\Administrator.cache\modelscope\hub\damo\nlp_gpt3_poetry-generation_chinese-large Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\import_utils.py", line 433, in get_module return importlib.import_module('.' + module_name, self.name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in load_unlocked File "", line 783, in exec_module File "", line 219, in call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\models\nlp\gpt3\backbone.py", line 29, in from .distributed_gpt3 import sample File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\models\nlp\gpt3\distributed_gpt3.py", line 22, in from megatron_util import get_args, mpu File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\megatron_util_init.py", line 19, in from .initialize import initialize_megatron File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\megatron_util\initialize.py", line 29, in from megatron_util import mpu File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\megatron_util\mpu_init.py", line 87, in from .grads import clip_grad_norm File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\megatron_util\mpu\grads.py", line 19, in from torch._six import inf ModuleNotFoundError: No module named 'torch._six'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\registry.py", line 212, in build_from_cfg return obj_cls(**args) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\pipelines\nlp\text_generation_pipeline.py", line 56, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\pipelines\base.py", line 94, in init self.model = self.initiate_single_model(model) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\pipelines\base.py", line 53, in initiate_single_model return Model.from_pretrained( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\models\base\base_model.py", line 144, in from_pretrained model = build_model(model_cfg, task_name=task_name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\models\builder.py", line 35, in build_model model = build_from_cfg( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\registry.py", line 184, in build_from_cfg LazyImportModule.import_module(sig) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\import_utils.py", line 457, in import_module importlib.import_module(module_name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\importlib_init_.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\models\nlp\gpt3\text_generation.py", line 11, in from modelscope.models.nlp.gpt3 import GPT3Model File "", line 1039, in _handle_fromlist File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\import_utils.py", line 416, in getattr module = self._get_module(self._class_to_module[name]) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\import_utils.py", line 435, in _get_module raise RuntimeError( RuntimeError: Failed to import modelscope.models.nlp.gpt3.backbone because of the following error (look up to see its traceback): No module named 'torch._six'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\modelscope\utils\registry.py", line 215, in build_from_cfg raise type(e)(f'{obj_cls.name}: {e}') RuntimeError: TextGenerationPipeline: Failed to import modelscope.models.nlp.gpt3.backbone because of the following error (look up to see its traceback): No module named 'torch._six' python-BaseException
参考回答:
在GPT-3诗词生成模型-中文-large这个模型的notebook快速开发环境中选择cpu配置的跑不出来效果,也没报错,就是等待。但是在gpu的环境中可以出来结果。模型的说明wendn文档里也没有说明不能在cpu上运行或者需要依赖gpu环境
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/519061?spm=a2c6h.14164896.0.0.1669508erW7yXa
问题三:modelscope更新至1.2.1后模型报错
modelscope更新至1.2.1后speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch模型似乎报错
参考回答:
尝试升级您的 speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch 模型。请检查模型的文档或官方网站以获取更多信息,并查看是否有新版本可用。
尝试回退到旧版本的 ModelScope。如果您需要使用此特定模型,而新版本的 ModelScope 不再与它兼容,则回退到旧版本可能是最好的选择。您可以使用以下命令安装特定版本的 ModelScope:
Copy
pip install modelscope==
```
请将 <version>
替换为您需要安装的 ModelScope 版本号。
如果您仍然遇到问题,请提供更多详细信息,例如错误消息和堆栈跟踪,以便我更好地帮助您解决问题。
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/486507?spm=a2c6h.14164896.0.0.1669508erW7yXa
问题四:运行语音合成模型的官网代码示例报错
python==3.7.12 torch==1.13.1 modelscope==1..3 针对于这个模型:https://modelscope.cn/models/damo/speech_sambert-hifigan_tts_zhiyan_emo_zh-cn_16k/summary 在本地运行官网所提供的范例,出现了如下报错,请问是什么问题呢? 报错信息如下:
AttributeError: type object 'OutputKeys' has no attribute 'OUTPUT_WAV'
参考回答:
这个错误可能是由于您在代码中使用了过时的 OutputKeys 类而不是最新版本的类导致的。最新版本的 OutputKeys 类中的常量名称可能已更改,因此旧版本的代码可能无法找到它们。
解决此问题的方法是更新您的代码以使用最新版本的 OutputKeys 类。您可以从 ModelScope 的 GitHub 仓库中下载最新版本的代码,并将其替换您的本地代码中的旧版本类。如果您已经更新了 ModelScope 的版本,则应该可以找到最新版本的 OutputKeys 类。
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/493925?spm=a2c6h.14164896.0.0.1669508erW7yXa
问题五:您好,麻烦看一下读光-ocr检测模型的报错~ 今天更新了modelscope版本后,运行报错
您好,麻烦看一下读光-ocr检测模型的报错~ 今天更新了modelscope版本后,运行报错,代码未更改,之前可以产出结果的?
参考回答:
参考了modelscope的最新版本的code,dbnet的调用有变化~
关于本问题的更多回答可点击原文查看:https://developer.aliyun.com/ask/493114?spm=a2c6h.14164896.0.0.43f2508eHFy5Df