TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn’t support float64. Please use float32 instead.

该报错发生在 Apple Silicon Mac 上使用 MPS 后端运行 RT-DETRv2 模型推理时,根本原因是模型内部的 build_2d_sinusoidal_position_embedding 函数硬编码了 torch.float64 ,而 MPS 不支持 float64。优先排查该函








