Update app.py
Browse files39 unmodified lines404142434445464739 unmodified lines'vitg': 'Gaint',}encoder = 'vitg'model = DepthAnythingV2(**model_configs[encoder])filepath = hf_hub_download(repo_id=f"depth-anything/Depth-Anything-V2-{encoder2name[encoder]}", filename=f"model.pth", repo_type="model")state_dict = torch.load(filepath, map_location="cpu")model.load_state_dict(state_dict)model = model.to(DEVICE).eval()39 unmodified lines40414243444546474839 unmodified lines'vitg': 'Gaint',}encoder = 'vitg'model_name = encoder2name[encoder]model = DepthAnythingV2(**model_configs[encoder])filepath = hf_hub_download(repo_id=f"depth-anything/Depth-Anything-V2-{model_name}", filename=f"depth_anything_v2_{model_name.lower()}.pth", repo_type="model")state_dict = torch.load(filepath, map_location="cpu")model.load_state_dict(state_dict)model = model.to(DEVICE).eval()
app.py+2-1