KeyError when setting ignore_mismatched_sizes=True  in Blip2ForConditionalGeneration
### System Info

### Issue
When setting ```ignore_mismatched_sizes=True``` in ```Blip2ForConditionalGeneration```,  a KeyError is raised. 



### Who can help?

_No response_

### Information

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

### Tasks

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

### Reproduction

### Env

```
transformers==4.28.0.dev0
```

### Reproduction

* blip2-flan-t5-xl
```
from transformers import Blip2ForConditionalGeneration

model_name = "Salesforce/blip2-flan-t5-xl" 
model = Blip2ForConditionalGeneration.from_pretrained(model_name, ignore_mismatched_sizes=True)
```
the output is ```KeyError: 'language_model.decoder.block.0.layer.2.DenseReluDense.wi_1.weight'```

* blip2-opt-2.7b
```
from transformers import Blip2ForConditionalGeneration

model_name = "Salesforce/blip2-opt-2.7b" 
model = Blip2ForConditionalGeneration.from_pretrained(model_name, ignore_mismatched_sizes=True)
```
the output is ```KeyError: 'language_model.lm_head.weight'```

### Expected behavior

I would like to revised the input resolution, which needs to set ``` ignore_mismatched_sizes=True```.
I fixed this possible issue in #22564, and I would like to know whether there are any other reasons.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.