BLIP-2 can be used for conditional text generation given an image and an optional text prompt. At inference time, it's recommended to use the [generate] method.
One can use [Blip2Processor] to prepare images for the model, and decode the predicted tokens ID's back to text.

Resources
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with BLIP-2.