[Bugfix] Fixes MiniCPM-O resampler device placement to avoid tensor device mismatch (#42332)

Signed-off-by: j9smith <j.smith9103@outlook.com>
This commit is contained in:
Joel Smith
2026-06-17 08:35:27 +00:00
committed by GitHub
parent 6d8fff5698
commit 68ff30d40e
+3 -1
View File
@@ -719,7 +719,9 @@ class MiniCPMOBaseModel:
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
loader = AutoWeightsLoader(self, skip_prefixes=["tts"])
return loader.load_weights(weights)
loaded = loader.load_weights(weights)
self._ensure_resampler_device()
return loaded
def subsequent_chunk_mask(
self,