Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,9 +55,10 @@ model_configs = {
|
|
| 55 |
'vitl': {'encoder': 'vitl', 'features': 256, 'out_channels': [256, 512, 1024, 1024]},
|
| 56 |
'vitg': {'encoder': 'vitg', 'features': 384, 'out_channels': [1536, 1536, 1536, 1536]}
|
| 57 |
}
|
|
|
|
| 58 |
encoder = 'vitl'
|
| 59 |
model = DepthAnythingV2(**model_configs[encoder])
|
| 60 |
-
state_dict = torch.load(f'depth_anything_v2_{encoder}.pth', map_location="cpu")
|
| 61 |
model.load_state_dict(state_dict)
|
| 62 |
model = model.to(DEVICE).eval()
|
| 63 |
|
|
|
|
| 55 |
'vitl': {'encoder': 'vitl', 'features': 256, 'out_channels': [256, 512, 1024, 1024]},
|
| 56 |
'vitg': {'encoder': 'vitg', 'features': 384, 'out_channels': [1536, 1536, 1536, 1536]}
|
| 57 |
}
|
| 58 |
+
|
| 59 |
encoder = 'vitl'
|
| 60 |
model = DepthAnythingV2(**model_configs[encoder])
|
| 61 |
+
state_dict = torch.load(f'/home/user/app/checkpoints/depth_anything_v2_{encoder}.pth', map_location="cpu")
|
| 62 |
model.load_state_dict(state_dict)
|
| 63 |
model = model.to(DEVICE).eval()
|
| 64 |
|