Spaces:
Runtime error
Runtime error
Commit
·
fcd17c7
1
Parent(s):
7f1aea2
Update utils.py
Browse files
utils.py
CHANGED
@@ -22,7 +22,7 @@ def load_model_from_config(config_path, model_name, device='cuda'):
|
|
22 |
print(f"Loading model from {model_name}")
|
23 |
# Load the state dict
|
24 |
state_dict = torch.load(model_file, map_location='cpu')
|
25 |
-
model.load_state_dict(state_dict, strict=
|
26 |
|
27 |
model.to(device)
|
28 |
model.eval()
|
|
|
22 |
print(f"Loading model from {model_name}")
|
23 |
# Load the state dict
|
24 |
state_dict = torch.load(model_file, map_location='cpu')
|
25 |
+
model.load_state_dict(state_dict, strict=True)
|
26 |
|
27 |
model.to(device)
|
28 |
model.eval()
|