stablediffusion吧 关注:31,466贴子:108,729
  • 12回复贴,共1
求助

求助各位大佬,牛爷爷

只看楼主收藏回复

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat1 in method wrapper_CUDA_addmm


IP属地:广东来自Android客户端1楼2023-10-08 08:40回复
    我的显卡是4080,按道理来说跑个图应该行的啊


    IP属地:广东来自Android客户端2楼2023-10-08 08:40
    回复
      运行时错误:期望所有张量都在同一设备上,但至少找到两个设备,cpu和cuda:0!(when检查方法wrapper_CUDA_addmm中参数mat 1的参数
      报这个错的原因在于,代码中的Tensor,一会在CPU中运行,一会在GPU中运行,所以最好是都放在同一个device中执行
      选择显卡4080,或显存优化12g以上?


      IP属地:广东3楼2023-10-08 11:46
      收起回复
        问题诊断记之后看提示,不行看40系列教程环境,40系列最新显卡驱动,cuda驱动12.0版本


        IP属地:广东4楼2023-10-08 11:52
        收起回复
          同样的问题 4090显卡 应该如何解决呢


          IP属地:湖北5楼2023-12-18 18:46
          收起回复