Skip to content

Commit

Permalink
using predictor device when setting image embedding
Browse files Browse the repository at this point in the history
  • Loading branch information
JoOkuma committed Aug 24, 2023
1 parent cad7c8f commit 8a72e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micro_sam/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def set_precomputed(
i: Index for the image data. Required if `image` has three spatial dimensions
or a time dimension and two spatial dimensions.
"""
device = "cuda" if torch.cuda.is_available() else "cpu"
device = predictor.device
features = image_embeddings["features"]

assert features.ndim in (4, 5)
Expand Down

0 comments on commit 8a72e87

Please sign in to comment.