开发者社区 > ModelScope模型即服务 > 计算机视觉 > 正文

modelscope版本:1.11.0 错误怎么解决?

"使用导出脚本如下:
from modelscope.models import Model
from modelscope.exporters import Exporter
model_id = 'damo/nlp_deberta_rex-uninlu_chinese-base'
cfg={""framework"":""pytorch"",""task"":""rex-uninlu"",""pipeline"":{""type"":""nlp_deberta_rex-uninlu_chinese-base-pipe""}}
model = Model.from_pretrained(model_id,revision='v1.2.1',cfg_dict=cfg)
output_files = Exporter.from_model(model).export_onnx(opset=13, output_dir='/root/nlp_structbert_sentence-similarity_chinese-base')
print(output_files)

错误如下 :
Traceback (most recent call last):
File ""export.py"", line 5, in
model = Model.from_pretrained(model_id,revision='v1.2.1',cfg_dict=cfg)
File ""/root/miniconda3/envs/nlp/lib/python3.8/site-packages/modelscope/models/base/base_model.py"", line 172, in from_pretrained
register_plugins_repo(cfg.safe_get('plugins'))
AttributeError: 'dict' object has no attribute 'safe_get'

modelscope版本:1.11.0 错误怎么解决?

展开
收起
小小爱吃香菜 2024-01-22 21:56:45 90 0
1 条回答
写回答
取消 提交回答

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

热门讨论

热门文章

相关电子书

更多
视觉AI能力的开放现状及ModelScope实战 立即下载
ModelScope助力语音AI模型创新与应用 立即下载
低代码开发师(初级)实战教程 立即下载