执行google colab文档中用于创建Deepfakes图像动画的代码时出现运行时错误

2024-06-21 20:12:34 发布

您现在位置:Python中文网/ 问答频道 /正文

enter image description here我在执行google colab文档中用于创建Deepfakes图像动画的代码时遇到运行时错误

RuntimeError                              Traceback (most recent call last)

<ipython-input-5-dbd18151b569> in <module>()

  1 from demo import load_checkpoints
  2 generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml', 

----> 3 checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')

10 frames

/usr/local/lib/python3.6/dist-packages/torch/cuda/__init__.py in _lazy_init()

188             raise AssertionError(

189                 "libcudart functions unavailable. It looks like you have a broken build?")

--> 190 torch._C._cuda_init()

191         # Some of the queued calls may reentrantly call _lazy_init();

192         # we need to just return without initializing in that case.

RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:47


Tags: pathinimageconfiginitloadtorchdescription
2条回答

1.检查文件是否存在的路径 2.在您的屏幕截图中,没有安装驱动器。请尝试检查一次 3.如果完成前两项仍面临问题,请检查所给文件是否正确

希望这对你有帮助(傅:)

你可能运行在一个只有TPU可用而不是GPU的COLAB环境中,在这种情况下,你需要利用PyTrac使用XLA。如果出现以下情况,您可能会发现此笔记本和存储库非常有用:

https://colab.research.google.com/github/pytorch/xla/blob/master/contrib/colab/resnet18-training.ipynb

https://github.com/pytorch/xla

相关问题 更多 >