Spaces:
Configuration error
Configuration error
workaround for torch.jit
Browse files3 unmodified lines4567891011121383 unmodified lines9798991001011023 unmodified linesimport torchimport trimeshdevice = torch.device('cpu')# use torch hubmodel = torch.hub.load("isl-org/ZoeDepth", "ZoeD_NK", pretrained=True).to(device).eval()83 unmodified linesreturn maskdef mesh_reconstruction(masked_image: np.ndarray,mask: np.ndarray,3 unmodified lines456789101112131415161783 unmodified lines1011021031041051061073 unmodified linesimport torchimport trimeshimport spacesdevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')# use torch hub# zeroGPU hack from https://huggingface.co/spaces/zero-gpu-explorers/README/discussions/9torch.jit.script = lambda f: fmodel = torch.hub.load("isl-org/ZoeDepth", "ZoeD_NK", pretrained=True).to(device).eval()83 unmodified linesreturn mask@spaces.GPUdef mesh_reconstruction(masked_image: np.ndarray,mask: np.ndarray,
demo/mesh_recon.py+6-1