Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
979fccc9
Unverified
Commit
979fccc9
authored
Mar 07, 2024
by
regisss
Committed by
GitHub
Mar 07, 2024
Browse files
Enable BLIP for auto VQA (#29499)
* Enable BLIP for auto VQA * Make style * Add VQA to BLIP pipeline tests
parent
d45f47ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
src/transformers/models/auto/modeling_auto.py
src/transformers/models/auto/modeling_auto.py
+1
-0
tests/models/blip/test_modeling_blip.py
tests/models/blip/test_modeling_blip.py
+1
-0
No files found.
src/transformers/models/auto/modeling_auto.py
View file @
979fccc9
...
@@ -964,6 +964,7 @@ MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMES = OrderedDict(
...
@@ -964,6 +964,7 @@ MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMES = OrderedDict(
MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES
=
OrderedDict
(
MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES
=
OrderedDict
(
[
[
(
"blip"
,
"BlipForQuestionAnswering"
),
(
"blip-2"
,
"Blip2ForConditionalGeneration"
),
(
"blip-2"
,
"Blip2ForConditionalGeneration"
),
(
"vilt"
,
"ViltForQuestionAnswering"
),
(
"vilt"
,
"ViltForQuestionAnswering"
),
]
]
...
...
tests/models/blip/test_modeling_blip.py
View file @
979fccc9
...
@@ -432,6 +432,7 @@ class BlipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
...
@@ -432,6 +432,7 @@ class BlipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
{
{
"feature-extraction"
:
BlipModel
,
"feature-extraction"
:
BlipModel
,
"image-to-text"
:
BlipForConditionalGeneration
,
"image-to-text"
:
BlipForConditionalGeneration
,
"visual-question-answering"
:
BlipForQuestionAnswering
,
}
}
if
is_torch_available
()
if
is_torch_available
()
else
{}
else
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment