#2892 Qwen3 TTS(本地)开启 GPU 加速

223.81* Posted at: 1 day ago 👁23

Qwen3 TTS(本地)开启 GPU 加速

raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

1 Replies

这是由于 PyTorch 版本与 CUDA 环境不匹配导致的。Qwen3 TTS 本地模型需要正确配置 CUDA 的 PyTorch 才能启用 GPU 加速。

解决方案:

  1. 确认 CUDA 版本:在命令行输入 nvcc -V 查看已安装的 CUDA 版本(例如 12.8)。
  2. 安装匹配的 PyTorch:根据你的 CUDA 版本,前往 PyTorch 官网 获取正确的安装命令。例如,对于 CUDA 12.8,命令通常类似于:
    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
  3. 验证安装:在 Python 环境中运行 python -c "import torch; print(torch.cuda.is_available())",如果输出 True 则表示 GPU 加速已就绪。
  4. 重启软件:完成 PyTorch 安装后,重启 pyVideoTrans 软件。

参考文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource