Pix2StructImageProcessor does not accept list of PIL Images
### System Info

- `transformers` version: 4.30.2
- Platform: Linux-5.10.133+-x86_64-with-glibc2.10
- Python version: 3.8.13
- Huggingface_hub version: 0.15.1
- Safetensors version: 0.3.1
- PyTorch version (GPU?): 2.0.1+cu117 (True)

### Who can help?

@younesbelkada 

### Information

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

### Tasks

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

### Reproduction

Pix2StructImageProcessor does not work if I pass in a list of PIL images as input. It works after I uncomment line 373-379: https://github.com/huggingface/transformers/blob/66fd3a8d626a32989f4569260db32785c6cbf42a/src/transformers/models/pix2struct/image_processing_pix2struct.py#L373

### Expected behavior

According to the documentation, Pix2StructImageProcessor should be able to process list of PIL images.
Hi. Could you show us the full error log, please. Thanks.

cc @amyeroberts <|||||>Hi @LiJunnan1992 

The script below seems to work on the main branch of transformers. Can you share a reproducible snippet? 🙏 Thanks!

```python
import requests
from PIL import Image
from transformers import Pix2StructProcessor

processor = Pix2StructProcessor.from_pretrained("google/pix2struct-textcaps-base")

url = "https://www.ilankelman.org/stopsigns/australia.jpg"
images = [Image.open(requests.get(url, stream=True).raw) for _ in range(4)]

inputs = processor(images, return_tensors="pt")
```

This script works as well:

```python
import requests
from PIL import Image
from transformers import Pix2StructProcessor, Pix2StructImageProcessor

processor = Pix2StructProcessor.from_pretrained("google/pix2struct-textcaps-base")

image_processor = Pix2StructImageProcessor()

url = "https://www.ilankelman.org/stopsigns/australia.jpg"
images = [Image.open(requests.get(url, stream=True).raw) for _ in range(4)]

_ = processor(images, return_tensors="pt")
_ = image_processor(images, return_tensors="pt")
```<|||||>The main branch indeed works without error. Closing this issue. Thanks!