Skip to content

Commit 8a72e87

Browse files
committed
using predictor device when setting image embedding
1 parent cad7c8f commit 8a72e87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

micro_sam/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def set_precomputed(
560560
i: Index for the image data. Required if `image` has three spatial dimensions
561561
or a time dimension and two spatial dimensions.
562562
"""
563-
device = "cuda" if torch.cuda.is_available() else "cpu"
563+
device = predictor.device
564564
features = image_embeddings["features"]
565565

566566
assert features.ndim in (4, 5)

0 commit comments

Comments
 (0)