Skip to content

Commit

Permalink
fix device
Browse files Browse the repository at this point in the history
  • Loading branch information
rittik9 committed Jan 9, 2025
1 parent b71fe12 commit 9690417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torchmetrics/functional/multimodal/clip_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _clip_score_update(
f"{len(source_data)} and {len(target_data)}"
)

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
device = torch.device("cpu")
if source_modality == "image" and isinstance(source_data[0], Tensor):
device = source_data[0].device
elif target_modality == "image" and isinstance(target_data[0], Tensor):
Expand Down

0 comments on commit 9690417

Please sign in to comment.