Skip to content

Commit

Permalink
Enable BLIP for auto VQA (huggingface#29499)
Browse files Browse the repository at this point in the history
* Enable BLIP for auto VQA

* Make style

* Add VQA to BLIP pipeline tests
  • Loading branch information
regisss authored and damithsenanayake committed Mar 7, 2024
1 parent 35a73be commit 95a3ece
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/models/auto/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@

MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES = OrderedDict(
[
("blip", "BlipForQuestionAnswering"),
("blip-2", "Blip2ForConditionalGeneration"),
("vilt", "ViltForQuestionAnswering"),
]
Expand Down
1 change: 1 addition & 0 deletions tests/models/blip/test_modeling_blip.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ class BlipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
{
"feature-extraction": BlipModel,
"image-to-text": BlipForConditionalGeneration,
"visual-question-answering": BlipForQuestionAnswering,
}
if is_torch_available()
else {}
Expand Down

0 comments on commit 95a3ece

Please sign in to comment.