CosyVoice icon indicating copy to clipboard operation
CosyVoice copied to clipboard

5060ti 16g 运行cosyVoice2 无法启动. 求教!!

Open yangzhaoliu opened this issue 7 months ago • 4 comments

我的conda环境如下: GPU 架构: (12, 0) CUDA: 12.6 PyTorch: 2.7.0+cu126 Python: 3.10.15 | packaged by conda-forge | (main, Oct 16 2024, 01:15:49) [MSC v.1941 64 bit (AMD64)] torchaudio2.7.0+cu126 CUDA可用: True GPU设备数: 1

IDE定位到model.py文件350行代码: flow_encoder = torch.jit.load(flow_encoder_model, map_location=self.device) 并发生异常: RuntimeError CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

控制台信息: UserWarning: NVIDIA GeForce RTX 5060 Ti with CUDA capability sm_120 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90. If you want to use the NVIDIA GeForce RTX 5060 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

yangzhaoliu avatar May 24 '25 10:05 yangzhaoliu

pytorch版本问题

aluminumbox avatar May 26 '25 03:05 aluminumbox

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 26 '25 02:06 github-actions[bot]

现在部署好了吗?

你的问题是pytorch版本和cuda不兼容导致的,torch 2.7.0及以前的版本不支持50系新架构(sm_120),需要安装2.8.0之后的torch即可;

但是, requirements.txt 仍有两个问题需要处理:

  1. 含有linux的配置,需要改成windows的配置需求;
  2. torch、cuda的配置仍然是老版本的,需要对应改成torch>=2.8.0, cuda>=12.8,

但是具体怎么改呢? 求指导!! 万谢!

keviiin-deer avatar Aug 18 '25 13:08 keviiin-deer

但是具体怎么改呢?

requirements.txttorchtorchaudio版本都改成2.8.0,再运行pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com后可以正常生成,但是没有走显卡。

duanluan avatar Sep 07 '25 15:09 duanluan