[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:
@@ -814,8 +814,11 @@ class SkyworkR1VChatModel(nn.Module, SupportsMultiModal, SupportsPP):
|
||||
)
|
||||
|
||||
image_token_id = kwargs["image_token_id"]
|
||||
assert isinstance(image_token_id, torch.Tensor)
|
||||
self.img_context_token_id = image_token_id.flatten().unique().item()
|
||||
if isinstance(image_token_id, torch.Tensor):
|
||||
image_token_id = image_token_id.flatten().unique().item()
|
||||
|
||||
assert isinstance(image_token_id, int)
|
||||
self.img_context_token_id = image_token_id
|
||||
|
||||
if pixel_values_flat is not None:
|
||||
return SkyworkR1VImagePixelInputs(
|
||||
|
||||
Reference in New Issue
Block a user