Several models hardcode `torch.float64` in their forward pass, crashing on MPS (Apple Silicon)
Author: qflen
Pull request: no

### Summary

While auditing recent models for Apple Silicon (MPS) compatibility, I found two models that crash during a normal forward pass on MPS because they hardcode `torch.float64`, which the MPS backend does not support (`TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64`). 

These are distinct from the `build_2d_sinusoidal_position_embedding` family already tracked in #46159.

### Affected code

1. **MusicFlamingo**, `apply_rotary_time_emb` ([modular_musicflamingo.py](https://github.com/huggingface/transformers/blob/main/src/transformers/models/musicflamingo/modular_musicflamingo.py)): upcasts hidden states to `float64` inside the rotary time embedding, which runs on every forward, so any MusicFlamingo inference on MPS crashes. The result is cast back to the original dtype immediately afterwards, so the `float64` intermediate adds no precision for `float32`/`bfloat16` and only breaks MPS.
2. **UDOP**, `combine_image_text_embeddings` ([modeling_udop.py](https://github.com/huggingface/transformers/blob/main/src/transformers/models/udop/modeling_udop.py)): casts `bbox` to `float64`. The value is only compared against `0.0` and `1.0`, so `float64` is not needed.

### Reproduction (MPS, e.g. Apple Silicon)

```python
import torch
from transformers.models.musicflamingo.modeling_musicflamingo import apply_rotary_time_emb

x = torch.randn(1, 2, 4, 8, device="mps")
apply_rotary_time_emb(x, torch.randn_like(x), torch.randn_like(x))
# TypeError: Cannot convert a MPS Tensor to float64 dtype ...
```

```python
import torch
from transformers.models.udop.modeling_udop import combine_image_text_embeddings

combine_image_text_embeddings(
    torch.randn(1, 196, 8, device="mps"), torch.randn(1, 5, 8, device="mps"),
    torch.rand(1, 5, 4, device="mps"), None, torch.ones(1, 5, device="mps"), num_patches=14,
)
# TypeError: Cannot convert a MPS Tensor to float64 dtype ...
```

Both run fine on CPU and CUDA (which support `float64`); the failure is MPS-specific.

### Proposed fix

Fall back to `float32` on MPS and keep `float64` elsewhere, matching the existing precedent in `generation_whisper.py` (`torch.float32 if device.type == "mps" else torch.float64`). This leaves CPU and CUDA behavior unchanged and makes both forward passes run on MPS. I have this implemented with MPS regression tests and can open a PR.

### Audit context

I checked roughly 50 recent models on MPS (text, vision, audio, OCR, multimodal). Hardcoded `float64` is the only MPS crash class I found; the rest run correctly. The sinusoidal-position-embedding instances are already covered by #46159, so this issue is only about the two remaining, unrelated sites above.

### Environment

- transformers: main
- torch: 2.11.0
- platform: macOS, Apple Silicon (MPS)


Comments:
I'll be sending a PR momentarily

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.