Flaky feature extraction tests for Donut
### System Info

Note: I have observed with my own setup, but most recently this was seen in a CI environment  

- `transformers` version: 4.26.0.dev0
- Platform: macOS-13.0.1-arm64-arm-64bit
- Python version: 3.9.15
- Huggingface_hub version: 0.11.0
- PyTorch version (GPU?): 1.14.0.dev20221118 (False)
- Tensorflow version (GPU?): 2.10.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.5.3 (cpu)
- Jax version: 0.3.6
- JaxLib version: 0.3.5
- Using GPU in script?: Noe
- Using distributed or parallel set-up in script?: No

### Who can help?

@amyeroberts 

### Information

- [X] 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

pytest tests/models/donut/test_feature_extraction_donut.py::DonutFeatureExtractionTest

### Expected behavior

Tests don't randomly fail e.g. like in [this CI run](https://app.circleci.com/pipelines/github/huggingface/transformers/53575/workflows/40f5b896-c941-4a9f-8946-26f54bb14505/jobs/644204).

There is an issue occurring when the amount to pad is being calculated - some dimensions are having negative padding found. 
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.<|||||>This is not yet resolved. <|||||>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.