Skip to content

[BUG] Cellpose CLI uses CPU when --gpu_device mps is specified #1455

@Kartoffelecke

Description

@Kartoffelecke

Before you fill out this form:

Did you review the FAQ?

Did you look through previous (open AND closed) issues posted on GH?

Now fill this form out completely:

Describe the bug

When I run cellpose from the command line using the recommended setting for a macbook using apple silicon I get the following error

python -m cellpose --dir . --use_gpu --gpu_device mps --save_rois --save_png --diameter 230 --verbose
2026-05-17 23:01:40,118 [INFO] WRITING LOG OUTPUT TO /Users/x/.cellpose/run.log
2026-05-17 23:01:40,118 [INFO]
cellpose version: 	4.1.1
platform:       	darwin
python version: 	3.14.4
torch version:  	2.10.0
2026-05-17 23:01:40,132 [INFO] Neither TORCH CUDA nor MPS version not installed/working.
2026-05-17 23:01:40,132 [INFO] >>>> using CPU
2026-05-17 23:01:40,132 [INFO] >>>> using CPU

Instead when I run the same commands ommiting the --gpu_device mps it uses the GPU and the runtime is 1/5 of before

python -m cellpose --dir . --use_gpu --save_rois --save_png --diameter 230 --verbose
2026-05-17 23:00:51,088 [INFO] WRITING LOG OUTPUT TO /Users/x/.cellpose/run.log
2026-05-17 23:00:51,088 [INFO]
cellpose version: 	4.1.1
platform:       	darwin
python version: 	3.14.4
torch version:  	2.10.0
2026-05-17 23:00:51,104 [INFO] ** TORCH MPS version installed and working. **
2026-05-17 23:00:51,104 [INFO] >>>> using GPU (MPS)
2026-05-17 23:00:51,104 [WARNING] the '--diam_mean' flag is deprecated in v4.0.1+ and no longer used
2026-05-17 23:00:51,106 [INFO] >>>> running cellpose on 18 images using all channels
2026-05-17 23:00:52,002 [INFO] >>>> loading model /Users/x/.cellpose/models/cpsam

To Reproduce

Steps to reproduce the behavior:

  1. Install cellpose 4.1.1 using conda
  2. Run the above mentioned cellpose CLI commands

Run log

Run logs are included above

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions