如何解决从Google colab文档执行代码以创建Deepfakes图片动画时发生运行时错误
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
解决方法
您可能正在Colab环境中运行,该环境仅具有TPU,而没有GPU,在这种情况下,您需要将XLA与PyTorch一起使用。在这种情况下,您可能会发现此笔记本和存储库非常有用:
https://github.com/pytorch/xla
,1。检查文件是否存在的路径 2.屏幕截图中没有安装驱动器,请尝试检查一次 3.如果前两个完成后仍然遇到问题,请检查给定的文件是否正确
希望这是helpfu:)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。