-
Notifications
You must be signed in to change notification settings - Fork 393
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
[BUG] Cellpose 3 using GPU macOS M1 #1034
Comments
sorry there was a typo in the readme, can you please use python=3.10 and |
Thanks a lot! I've tried what you suggest but I got this error: A module that was compiled using NumPy 1.x cannot be run in If you are a user of the module, the easiest solution will be to |
Hmm which module is having the issue? |
I found these lines: |
I have tried to downgrade Numpy to 1.23.5. but still GPU cannot be used and without the use of GPU the trained model does not detect cells. |
I am having the same issue concerning not being able to get any segmentation objects with the GPU on a mackbook pro M1. When I try running the commands I get the following error suggesting that the backend is failing. NotImplementedError Traceback (most recent call last) File ~/mambaforge/lib/python3.10/site-packages/cellpose/models.py:453, in CellposeModel.eval(self, x, batch_size, resample, channels, channel_axis, z_axis, normalize, invert, rescale, diameter, flow_threshold, cellprob_threshold, do_3D, anisotropy, dP_smooth, stitch_threshold, min_size, max_size_fraction, niter, augment, tile_overlap, bsize, interp, compute_masks, progress) I tried installing the OratHelm clone and it allows me to run the samples with GPU on macbook pro M1 no problem but I get the warning: "/Users/user/mambaforge/lib/python3.10/site-packages/cellpose/dynamics.py:189](https://file+.vscode-resource.vscode-cdn.net/Users/solivanriv/mambaforge/lib/python3.10/site-packages/cellpose/dynamics.py:189): RuntimeWarning: invalid value encountered in divide Unfortunately, the segmentation results from the most updated version are a bit more accurate than the OratHelm fork. I have a lot of images and GPU support would be ideal with the most recent version, but I cannot seem to pinpoint a solution. |
I am also encountering a problem with version 3.1.0: since the update, it is impossible to use the GPU either to calibrate the diameter or to segment. I have the following error:
On the same configuration (M3 Pro, python 3.9.13, torch 2.5.1), after reinstalling Cellpose 3.0.11, it works correctly and I have no warnings on my side. For the moment, if it helps, this version can be installed with |
darn, I wish Apple would help pytorch implement all these functions for MPS! I upgraded the mask computation using sparse matrices, and they must not be supported. I will default to the old mask computation for MPS until they implement it |
@OratHelm thanks for the suggestion! Going back to 3.0.11 worked for me! I am seeing a small error coming form the dynamics.py stating: "RuntimeWarning: invalid value encountered in divide I guess that this is emerging from a division by zero. Sounds like this should not alter my results though, segmentation images look fine. @carsen-stringer, thanks! Hopefully, they will implement this soon! |
I had the same bug using cellpose 2 to detect cells after the training of model (2D) so I decided to install Cellpose 3 on my macOS M1, using Anaconda. I follow the protocol posted on GitHub
https://github.com/MouseLand/cellpose?tab=readme-ov-file#option-1-installation-instructions-with-conda
All models fail to detect cells using the GPU option. When I use Cellpose + track mate, the GPU option does not detect any cells.
Thanks for your help!
The text was updated successfully, but these errors were encountered: