Spaces:
Runtime error
Runtime error
Nan Xue
commited on
Commit
·
1bdb02a
1
Parent(s):
6421c8b
update
Browse files
scalelsd/ssl/misc/train_utils.py
CHANGED
|
@@ -46,7 +46,7 @@ def load_scalelsd_model(ckpt_path, device='cuda'):
|
|
| 46 |
|
| 47 |
model = ScaleLSD(gray_scale=True, use_layer_scale=use_layer_scale)
|
| 48 |
model = model.eval().to(device)
|
| 49 |
-
state_dict = torch.load(ckpt_path, map_location='cpu')
|
| 50 |
try:
|
| 51 |
model.load_state_dict(state_dict['model_state'])
|
| 52 |
except:
|
|
|
|
| 46 |
|
| 47 |
model = ScaleLSD(gray_scale=True, use_layer_scale=use_layer_scale)
|
| 48 |
model = model.eval().to(device)
|
| 49 |
+
state_dict = torch.load(ckpt_path, map_location='cpu',weights_only=True)
|
| 50 |
try:
|
| 51 |
model.load_state_dict(state_dict['model_state'])
|
| 52 |
except:
|