当前位置:   article > 正文

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0_云部署stable diffusion上传模型runtimeerror: expected all

云部署stable diffusion上传模型runtimeerror: expected all tensors to be on th

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking arugment for argument mat1 in method wrapper_addmm)
首先,找到报错的那行代码,然后,在后面加上**.cuda()**
例如
test_class_word_embedding = data[‘test_class_word_embedding’].cuda() test_class_word_embedding = self.fc(test_class_word_embedding).cuda()
一直报错self.fc这行代码,把用的数据加上 .cuda()

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/422053
推荐阅读
相关标签
  

闽ICP备14008679号