fix(aria): use math.ceil in get_number_of_image_patches to match actual patch count
Author: arnavkewalram
Pull request: yes

## What

Fixes a floor-vs-ceiling mismatch in `get_number_of_image_patches` that caused the reported patch count to be lower than the number of patches `get_image_patches` actually produces.

Fixes #46728.

## Root cause

`get_number_of_image_patches` computed:

```python
num_patches = resized_height // max_image_size * resized_width // max_image_size
```

Two problems with this expression:

1. **Operator precedence bug**: Python evaluates `//` and `*` left-to-right with equal precedence, so the expression is actually `((resized_height // max_image_size) * resized_width) // max_image_size` — not `(resized_height // max_image_size) * (resized_width // max_image_size)`.

2. **Floor vs ceil mismatch**: `get_image_patches` calls `divide_to_patches(padded_image, patch_size=max_image_size)`, which iterates `range(0, height, patch_size)` — equivalent to `ceil(height / patch_size)` patches per dimension. With `max_image_size=980` the default `split_resolutions` include odd multiples of 490 (490, 1470, 2450…) that are not divisible by 980, so floor and ceil diverge:

| best_resolution | old result | correct (ceil) |
|-----------------|-----------|----------------|
| [490, 980]      | 0         | 1              |
| [980, 490]      | 0         | 1              |
| [980, 1470]     | 1         | 2              |
| [1470, 980]     | 1         | 2              |
| [1470, 1470]    | 1         | 4              |

A returned count of 0 means `num_image_tokens = size_conversion[max_size] * 0 = 0`, so the model receives no image placeholder tokens — completely misaligning visual embeddings with text positions at inference time.

## Fix

```python
# Before
num_patches = 1 if not split_image else resized_height // max_image_size * resized_width // max_image_size

# After
num_patches = (
    1
    if not split_image
    else math.ceil(resized_height / max_image_size) * math.ceil(resized_width / max_image_size)
)
```

The same fix is applied to `modular_aria.py` (authoritative source) and both auto-generated variants (`image_processing_aria.py`, `image_processing_pil_aria.py`).

> **Note**: The local `modular_model_converter.py` cannot be run due to a pre-existing `KeyError: 'AriaModelOutputWithPast'` in the converter. The three files were updated in sync by hand; the diff is identical in all three. Happy to regenerate via CI if you can point me to the right workflow.

## Tests

- Updated existing `test_get_num_patches_without_images`: the third case expected `19` (the value the old expression happened to produce via operator-precedence quirk). Correct value is `25` (`ceil(980/200) * ceil(980/200)`).
- Added `test_get_num_patches_ceil_matches_actual_patch_count`: exercises the `max_image_size=980` configurations with odd-multiple resolutions that the old formula got wrong.

## Affected files

- `src/transformers/models/aria/modular_aria.py`
- `src/transformers/models/aria/image_processing_aria.py` (auto-generated)
- `src/transformers/models/aria/image_processing_pil_aria.py` (auto-generated)
- `tests/models/aria/test_image_processing_aria.py`

Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_46732). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@bot /repo

Repo. Consistency bot fixed some files and pushed the changes.

**[For maintainers]** Suggested jobs to run (before merge)

run-slow: aria

**CI Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=46732)