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

Batch processing on Apple Silicon? #164

Closed
TheJoffrey opened this issue Jun 2, 2024 · 5 comments · Fixed by #197
Closed

Batch processing on Apple Silicon? #164

TheJoffrey opened this issue Jun 2, 2024 · 5 comments · Fixed by #197

Comments

@TheJoffrey
Copy link

Hello,
When trying to use marker for batch processing on my Mac (M1), I got the following error:

Cannot use MPS with torch multiprocessing share_memory.  You have to use CUDA or CPU.  Set the TORCH_DEVICE environment variable to change the device.

I got the same error using "cpu" as TORCH_DEVICE. And it seems like CUDA is not available on macOS.

Did I miss something? Thanks!

And thanks very much for Marker!

@jeblister
Copy link

I have the same error, I use Apple Silicon M1

@bestcarly
Copy link

I'm facing a similar issue. I attempted to set TORCH_DEVICE to cpu, yet it's still utilizing mps. Could you guide me on how to correct this? Thank you for any responses.

@VikParuchuri
Copy link
Owner

I can patch this so you can use MPS for batch conversion, but it will be less efficient than with CUDA

@bestcarly
Copy link

I can patch this so you can use MPS for batch conversion, but it will be less efficient than with CUDA

This is an excellent project, thank you for your contributions. I'm supporting it by doing the following:
in models
...
def setup_order_model(device=None, dtype=None):
device = "cpu"
dtype = "auto"
...

Yes, it works but it's very slow.😭

@aifirstd3v
Copy link

aifirstd3v commented Jun 20, 2024

It seems like supporting MPS but it is very slow IDK why.

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.

5 participants