Can BlipForImageTextRetrieval be used to generate captions?
### System Info

`transformers` version: 4.31.0.dev0
Platform: Linux-5.15.0-76-generic-x86_64-with-debian-bullseye-sid
Python version: 3.7.15
Huggingface_hub version: 0.15.1
Safetensors version: 0.3.1
PyTorch version (GPU?): 1.13.1+cu117 (True)
Tensorflow version (GPU?): 2.11.0 (False)
Flax version (CPU?/GPU?/TPU?): not installed (NA)
Jax version: not installed
JaxLib version: not installed
Using GPU in script?: no
Using distributed or parallel set-up in script?: no

### Who can help?

@younesbelkada @ArthurZucker @amyeroberts

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

I am seeking a Blip model that can serve two purposes: predicting the similarity between an input image and text and generating a caption for an input image. I am aware that `BlipForImageTextRetrieval` is suitable for predicting the similarity between an image and text, while `BlipForConditionalGeneration` can generate captions for images. However, I was wondering whether either of these models can be employed to perform the alternate task as well.

A bit more context: I have a fine-tuned `BlipForImageTextRetrieval` model that I would like to use for generating captions.

### Expected behavior

Any guidance on obtaining a Blip model that can do both the tasks mentioned above would be extremely helpful. Thanks.
Hey! Since you are not reporting a bug, could you open a discussion on [the forum](https://discuss.huggingface.co/) for this kind of questions?<|||||>Sure, apologies. <|||||>No worries! 🤗 Feel free to ping @younesbelkada there