code: def test_inference_mask_generation_no_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()
      inputs = processor(images=raw_image, return_tensors="pt").to(
          torch_device
      )
  
      with torch.no_grad():
          outputs = model(**inputs)
      scores = outputs.iou_scores.squeeze()
      masks = outputs.pred_masks[0, 0, 0, 0, :3]
      self.assertTrue(
          torch.allclose(scores[-1], torch.tensor(0.4515), atol=2e-4)
      )
      self.assertTrue(
          torch.allclose(
              masks,
              torch.tensor([-4.1800, -3.4948, -3.4481]).to(
                  torch_device
              ),
              atol=2e-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 2 for calling the SamModelIntegrationTest obj's underlying member method code with example usage: obj.test_inference_mask_generation_no_point() without return types