问题描述
进入stable-diffusion-webui-directml,双击打开webui-user.bat后,显示如下图片提示。
![](https://i-blog.csdnimg.cn/blog_migrate/ffc4ecb948ed681738a8b7015e30d154.png)
原因分析:
这个错误表明你在尝试使用PyTorch框架在GPU上运行代码,但是PyTorch没有检测到可用的CUDA环境,因此无法在GPU上运行。因为cuda加速是N卡专属,因此如果是A卡用户,直接运行webui-user.bat会报错;
解决方案:
报错中提到的--skip-torch-cuda-test
是一个可以用来跳过CUDA可用性测试的命令行参数,这样可以绕过这个错误,用记事本打开webui-user.bat
![](https://i-blog.csdnimg.cn/blog_migrate/fa1aca1629cec548907c2d964b0eb908.png)