老师们帮我看看ModelScope这个错?OS: win server 2022
Python/C++ Version:Python3.7
Package Version:modelscope 1.6.1
Model:damo/speech_sambert-hifigan_tts_zhiyan_emo_zh-cn_16k
Command:python lftts.py
问题描述:服务起不来
Error log:
2023-06-02 16:01:41,103 - modelscope - INFO - PyTorch version 1.13.1 Found.
2023-06-02 16:01:41,105 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer
2023-06-02 16:01:41,252 - modelscope - INFO - Loading done! Current index file version is 1.6.1, with md5 0fc4e2263ceaf92f92c4e92e702de163 and a total number of 849 components indexed
2023-06-02 16:01:44,016 - modelscope - INFO - Model revision not specified, use the latest revision: v1.0.3
Traceback (most recent call last):
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\utils\import_utils.py", line 434, in _get_module
return importlib.import_module('.' + module_name, self.name)
File "d:\anaconda3\envs\funasr\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\models\audio\tts\sambert_hifi.py", line 27, in
from .voice import Voice
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\models\audio\tts\voice.py", line 13, in
from kantts.datasets.dataset import get_am_datasets, get_voc_datasets
ModuleNotFoundError: No module named 'kantts'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "lftts.py", line 14, in
model='damo/speech_sambert-hifigan_tts_zhiyan_emo_zh-cn_16k')
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\pipelines\builder.py", line 140, in pipeline
return build_pipeline(cfg, task_name=task)
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\pipelines\builder.py", line 57, in build_pipeline
cfg, PIPELINES, group_key=task_name, default_args=default_args)
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\utils\registry.py", line 184, in build_from_cfg
LazyImportModule.import_module(sig)
File "d:\anaconda3\envs\funasr\lib\site-packages\modelscope\utils\import_utils.py", line 458, in import_module
importlib.import_module(module_name)
File "d:\anaconda3\envs\funasr\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "<frozen importlib._bootstr
我这里看了下,这个控制是由模型自己做的,根据环境变量:LOCAL_RANK来进行,可以配置下这个,直接在系统中设置:os.environ['LOCAL_RANK'] = '1'
这是代码中的位置,可以看multi_model/clip/model.py line555-556
此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352