当前位置:   article > 正文

torch报错AssertionError: Torch not compiled with CUDA enabled解决方法_error occurred when executing checkpointloadersimp

error occurred when executing checkpointloadersimple: 'model.diffusion_model

参考:
https://blog.csdn.net/m0_46948660/article/details/129205116

编程环境
windows11, conda

报错处理:

进入环境:
conda activate xxx
  • 1
  • 2
安装torch:
conda install torch
  • 1
  • 2
引入及测试:
import torch
print("是否可用:", torch.cuda.is_available())        # 查看GPU是否可用
print("GPU数量:", torch.cuda.device_count())        # 查看GPU数量
print("torch方法查看CUDA版本:", torch.version.cuda)  # torch方法查看CUDA版本
print("GPU索引号:", torch.cuda.current_device())    # 查看GPU索引号
print("GPU名称:", torch.cuda.get_device_name(1))    # 根据索引号得到GPU名称
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/370455
推荐阅读
相关标签
  

闽ICP备14008679号