Skip to content

Commit

Permalink
New Model - BLIP2 Variant mBLIP and BLIP2 flan (#67)
Browse files Browse the repository at this point in the history
* add all remaining blip2 models from Salesforce

* add multilingual blip
  • Loading branch information
dnth authored Nov 13, 2024
1 parent 942215d commit 88e6181
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions xinfer/transformers/blip2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@
"transformers",
ModelInputOutput.IMAGE_TEXT_TO_TEXT,
)
@register_model(
"Salesforce/blip2-flan-t5-xl",
"transformers",
ModelInputOutput.IMAGE_TEXT_TO_TEXT,
)
@register_model(
"Salesforce/blip2-flan-t5-xl-coco",
"transformers",
ModelInputOutput.IMAGE_TEXT_TO_TEXT,
)
@register_model(
"Salesforce/blip2-opt-2.7b-coco",
"transformers",
ModelInputOutput.IMAGE_TEXT_TO_TEXT,
)
@register_model(
"Gregor/mblip-mt0-xl",
"transformers",
ModelInputOutput.IMAGE_TEXT_TO_TEXT,
)
@register_model(
"Gregor/mblip-bloomz-7b",
"transformers",
ModelInputOutput.IMAGE_TEXT_TO_TEXT,
)
class BLIP2(Vision2SeqModel):
def __init__(self, model_id: str, **kwargs):
super().__init__(model_id, **kwargs)

0 comments on commit 88e6181

Please sign in to comment.