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
使用0306fix2整合包进行API调用时,使用CPU进行推理而不是GPU #1081
Comments
不应该 web-ui 和 api 都是读 config.py 里面有这样的代码: if torch.cuda.is_available():
infer_device = "cuda"
else:
infer_device = "cpu" 有可能整合包的话里面有runtime,你自己启动的话,安装的依赖torch可能是cpu版本导致的 |
你可以用整合包里的python启动: |
是这样的,成功解决问题了👍谢谢你呀!🌹 |
我现在想使用仓库里fast_interence_的代码而不是整合包进行API调用,但是按照README配置conda环境好像只会使用CPU?请问一下,我需要如何才能使用GPU呢?🌹 |
这个是环境依赖问题, 整合包帮你安装好所有依赖了. 你看看上面那段关键代码 pytorch是有很多版本的, 你要在你的环境中安装CUDA版本才能使用GPU. CUDA又分是 11,还是12. 你得结合你的硬件进行安装. |
请问该如何解决
The text was updated successfully, but these errors were encountered: