Skip to content

Commit 3d95187

Browse files
fix issue with version splitting (#1074)
1 parent 81c3bfb commit 3d95187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cellpose/dynamics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def remove_bad_flow_masks(masks, flows, threshold=0.4, device=torch.device("cpu"
620620
device0 = device
621621
if masks.size > 10000 * 10000 and (device is not None and device.type == "cuda"):
622622

623-
major_version, minor_version, _ = torch.__version__.split(".")
623+
major_version, minor_version = torch.__version__.split(".")[:2]
624624
torch.cuda.empty_cache()
625625
if major_version == "1" and int(minor_version) < 10:
626626
# for PyTorch version lower than 1.10

0 commit comments

Comments
 (0)