-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无网络环境下启动已缓存的 SenseVoiceSmall 会报 fsmn-vad is not registered #2629
Comments
我也遇到了这个问题,我是下载了传到离线环境,然后重启xinf发现这个模型没cache,launch也是“fsmn-vad is not registered” |
我们解决一下。vad 模型本身也很小。 |
临时解决可以修改容器中的/opt/conda/lib/python3.11/site-packages/xinference/model/audio/funasr.py文件 def load(self):
try:
from funasr import AutoModel
except ImportError:
error_message = "Failed to import module 'funasr'"
installation_guide = [
"Please make sure 'funasr' is installed. ",
"You can install it by `pip install funasr`\n",
]
raise ImportError(f"{error_message}\n\n{''.join(installation_guide)}")
if self._device is None:
self._device = get_available_device()
else:
if not is_device_available(self._device):
raise ValueError(f"Device {self._device} is not available!")
kwargs = self._model_spec.default_model_config.copy()
kwargs.update(self._kwargs)
logger.info("Loading FunASR model with kwargs: %s", kwargs)
# insert start
if kwargs.get("vad_model")=="fsmn-vad":
kwargs["vad_model"]="/root/.cache/modelscope/hub/iic/speech_fsmn_vad_zh-cn-16k-common-pytorch"
# insert end
self._model = AutoModel(model=self._model_path, device=self._device, **kwargs) |
修改之后出现torchaudio has no attribute "lib", 还是launch不了 |
是torchaudio 版本问题还是循环import? |
不太清楚哎,发个日志再查查 |
离线环境不太好贴日志,看了下,最终错误在torchaudio/_extension/utils.py,check cuda verison时出错, |
下个仅cpu版本,用cpu起试试 |
其实不需要修改源码就可以,写了个一个文档,你们可以试下。(#2654 合并后文档链接会失效) |
感谢,明天我试一下 |
System Info / 系統信息
操作系统:Centos7.9
docker镜像:xinference:latest-cpu
纯cpu启动镜像
Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?
Version info / 版本信息
Xinference:1.0.1
The command used to start Xinference / 用以启动 xinference 的命令
xinference launch --model-name SenseVoiceSmall --model-engine cpu --model-type audio
Reproduction / 复现过程
在模型已经缓存的情况下,无网络环境启动 SenseVoiceSmall ,启动过程中似乎会去访问 modelscope , 最终导致模型启动失败
Expected behavior / 期待表现
在已经缓存的情况下并且没有网络时优先使用本地缓存的文件启动模型。
The text was updated successfully, but these errors were encountered: