Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
8043e65
1
Parent(s):
34b3fb7
utils.py
CHANGED
@@ -23,7 +23,7 @@ def load_model_from_config(config_path, model_name, device='cuda', load=True):
|
|
23 |
print(f"Loading model from {model_name}")
|
24 |
# Load the state dict
|
25 |
state_dict = torch.load(model_file, map_location='cpu')
|
26 |
-
model.load_state_dict(state_dict, strict=
|
27 |
|
28 |
model.to(device)
|
29 |
model.eval()
|
|
|
23 |
print(f"Loading model from {model_name}")
|
24 |
# Load the state dict
|
25 |
state_dict = torch.load(model_file, map_location='cpu')
|
26 |
+
model.load_state_dict(state_dict, strict=False)
|
27 |
|
28 |
model.to(device)
|
29 |
model.eval()
|