Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
KabirSubbiah committed Aug 22, 2023
1 parent 307cbd9 commit 6c5482e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lang_sam/lang_sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def build_sam(self, ckpt_path):
state_dict = torch.hub.load_state_dict_from_url(checkpoint_url)
sam.load_state_dict(state_dict, strict=True)
except:
raise ValueError(f"Problem loading SAM please make sure you have the right model type: {sam_type} \
raise ValueError(f"Problem loading SAM please make sure you have the right model type: {self.sam_type} \
and a working checkpoint: {checkpoint_url}. Recommend deleting the checkpoint and \
re-downloading it.")
sam.to(device=self.device)
Expand All @@ -75,7 +75,7 @@ def build_sam(self, ckpt_path):
try:
sam = sam_model_registry[self.sam_type](ckpt_path)
except:
raise ValueError(f"Problem loading SAM. Your model type: {sam_type} \
raise ValueError(f"Problem loading SAM. Your model type: {self.sam_type} \
should match your checkpoint path: {ckpt_path}. Recommend calling LangSAM \
using matching model type AND checkpoint path")
sam.to(device=self.device)
Expand Down

0 comments on commit 6c5482e

Please sign in to comment.