Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 967d61e

Browse files
committed
fix typing issue in dinov2 test
1 parent 336253f commit 967d61e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/foundationals/dinov2/test_dinov2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ def ref_model(
6060
if "reg" not in flavor:
6161
kwargs["interpolate_offset"] = 0.0
6262

63-
model = torch.hub.load( # type: ignore
63+
model: torch.nn.Module = torch.hub.load( # type: ignore
6464
model=flavor,
6565
repo_or_dir=str(dinov2_repo_path),
6666
source="local",
6767
pretrained=False, # to turn off automatic weights download (see load_state_dict below)
6868
**kwargs,
69-
).to(device=test_device)
69+
)
70+
model = model.to(device=test_device)
7071

7172
flavor = flavor.replace("_reg", "_reg4")
7273
weights = test_weights_path / f"{flavor}_pretrain.pth"

0 commit comments

Comments
 (0)