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

顺利安装了Janus但是为什么默认用我的cpu?怎么改成gpu? #96

Open
tjw2469 opened this issue Jan 29, 2025 · 6 comments

Comments

@tjw2469
Copy link

tjw2469 commented Jan 29, 2025

如题
顺利安装了Janus但是为什么默认用我的cpu?怎么改成gpu?

安装流程:

  1. git clone
  2. pip install -e .[gradio]
  3. python demo/app_januspro.py

python版本3.10

@pantypants
Copy link

你的显存不够的话会自动用CPU+内存来跑。多大的模型配多大的显存。20G的模型你的显存最好有24G

@tjw2469
Copy link
Author

tjw2469 commented Jan 29, 2025

你的显存不够的话会自动用CPU+内存来跑。多大的模型配多大的显存。20G的模型你的显存最好有24G

我16G的 vram跑7B的janus模型还不够吗?而且任务管理器里显示gpu根本没工作,纯cpu在跑,机箱风扇都快累坏了,gpu都快冻感冒了

@tjw2469 tjw2469 changed the title 顺利安装了但是为什么默认用我的cpu?怎么改成gpu? 顺利安装了Janus但是为什么默认用我的cpu?怎么改成gpu? Jan 29, 2025
@jrnjsyx
Copy link

jrnjsyx commented Jan 30, 2025

我也是这个问题,我在想要不要额外安装cuda?

@jrnjsyx
Copy link

jrnjsyx commented Jan 30, 2025

我试了下,默认安装的torch就是cpu版本的,要用gpu跑,得安装cuda,卸载原有的torch,再pip install对应cuda版本的torch。
我试成功了,原来用cpu跑例子要150多秒,现在十秒以内。
我用的是1B的版本。

@tjw2469
Copy link
Author

tjw2469 commented Jan 30, 2025

我试了下,默认安装的torch就是cpu版本的,要用gpu跑,得安装cuda,卸载原有的torch,再pip install对应cuda版本的torch。 我试成功了,原来用cpu跑例子要150多秒,现在十秒以内。 我用的是1B的版本。

谢谢你的解答,这应该对后面进来找这个问题答案的朋友有帮助。
不过我当时看了几个视频感觉生成效果还没有flux和sdxl来得更好,就删掉了。
打算先用着forge再说,等后面有更好的版本再用。

@zyystudio
Copy link

我试了下,默认安装的torch就是cpu版本的,要用gpu跑,得安装cuda,卸载原有的torch,再pip install对应cuda版本的torch。 我试成功了,原来用cpu跑例子要150多秒,现在十秒以内。 我用的是1B的版本。

请教下intel的igpu怎么搞

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

4 participants