alexnasa commited on
Commit
c8cc175
·
verified ·
1 Parent(s): 87c79b8

Update eval/grounded_sam/grounded_sam2_florence2_autolabel_pipeline.py

Browse files
eval/grounded_sam/grounded_sam2_florence2_autolabel_pipeline.py CHANGED
@@ -64,11 +64,15 @@ class FlorenceSAM:
64
  SAM2_CONFIG = "configs/sam2.1/sam2.1_hiera_l.yaml"
65
 
66
  self.florence2_model = Florence2ForConditionalGeneration.from_pretrained(
67
- FLORENCE2_MODEL_ID, trust_remote_code=True,
 
 
68
  torch_dtype=self.torch_dtype,
69
  ).eval().to(self.device)
70
  self.florence2_processor = Florence2Processor.from_pretrained(
71
- FLORENCE2_MODEL_ID, trust_remote_code=True
 
 
72
  )
73
  sam2_model = build_sam2(SAM2_CONFIG, SAM2_CHECKPOINT, device=self.device)
74
  self.sam2_predictor = SAM2ImagePredictor(sam2_model)
 
64
  SAM2_CONFIG = "configs/sam2.1/sam2.1_hiera_l.yaml"
65
 
66
  self.florence2_model = Florence2ForConditionalGeneration.from_pretrained(
67
+ FLORENCE2_MODEL_ID,
68
+ trust_remote_code=True,
69
+ local_files_only=True,
70
  torch_dtype=self.torch_dtype,
71
  ).eval().to(self.device)
72
  self.florence2_processor = Florence2Processor.from_pretrained(
73
+ FLORENCE2_MODEL_ID,
74
+ trust_remote_code=True,
75
+ local_files_only=True,
76
  )
77
  sam2_model = build_sam2(SAM2_CONFIG, SAM2_CHECKPOINT, device=self.device)
78
  self.sam2_predictor = SAM2ImagePredictor(sam2_model)