-
Notifications
You must be signed in to change notification settings - Fork 27.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blip dynamic input resolution #30722
Blip dynamic input resolution #30722
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work - thanks for adding this!
Just a small Q on the test outputs. Once sense-checked we'll be good to merge!
inputs = processor(images=image, return_tensors="pt").to(torch_device) | ||
|
||
predictions = model.generate(**inputs, interpolate_pos_encoding=True) | ||
self.assertEqual(predictions[0].tolist(), [30522, 1037, 2450, 3564, 2006, 1996, 3509, 2007, 1037, 3899, 102]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked the generated ids here to make sure they make sense for the picture i.e.:
processor.batch_decode([30522, 1037, 2450, 3564, 2006, 1996, 3509, 2007, 1037, 3899, 102])
@amyeroberts good point! the tests now also have a check for the textual content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work - thanks for adding this!
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
What does this PR do?
This PR adds ability to handle dynamic input image resolutions to the BLIP family of models.
Addresses #30579
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Ping: @amyeroberts