-
Notifications
You must be signed in to change notification settings - Fork 409
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
Issues with Cellpose on macOS using the MPS Backend #1063
Comments
I've looked into this a little and there seem to be two breaking changes that prevent running cellpose >= 3.1 on an MPS backend:
Regarding 1: Regarding 2: I guess it would be fairly straightforward to add checks here for the MPS backend and ensure that at most torch.float32 is used. I am not sure if this would have any impact on the generated results though. Maybe @carsen-stringer could comment on if replacing occurrences of torch.double/torch.float64 would have any negative consequences . If not I'd be happy to make a PR. In addition the switch from
My guess would be that this is a direct result of processes running on an MPS backend using float32 and not float64 which results in zero-like values being created. Was there a concrete rational for implementing this switch? What would the effects of leaving it at 1e-20 vs ignoring the warning? |
I think this problem has already been mentioned here: #1034. |
Hello Cellpose Team,
I am experiencing several issues while using Cellpose for segmentation and training models on my Mac Studio M2 Ultra. I would appreciate your guidance to resolve these problems. Below are the details:
Environment Information
Issues Faced
Run Logs
Attached below is the terminal output with verbose mode enabled, showing the errors and relevant information:
• MPS backend available: torch.backends.mps.is_available() returns True.
• The operation fails during sparse tensor computation (aten::_sparse_coo_tensor_with_dims_and_tensors).
NotImplementedError: Could not run 'aten::_sparse_coo_tensor_with_dims_and_tensors' with arguments from the 'SparseMPS' backend. ####
Request for Assistance
The text was updated successfully, but these errors were encountered: