Unverified Commit e812bf70 authored by Netanel Haber's avatar Netanel Haber Committed by GitHub
Browse files

Restore non-hf processor path for Nano-Nemotron-VL (bypass...


Restore non-hf processor path for Nano-Nemotron-VL (bypass `call_hf_processor_mm_only`) - fixes #38018 (#38567)
Signed-off-by: default avatarNetanel Haber <58652339+netanel-haber@users.noreply.github.com>
Co-authored-by: default avatartomeras91 <57313761+tomeras91@users.noreply.github.com>
parent bcc6f674
...@@ -307,6 +307,20 @@ class NanoNemotronVLProcessingInfo(BaseProcessingInfo): ...@@ -307,6 +307,20 @@ class NanoNemotronVLProcessingInfo(BaseProcessingInfo):
class NanoNemotronVLMultiModalProcessor( class NanoNemotronVLMultiModalProcessor(
BaseMultiModalProcessor[NanoNemotronVLProcessingInfo] BaseMultiModalProcessor[NanoNemotronVLProcessingInfo]
): ):
def _call_hf_processor(
self,
prompt: str,
mm_data: Mapping[str, object],
mm_kwargs: Mapping[str, object],
tok_kwargs: Mapping[str, object],
) -> BatchFeature:
"""
Bypass `call_hf_processor_mm_only` by no-op overriding`_call_hf_processor`,
so it chooses this path:
`type(self)._call_hf_processor != BaseMultiModalProcessor._call_hf_processor`
"""
return super()._call_hf_processor(prompt, mm_data, mm_kwargs, tok_kwargs)
def _get_image_fields_config(self, hf_inputs: BatchFeature): def _get_image_fields_config(self, hf_inputs: BatchFeature):
if self.info.is_dynamic_tiler: if self.info.is_dynamic_tiler:
pixel_values_flat = MultiModalFieldConfig.batched("image") pixel_values_flat = MultiModalFieldConfig.batched("image")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment