Skip to content

Conversation

@mrariden
Copy link
Collaborator

@mrariden mrariden commented Aug 22, 2025

fixes #1240. Passes device GPU string to assign_device() so it can actually set the device ID.

  • Partial tests on Mac
  • Full tests on ubuntu
  • passing GH workflow tests

cellpose/core.py Outdated
if device != "mps" or not(gpu and torch.backends.mps.is_available()):
device = int(device)
if gpu and use_gpu(use_torch=True):
if gpu and use_gpu(gpu_number=device, use_torch=True):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should be use_gpu(gpu_number=device,use_torch=use_torch) to propagate all params passed to assign_device. If you don't care about use_torch why even have it as a parameter.

@mrariden mrariden merged commit 70c0d07 into main Oct 28, 2025
7 checks passed
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 this pull request may close these issues.

[BUG] Cellpose can only use gpu device 0

3 participants