Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

本地部署图片生成正常,但是图像处理(超分辨率)报错:ValueError: Expected a cuda device, but got: cpu #15

Open
iwasnotyet opened this issue Nov 5, 2022 · 3 comments

Comments

@iwasnotyet
Copy link

1667678232374

@carefree0910
Copy link
Owner

确实是个问题,原因有两个:

  1. empty_cuda_cache 时应该先看看当前 device 是不是 cpu
  2. TranslatorAPI 也需要实现一个 to 方法,从而在需要时可以把它放到 cuda 上执行

我会尽快进行修复,修好后再让你试试😉

@carefree0910
Copy link
Owner

刚刚把这个问题修复了,不过需要重新 pull 一下代码以及重新 pip install -e . 一下(因为需要更新背后 carefree-learn 的版本);如果还有问题的话,欢迎继续留言😆

@iwasnotyet
Copy link
Author

刚刚把这个问题修复了,不过需要重新 pull 一下代码以及重新 pip install -e . 一下(因为需要更新背后 carefree-learn 的版本);如果还有问题的话,欢迎继续留言😆

十分感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants