Add Fast PromptDepthAnything Processor
Author: SamuelBarryCS
Pull request: yes

# What:
- Implement fast processor for PromptDepthAnything, following request in https://github.com/huggingface/transformers/issues/36978
- Add one additional test to tests/models/prompt_depth_anything to check for numerical value
- Add a **temporary file** (to be deleted before merging) to run additional test and get speed benchmark of classic vs. fast implementation
 
# Test performed:
- Run `RUN_SLOW=1 python -m pytest tests/models/prompt_depth_anything/test_image_processing_prompt_depth_anything.py -v`, all passing: 
<img width="338" height="49" alt="image" src="https://github.com/user-attachments/assets/1d0b2d7d-c722-48ce-bec3-f382b52f35a5" />

- Run the temporary file to get additional confidence in the fast processor output & get speed benchmarks:
```
📱 Testing on device: cpu
------------------------------

🔧 Config: batch_size=1, image_size=(384, 384)
⏳ Benchmarking slow processor...
⚡ Benchmarking fast processor...
📊 Results:
   Slow: 0.0032s ± 0.0004s
   Fast: 0.0006s ± 0.0000s
   Speedup: 5.83x
✅ Output verification: PASSED
   (Shape checked ✓, pixel value equality checked ✓, depth value equality checked ✓)

🔧 Config: batch_size=1, image_size=(512, 512)
⏳ Benchmarking slow processor...
⚡ Benchmarking fast processor...
📊 Results:
   Slow: 0.0049s ± 0.0003s
   Fast: 0.0014s ± 0.0001s
   Speedup: 3.42x
✅ Output verification: PASSED
   (Shape checked ✓, pixel value equality checked ✓, depth value equality checked ✓)
...
...
(all 12 cases passing)
```

# Impact metrics
- 10x speedup on 1 H100 setup

**Speed benchmark (normal vs fast)** on CPU:
<img width="1783" height="882" alt="image" src="https://github.com/user-attachments/assets/5cf7e90c-cb48-40db-8a55-9c9d72a5b1b0" />

**Speed benchmark (normal vs fast)** on 1 H100:
<img width="1784" height="882" alt="image" src="https://github.com/user-attachments/assets/1df7f5fe-3655-4bab-9ae0-34fa5e67e1ee" />


# How to review:
- Read diff
- Run tests with `RUN_SLOW=1 python -m pytest tests/models/prompt_depth_anything/test_image_processing_prompt_depth_anything.py -v`

# TODO/ Next:
- NA


Comments:
cc @yonigozlan, ready for review 🤗!

cc @yonigozlan 

@yonigozlan I actually have to fix things - I turned back the PR in draft/ WIP
Sorry about that. Let me ping you once it's reviewable

Hey @yonigozlan!
Thanks a lot for the comments again, it was definitely super helpful - and sorry that you had to put that many, next time I will try to save your time by requiring less comments! :) 

I addressed all of your points and left unresolved the ones where I still had questions/ points of discussion. Feel free to do another pass when you get the time.
FYI with the updated implementation all the (updated) tests are still running fine, and I rerun my vibecoded script to check output shape, pixel equality and depth equality and it's still all passing! :) 
Thanks 🤗!


Actually @yonigozlan , isn't there a bug in the slow processor ?https://github.com/huggingface/transformers/blob/29e567e15cea082d9b5bc13f2c67f4f75c23239d/src/transformers/models/prompt_depth_anything/image_processing_prompt_depth_anything.py#L266
Why are we getting left/right pd using height and not width ? ... I am doing `pad_size_left, pad_size_right = _get_pad(width, size_divisor)` in fast processor which makes much more sense in my opinion

@yonigozlan it looks like I found a bug in the behavior of the slow processor.
Cf below where I'm logging` encoding_slow.prompt_depth.shape` & `encoding_fast.prompt_depth.shape` for` torchify = True/ False` in `images = self.image_processor_tester.prepare_image_inputs(equal_resolution=True, torchify=True)` in `test_slow_fast_equivalence_batched`:

```
=== TORCHIFY=FALSE ===
Slow processor: torch.Size([7, 1, 192, 256])
Fast processor: torch.Size([7, 1, 192, 256])

=== TORCHIFY=TRUE ===
Slow processor: torch.Size([7, 192, 256, 1])
Fast processor: torch.Size([7, 1, 192, 256])
```

The issue comes from applying to_channel_dimension_format with the wrong input channel dim. I fixed it in https://github.com/huggingface/transformers/pull/40602/commits/6aec2cfbc5c52a26d246e5338c94227110bd4e14. After the fix, the logging looks as follow:  

```
=== TORCHIFY=FALSE ===
Slow processor: torch.Size([7, 1, 192, 256])
Fast processor: torch.Size([7, 1, 192, 256])

=== TORCHIFY=TRUE ===
Slow processor: torch.Size([7, 1, 192, 256])
Fast processor: torch.Size([7, 1, 192, 256])
```

which is way better :) ! 

Should be ready for another (hopefully final) round of review @yonigozlan 🤗

> Actually @yonigozlan , isn't there a bug in the slow processor ?
> 
> https://github.com/huggingface/transformers/blob/29e567e15cea082d9b5bc13f2c67f4f75c23239d/src/transformers/models/prompt_depth_anything/image_processing_prompt_depth_anything.py#L266
> 
> 
> Why are we getting left/right pd using height and not width ? ... I am doing `pad_size_left, pad_size_right = _get_pad(width, size_divisor)` in fast processor which makes much more sense in my opinion


Indeed thanks for catching that! Looks like it was functionally correct because it's also reversed in the call to pad, but definitely misleading

> @yonigozlan it looks like I found a bug in the behavior of the slow processor. Cf below where I'm logging` encoding_slow.prompt_depth.shape` & `encoding_fast.prompt_depth.shape` for` torchify = True/ False` in `images = self.image_processor_tester.prepare_image_inputs(equal_resolution=True, torchify=True)` in `test_slow_fast_equivalence_batched`:
> 
> ```
> === TORCHIFY=FALSE ===
> Slow processor: torch.Size([7, 1, 192, 256])
> Fast processor: torch.Size([7, 1, 192, 256])
> 
> === TORCHIFY=TRUE ===
> Slow processor: torch.Size([7, 192, 256, 1])
> Fast processor: torch.Size([7, 1, 192, 256])
> ```
> 
> The issue comes from applying to_channel_dimension_format with the wrong input channel dim. I fixed it in [6aec2cf](https://github.com/huggingface/transformers/commit/6aec2cfbc5c52a26d246e5338c94227110bd4e14). After the fix, the logging looks as follow:
> 
> ```
> === TORCHIFY=FALSE ===
> Slow processor: torch.Size([7, 1, 192, 256])
> Fast processor: torch.Size([7, 1, 192, 256])
> 
> === TORCHIFY=TRUE ===
> Slow processor: torch.Size([7, 1, 192, 256])
> Fast processor: torch.Size([7, 1, 192, 256])
> ```
> 
> which is way better :) !

Niice thanks for fixing!

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

run-slow: auto, prompt_depth_anything

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

Perfect, thanks a lot for the last round of edit & merging! 🤗