[Model] Use merge_by_field_config for MM models (M-N) (#26710)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-10-14 01:27:01 +08:00
committed by GitHub
parent e3b90c1ba2
commit afc47e4de7
11 changed files with 127 additions and 331 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ def group_mm_kwargs_by_modality(
if device is not None:
mm_kwargs_group = json_map_leaves(
lambda x: x.to(device=device),
lambda x: x.to(device=device) if isinstance(x, torch.Tensor) else x,
mm_kwargs_group,
)
else: