code: def test_inference_mask_generation_batched_image_one_point(self):
      model = SamModel.from_pretrained("facebook/sam-vit-base")
      processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
  
      model.to(torch_device)
      model.eval()
  
      raw_image = prepare_image()
      raw_dog_image = prepare_dog_img()
  
      input_points = [[[820, 1080]], [[220, 470]]]
  
      inputs = processor(
          images=[raw_image, raw_dog_image],
          input_points=input_points,
          return_tensors="pt",
      ).to(torch_device)
  
      with torch.no_grad():
          outputs = model(**inputs)
      scores_batched = outputs.iou_scores.squeeze()
  
      input_points = [[[220, 470]]]
  
      inputs = processor(
          images=raw_dog_image,
          input_points=input_points,
          return_tensors="pt",
      ).to(torch_device)
  
      with torch.no_grad():
          outputs = model(**inputs)
      scores_single = outputs.iou_scores.squeeze()
      self.assertTrue(
          torch.allclose(scores_batched[1, :], scores_single, atol=1e-4)
      )
  
imports: import gc
  import unittest
  import requests
  from transformers import SamConfig, SamMaskDecoderConfig, SamPromptEncoderConfig, SamVisionConfig, pipeline
  from transformers.testing_utils import backend_empty_cache, require_torch, slow, torch_device
  from transformers.utils import is_torch_available, is_vision_available
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 10 for calling the SamModelIntegrationTest obj's underlying member method code with example usage: obj.test_inference_mask_generation_batched_image_one_point() without return types