水上冰石 2025-11-28 13:23 采纳率: 20%
浏览 8
已结题

rtx5060安装stable-diffusion报错:

rtx5060安装stable-diffusion报错:

E:\stableDiffusion\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:215: UserWarning:
NVIDIA GeForce RTX 5060 Laptop GPU 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 Laptop GPU GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

怎么解决?

  • 写回答

4条回答 默认 最新

  • 关注

    RTX 5060 Laptop GPU的CUDA算力是sm_90a(Ada架构),但你的PyTorch版本把它误识别成sm_120了,核心问题是PyTorch版本对新显卡支持不足。

    解决办法:

    1. 升级PyTorch到最新稳定版:卸载现有PyTorch,用官网命令重装(选CUDA 12.1/12.4版本),比如:
      pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
    2. 检查CUDA驱动:确保NVIDIA驱动版本≥535(支持CUDA 12.1+),老驱动会导致算力识别错误;
    3. 临时屏蔽算力检查(应急用):在webui启动脚本里加环境变量 TORCH_CUDNN_V8_API_DISABLED=1,但优先升级PyTorch更稳妥。

    这样就能让PyTorch正确识别RTX 5060的算力,解决兼容性报错了。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 12月12日
  • 已采纳回答 12月4日
  • 创建了问题 11月28日