zino36 commited on
Commit
e8dcc74
·
verified ·
1 Parent(s): cd872a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ encoder = 'vitl'
43
  model_name = encoder2name[encoder]
44
  model = DepthAnythingV2(**model_configs[encoder])
45
  filepath = hf_hub_download(repo_id="depth-anything/Depth-Anything-V2-Metric-Indoor-Large-hf", filename="model.safetensors", repo_type="model")
46
- state_dict = torch.load(filepath, map_location="cpu")
47
  model.load_state_dict(state_dict)
48
  model = model.to(DEVICE).eval()
49
 
 
43
  model_name = encoder2name[encoder]
44
  model = DepthAnythingV2(**model_configs[encoder])
45
  filepath = hf_hub_download(repo_id="depth-anything/Depth-Anything-V2-Metric-Indoor-Large-hf", filename="model.safetensors", repo_type="model")
46
+ state_dict = torch.load(filepath, map_location="cpu", weights_only=True)
47
  model.load_state_dict(state_dict)
48
  model = model.to(DEVICE).eval()
49