tests: reduce processor test memory usage and use tiny test assets
Author: ydshieh
Pull request: yes

## Summary

(merge directly as it's almost just to use tiny files, and the gain is obvious)

Follow-up to #47005. Reduces memory and runtime of processor tests by:

- **Replacing large test assets**: swap 4K `tiny_video.mp4` (3840×2160, 261 MB decoded) with `tiny_video_320x240.mp4`; replace external CDN image URLs with local test fixtures — [see asset details](https://github.com/huggingface/transformers/pull/47168#issuecomment-4913288283)
- **Smaller image/video processors in test setup**: override `_setup_image_processor` / `_setup_video_processor` in idefics2, MiniCPMV4_6, QianfanOCR, Owlv2, Donut, SmolVLM, internvl to use 64×64 images and reduced tile counts
- **Fix `_get_num_multimodal_tokens`** in idefics3 and colmodernvbert: formula now correctly handles tokenizers where `\n\n` is 1 vs 2 tokens — this fix is self-contained and correct on main independently of the test changes
- **Audio**: cap feature-extractor chunk length in qwen2_5_omni / qwen3_omni_moe tests
- **Other**: override `prepare_video_inputs` in llava_next_video to use tiny frames; re-skip unreleased Cohere2Vision processor test

Net effect (across 39 processor test files): peak RSS −39%, net memory growth −67%, wall time −33% — [see full benchmark](https://github.com/huggingface/transformers/pull/47168#issuecomment-4913049814)


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

## Memory benchmark: before vs after (24 processor test files)

**Before** (main @ `187fda1b`): total delta 8503 MB, 29 tests ≥ 100 MB, wall time 174s
**After** (this PR): total delta 2951 MB, 1 test ≥ 100 MB, wall time 133s

| Metric | Before | After | Change |
|---|---|---|---|
| Total memory delta | 8503 MB | 2951 MB | **−65%** |
| Tests ≥ 100 MB | 29 | 1 | **−97%** |
| Wall time | 174s | 133s | **−24%** |

### After — per-model summary (sorted by max Δ MB)

```
   Max dMB   Total dMB   >=10MB   Wall Time  Max End MB  Model
----------  ----------  -------  ----------  ----------  --------------------
  +   101.2       308.7        8        3.5s      1074.5  llava_onevision
  +    82.4       329.9        7        8.4s      1048.0  smolvlm
  +    72.2       490.1       11        8.2s      1058.0  qwen2_5_omni
  +    70.3       180.1        4        7.2s       956.3  idefics3
  +    67.3       234.5        5        6.9s      1032.7  qwen3_omni_moe
  +    52.7       167.9        6       12.0s      1074.1  videoprism
  +    48.9       103.6        2        6.3s       975.9  video_llama_3
  +    48.8        91.0        2        5.4s       962.0  glm46v
  +    48.7        87.1        2        6.6s       954.9  internvl
  +    48.7       153.3        5        5.7s      1028.4  llava_next_video
  +    48.7        91.7        2        5.5s       967.0  qwen2_5_vl
  +    48.7        79.6        1        4.7s       954.9  qwen3_vl
  +    48.6        94.1        2        5.3s       964.3  glm4v
  +    48.6        91.5        2        5.5s       961.3  qwen2_vl
  +    48.2        89.5        2        5.6s       965.3  minicpmv4_6
  +    48.1        82.5        2       10.9s       964.9  ernie4_5_vl_moe
  +    34.6       133.4        6        6.6s       963.5  aria
  +    30.8        70.6        3        1.8s       937.9  owlv2
  +     8.7        24.5        0        4.5s       900.0  aya_vision
  +     6.7        18.0        0        4.2s       897.1  qianfan_ocr
  +     6.6        16.8        0        5.3s       963.5  idefics2
  +     6.2        12.5        0        2.2s       893.6  donut
  +     0.0         0.0        0        0.0s       830.6  cohere2_vision
```

Only 1 test remains above 100 MB: `llava_onevision::test_processor_text_has_no_visual` (+101 MB), which loads the full model tokenizer (pre-existing issue, not introduced here).

### Before — per-model summary (sorted by max Δ MB)

```
   Max dMB   Total dMB   >=10MB   Wall Time  Max End MB  Model
----------  ----------  -------  ----------  ----------  --------------------
  +   700.4       997.8        3        8.8s      1792.3  minicpmv4_6
  +   442.8       601.5        2        6.7s      1471.0  qwen2_vl
  +   396.4       552.7        2       17.7s      1430.6  ernie4_5_vl_moe
  +   393.6       691.4        6       13.1s      1486.3  qwen2_5_omni
  +   352.2       507.7        2        7.1s      1381.4  qwen2_5_vl
  +   310.9       475.8        2        6.1s      1350.3  qwen3_vl
  +   304.6       526.2        3       10.0s      1399.2  qwen3_omni_moe
  +   295.6       531.5        5       14.4s      1384.8  smolvlm
  +   261.8       420.7        2        7.6s      1294.5  internvl
  +   247.5       425.4        3        6.4s      1299.3  glm4v
  +   172.1       449.2        9        4.4s      1248.2  llava_onevision
  +   166.2       448.6        9        8.9s      1270.9  llava_next_video
  +   151.2       332.2        3        7.1s      1207.2  glm46v
  +   131.7       236.3        2        8.1s      1111.5  video_llama_3
  +   108.3       230.4        4       12.6s      1101.7  videoprism
  +    96.4       252.6        5        3.7s      1100.2  idefics2
  +    91.8       144.1        3        3.9s      1022.2  qianfan_ocr
  +    91.6       160.4        4        8.9s      1008.6  donut
  +    56.5       168.7        6        4.2s      1008.0  aria
  +    47.2       140.4        4        9.6s       984.8  idefics3
  +    47.0       179.5       10        1.3s      1053.3  owlv2
  +     8.6        29.6        0        3.2s       904.8  aya_vision
  +     0.0         0.0        0        0.0s       830.7  cohere2_vision
```

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

run-slow: aria, aya_vision, cohere2_vision, colmodernvbert, donut, ernie4_5_vl_moe, glm46v, glm4v, idefics2, idefics3, internvl, llava_next_video, llava_onevision, minicpmv4_6, owlv2, qianfan_ocr

## Asset URL replacements (follow-up from this PR)

The commits below (on branch `debug_mem`) replaced all high-res / external test assets with low-res copies hosted in `hf-internal-testing/test-videos`.

### Videos

| Old asset | Resolution | Test files affected |
|-----------|-----------|---------------------|
| `raushan-testing-hf/videos-test/tiny_video.mp4` | 3840×2160 4K, 11 frames (~261 MB decoded) | `test_processing_common.py`, `ernie4_5_vl_moe`, `glm46v`, `glm4v`, `llava_next_video`, `llava_onevision`, `qwen2_5_omni`, `qwen2_5_vl`, `qwen2_vl`, `qwen3_omni_moe`, `qwen3_vl`, `smolvlm`, `video_llama_3` |
| `raushan-testing-hf/videos-test/Big_Buck_Bunny_720_10s_10MB.mp4` | 1280×720 | `test_processing_common.py` |
| `raushan-testing-hf/videos-test/sample_demo_1.mp4` | unknown | `test_processing_common.py`, `qwen2_5_omni`, `qwen3_omni_moe` |
| `hf-internal-testing/fixtures_videos/tennis.mp4` | 1280×720, 182 frames | `internvl` |

**Replaced with** (all in `hf-internal-testing/test-videos`):

| New asset | Resolution |
|-----------|-----------|
| `tiny_video_320x240.mp4` | 320×240, 11 frames |
| `big_buck_bunny_320x240_10s.mp4` | 320×240 |
| `sample_demo_1_320x240.mp4` | 320×240 |
| `tennis_320x240.mp4` | 320×240, 16 frames |

### Images (idefics2 — replaced external CDN URLs)

| Old asset | New asset (hf-internal-testing/test-videos) |
|-----------|---------------------------------------------|
| `cdn.britannica.com/.../Statue-of-Liberty-Island-New-York-Bay.jpg` | `statue_of_liberty_64x64.jpg` |
| `cdn.britannica.com/.../Skyline-Chicago.jpg` | `chicago_64x64.jpg` |
| `thumbs.dreamstime.com/.../golden-gate-bridge...jpg` | `golden_gate_64x64.jpg` |
| (image used in internvl interleaved test) | `view_64x64.jpg` |

### Image processor size overrides (new `_setup_image_processor` / `_setup_video_processor` hooks)

Beyond URL replacements, the following processor test classes now override spatial resolution in `setUpClass` so all tests use tiny tensors instead of the model's real-world defaults:

| Model | Default | Test override | Savings |
|-------|---------|--------------|---------|
| `donut` | 2560×1920 (document scanning) | 64×64 | ~59 MB per image → ~0.05 MB |
| `owlv2` | 960×960 | 64×64 | ~11 MB per image |
| `qianfan_ocr` | 448×448, max_patches=12 | 64×64, max_patches=1 | ~27 MB per image |
| `minicpmv4_6` (image) | scale_resolution=448, max_slice_nums=9 | scale_resolution=64, max_slice_nums=1 | ~21 MB per image |
| `minicpmv4_6` (video) | scale_resolution=448, max_slice_nums=9 | scale_resolution=64, max_slice_nums=1 | reduces per-frame features from 14 KB to 0.1 KB |
| `smolvlm` (video) | max_image_size=364 | max_image_size=64 | reduces video frame tensors ~32× |
| `idefics2` | shortest_edge=378 | shortest_edge=64, longest_edge=64 | 309 MB total → 17 MB total |
| `internvl` | 448×448 | 20×20 | reduces frame/image tensors ~500× |

slow tests are run with SSH runner.

<!-- ci-dashboard-recap:start -->

---

### CI recap

**Dashboard:** [View test results in Grafana](https://transformers-ci.lor-e.huggingface.cool/d/pytest-observability-by-pr/pytest-observability-branch?var-pr=47168)
**Latest run:** [28930625929:1](https://github.com/huggingface/transformers/actions/runs/28930625929)
**Result:** `success` | **Jobs:** 15 | **Tests:** 172,305 | **Failures:** 0 | **Duration:** 7h 52m

<!-- ci-dashboard-recap:end -->