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

how to use cpu/mps? #21

Open
LukaGiorgadze opened this issue Jan 9, 2024 · 3 comments · May be fixed by #22
Open

how to use cpu/mps? #21

LukaGiorgadze opened this issue Jan 9, 2024 · 3 comments · May be fixed by #22

Comments

@LukaGiorgadze
Copy link

LukaGiorgadze commented Jan 9, 2024

Hey there! I'm on Apple M2 Mac.
How can I use mps/cpu device only?

When I'm running example, getting this error:

raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
@LukaGiorgadze LukaGiorgadze changed the title how to run on cpu? how to use cpu/mps? Jan 9, 2024
@Algolzw
Copy link
Owner

Algolzw commented Jan 10, 2024

It might be hard to run this model on Mac since it requires a lot of memory and would be very slow on the CPU.

@LukaGiorgadze
Copy link
Author

LukaGiorgadze commented Jan 10, 2024

It might be hard to run this model on Mac since it requires a lot of memory and would be very slow on the CPU.

Probably worth trying. I'm already running image matting models without any issues.
Well, basically we just need to pass --device param (gpu/cpu/mps) instead of hard-coding cuda.

I would love to see this in the next commits.

Thoughts?

@Algolzw
Copy link
Owner

Algolzw commented Jan 10, 2024

Good to hear your models are running! Thanks, then I will consider adding the "device" param in the future.

@edumotya edumotya linked a pull request Jan 11, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants