diff --git a/tests/models/instructblip/test_processor_instructblip.py b/tests/models/instructblip/test_processor_instructblip.py index 4bf4a213d33f47..2a09cef2428e93 100644 --- a/tests/models/instructblip/test_processor_instructblip.py +++ b/tests/models/instructblip/test_processor_instructblip.py @@ -254,8 +254,6 @@ def test_kwargs_overrides_default_tokenizer_kwargs(self): image_processor = self.get_component("image_processor") tokenizer = self.get_component("tokenizer", max_length=117) qformer_tokenizer = self.get_qformer_tokenizer(max_length=117) - if not tokenizer.pad_token: - tokenizer.pad_token = "[TEST_PAD]" if not qformer_tokenizer.pad_token: qformer_tokenizer.pad_token = "[TEST_PAD]" @@ -280,8 +278,6 @@ def test_structured_kwargs_nested(self): image_processor = self.get_component("image_processor") tokenizer = self.get_component("tokenizer") qformer_tokenizer = self.get_qformer_tokenizer() - if not tokenizer.pad_token: - tokenizer.pad_token = "[TEST_PAD]" if not qformer_tokenizer.pad_token: qformer_tokenizer.pad_token = "[TEST_PAD]" @@ -317,9 +313,6 @@ def test_structured_kwargs_nested_from_dict(self): image_processor = self.get_component("image_processor") tokenizer = self.get_component("tokenizer") qformer_tokenizer = self.get_qformer_tokenizer() - - if not tokenizer.pad_token: - tokenizer.pad_token = "[TEST_PAD]" if not qformer_tokenizer.pad_token: qformer_tokenizer.pad_token = "[TEST_PAD]" @@ -351,9 +344,6 @@ def test_tokenizer_defaults_preserved_by_kwargs(self): image_processor = self.get_component("image_processor") tokenizer = self.get_component("tokenizer", max_length=117, padding="max_length") qformer_tokenizer = self.get_qformer_tokenizer(max_length=117, padding="max_length") - - if not tokenizer.pad_token: - tokenizer.pad_token = "[TEST_PAD]" if not qformer_tokenizer.pad_token: qformer_tokenizer.pad_token = "[TEST_PAD]" @@ -376,9 +366,6 @@ def test_unstructured_kwargs(self): image_processor = self.get_component("image_processor") tokenizer = self.get_component("tokenizer") qformer_tokenizer = self.get_qformer_tokenizer() - - if not tokenizer.pad_token: - tokenizer.pad_token = "[TEST_PAD]" if not qformer_tokenizer.pad_token: qformer_tokenizer.pad_token = "[TEST_PAD]" @@ -409,11 +396,7 @@ def test_unstructured_kwargs_batched(self): self.skipTest(f"image_processor attribute not present in {self.processor_class}") image_processor = self.get_component("image_processor") tokenizer = self.get_component("tokenizer") - qformer_tokenizer = self.get_qformer_tokenizer() - - if not tokenizer.pad_token: - tokenizer.pad_token = "[TEST_PAD]" if not qformer_tokenizer.pad_token: qformer_tokenizer.pad_token = "[TEST_PAD]"