Skip to content

Commit

Permalink
fix issue with version splitting (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
carsen-stringer committed Feb 7, 2025
1 parent 81c3bfb commit 3d95187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cellpose/dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def remove_bad_flow_masks(masks, flows, threshold=0.4, device=torch.device("cpu"
device0 = device
if masks.size > 10000 * 10000 and (device is not None and device.type == "cuda"):

major_version, minor_version, _ = torch.__version__.split(".")
major_version, minor_version = torch.__version__.split(".")[:2]
torch.cuda.empty_cache()
if major_version == "1" and int(minor_version) < 10:
# for PyTorch version lower than 1.10
Expand Down

0 comments on commit 3d95187

Please sign in to comment.