Skip to content

Commit 70c0d07

Browse files
authored
Merge pull request #1311 from MouseLand/gpu_fix
Allow specify gpu device number
2 parents 892b392 + cbb3cb7 commit 70c0d07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cellpose/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def assign_device(use_torch=True, gpu=False, device=0):
7777
if isinstance(device, str):
7878
if device != "mps" or not(gpu and torch.backends.mps.is_available()):
7979
device = int(device)
80-
if gpu and use_gpu(use_torch=True):
80+
if gpu and use_gpu(gpu_number=device, use_torch=use_torch):
8181
try:
8282
if torch.cuda.is_available():
8383
device = torch.device(f'cuda:{device}')

0 commit comments

Comments
 (0)