Skip to content

Commit 61996b0

Browse files
committed
Fix use_gpu argument in assign_device function to respect use_torch parameter
1 parent d34d5f4 commit 61996b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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(gpu_number=device, 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)