[SAM] Fix sam slow test (#24140)
* fix sam test * update pipeline typehint
This commit is contained in:
@@ -760,7 +760,9 @@ class SamModelIntegrationTest(unittest.TestCase):
|
||||
torch.testing.assert_allclose(iou_scores, EXPECTED_IOU, atol=1e-4, rtol=1e-4)
|
||||
|
||||
def test_dummy_pipeline_generation(self):
|
||||
generator = pipeline("mask-generation", model="facebook/sam-vit-base", device=torch_device)
|
||||
generator = pipeline(
|
||||
"mask-generation", model="facebook/sam-vit-base", device=0 if torch.cuda.is_available() else -1
|
||||
)
|
||||
raw_image = prepare_image()
|
||||
|
||||
_ = generator(raw_image, points_per_batch=64)
|
||||
|
||||
Reference in New Issue
Block a user