ImportError: Blip2ForConditionalGeneration
### System Info


I am trying to run Image captioning using `BLIP2` using the steps mentioned in [Link](https://huggingface.co/blog/blip-2#using-blip-2-with-hugging-face-transformers). However, there seems to be import error for `BLIP2ForConditionalGeneration`

`transformers version: 4.27.0.dev0`

Issue
```bash
Traceback (most recent call last):
  File "/home/aayush/ControlNet/blip2_captions_test.py", line 4, in <module>
    from transformers import AutoProcessor, BLIP2ForConditionalGeneration
ImportError: cannot import name 'Blip2ForConditionalGeneration' from 'transformers' (/home/aayush/miniconda3/envs/diffusers/lib/python3.10/site-packages/transformers/__init__.py)
```



### Who can help?

_No response_

### 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

1. pip install transformers
2. Run the following snippet

```
from PIL import Image
from transformers import AutoProcessor, Blip2ForConditionalGeneration
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b")
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b", torch_dtype=torch.float16)
```

### Expected behavior

It should have started downloading the blip-2 models locally
Hi, thanks for using BLIP-2!

It's Blip2ForConditionalGeneration, not BLIP2ForConditionalGeneration ;)<|||||>@NielsRogge 

Same issue changing to `Blip2ForConditionalGeneration`
```bash
  File "/home/aayush/ControlNet/blip2_captions_test.py", line 4, in <module>
    from transformers import AutoProcessor, Blip2ForConditionalGeneration
ImportError: cannot import name 'Blip2ForConditionalGeneration' from 'transformers' (/home/aayush/miniconda3/envs/diffusers/lib/python3.10/site-packages/transformers/__init__.py))
```<|||||>@NielsRogge 

I installed `transformers` from source now
```bash
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .
```
instead of `pip install git+https://github.com/huggingface/transformers` or `pip install transformers`.

It works now!


<|||||>Ok, I thought you were already using that since you mentioned transformers version: 4.27.0.dev0.

Feel free to close this issue if it's resolved :)<|||||>I installed from the source but still getting the same error. Any update here?
<|||||>@minarainbow How did you installed from source?

This way (worked!)
```
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .
```
or (error)

```
pip install git+https://github.com/huggingface/transformers
``

<|||||>Best is to do:

```
pip install git+https://github.com/huggingface/transformers.git@main
```