[2noise/ChatTTS]win11环境,创建了cuda,在cuda中运行代码,还是显示运行在CPU模式

2024-06-05 839 views
9

如题 WARNING:ChatTTS.utils.gpu_utils:No GPU found, use CPU instead

回答

8

刚解决这个问题分享下方法希望有用。 1、控制中使用nvidia-msi命令查看系统安装的cuda版本 2、目前torch 2.3.0支持cuda12.1 如果版本不匹配可能无法使用 推荐安装12.1这里下载 https://developer.nvidia.com/cuda-toolkit-archive 3、安装指定版本cuda并运行nvidia-msi验证卸载torch pip uninstall torch 4、根据官网方式安装torch https://pytorch.org/get-started/locally/ 5、安装完毕验证

2

如题 WARNING:ChatTTS.utils.gpu_utils:No GPU found, use CPU instead

因为requirements.txt中安装的是CPU版本,具体解决方法大致如下: 1 pip uninstall torch 2 到https://pytorch.org/get-started/locally/ 下载跟你环境一致的版本,旧的版本可以看https://pytorch.org/get-started/previous-versions/

6

刚解决这个问题分享下方法希望有用。 1、控制中使用nvidia-msi命令查看系统安装的cuda版本 2、目前torch 2.3.0支持cuda12.1 如果版本不匹配可能无法使用 推荐安装12.1这里下载 https://developer.nvidia.com/cuda-toolkit-archive 3、安装指定版本cuda并运行nvidia-msi验证卸载torch pip uninstall torch 4、根据官网方式安装torch https://pytorch.org/get-started/locally/ 5、安装完毕验证

尝试了下还是不行。官网说用CUDA12.1 或更高,我装的是12.3,但检测不出来。

1

刚解决这个问题分享下方法希望有用。 1、控制中使用nvidia-msi命令查看系统安装的cuda版本 2、目前torch 2.3.0支持cuda12.1 如果版本不匹配可能无法使用 推荐安装12.1这里下载 https://developer.nvidia.com/cuda-toolkit-archive 3、安装指定版本cuda并运行nvidia-msi验证卸载torch pip uninstall torch 4、根据官网方式安装torch https://pytorch.org/get-started/locally/ 5、安装完毕验证

尝试了下还是不行。官网说用CUDA12.1 或更高,我装的是12.3,但检测不出来。

目前最新的是2.3.0版本 对应的cuda是12.1 如果您装的12.3应该是不行的。 使用 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121手动安装 直接pip install -r req****.txt 会默认选cpu

5

刚解决这个问题分享下方法希望有用。 1、控制中使用nvidia-msi命令查看系统安装的cuda版本 2、目前torch 2.3.0支持cuda12.1 如果版本不匹配可能无法使用 推荐安装12.1这里下载 https://developer.nvidia.com/cuda-toolkit-archive 3、安装指定版本cuda并运行nvidia-msi验证卸载torch pip uninstall torch 4、根据官网方式安装torch https://pytorch.org/get-started/locally/ 5、安装完毕验证

尝试了下还是不行。官网说用CUDA12.1 或更高,我装的是12.3,但检测不出来。

目前最新的是2.3.0版本 对应的cuda是12.1 如果您装的12.3应该是不行的。 使用 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121手动安装 直接pip install -r req****.txt 会默认选cpu

换成了CUDA 12.1,可以了。谢谢

0

刚解决这个问题分享下方法希望有用。 1、控制中使用nvidia-msi命令查看系统安装的cuda版本 2、目前torch 2.3.0支持cuda12.1 如果版本不匹配可能无法使用 推荐安装12.1这里下载 https://developer.nvidia.com/cuda-toolkit-archive 3、安装指定版本cuda并运行nvidia-msi验证卸载torch pip uninstall torch 4、根据官网方式安装torch https://pytorch.org/get-started/locally/ 5、安装完毕验证

尝试了下还是不行。官网说用CUDA12.1 或更高,我装的是12.3,但检测不出来。

目前最新的是2.3.0版本 对应的cuda是12.1 如果您装的12.3应该是不行的。 使用 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121手动安装 直接pip install -r req****.txt 会默认选cpu

换成了CUDA 12.1,可以了。谢谢

我的会报错: RuntimeError: Cannot find a working triton installation. More information on installing Triton can be found at https://github.com/openai/triton

Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information

You can suppress this exception and fall back to eager by setting: import torch._dynamo torch._dynamo.config.suppress_errors = True