[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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user