当前位置:   article > 正文

Pytorch显存问题_stable diffusion gpu 0 has a total capacty of 4.00

stable diffusion gpu 0 has a total capacty of 4.00 gib of which 0 bytes is f

运行出现错误:

RuntimeError: CUDA out of memory. Tried to allocate 500.00 MiB (GPU 0; 4.00 GiB total capacity; 204.39 MiB already allocated; 363.42 MiB free; 373.61 MiB cached)

解决方法: 释放显存
torch.cuda.empty_cache()

如果还是解决不了:
(1)增加显存
(2)切换为CPU运行

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

闽ICP备14008679号