We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd5b372 commit 86c349cCopy full SHA for 86c349c
IVM.py
@@ -27,7 +27,7 @@ def load(ckpt_path, low_gpu_memory = False):
27
url = "https://drive.google.com/uc?export=download&id=1OyVci6rAwnb2sJPxhObgK7AvlLYDLLHw"
28
sam_ckpt = _download(url, "sam_vit_h_4b8939.pth", os.path.expanduser(f"~/.cache/IVM/Sam"))
29
ckpt = torch.load(ckpt_path, map_location="cpu")
30
- model = IVM(sam_model=sam_ckpt)
+ model = IVM(sam_model=sam_ckpt).eval()
31
model.load_state_dict(ckpt, strict=False)
32
if low_gpu_memory: return accelerate.cpu_offload(model, "cuda")
33
else: return model.cuda()
0 commit comments