[Refactor] Define MM data parser in processing info instead of processor itself (#33260)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -1860,6 +1860,12 @@ def get_frame_times_and_chosen_fps(
|
||||
|
||||
|
||||
class Molmo2ProcessingInfo(BaseProcessingInfo):
|
||||
def get_data_parser(self):
|
||||
return MultiModalDataParser(
|
||||
video_needs_metadata=True,
|
||||
expected_hidden_size=self._get_expected_hidden_size(),
|
||||
)
|
||||
|
||||
def get_hf_processor(self, **kwargs: object) -> Molmo2ProcessorWrapper:
|
||||
processor = self.ctx.get_hf_processor(**kwargs)
|
||||
hf_config = self.ctx.get_hf_config()
|
||||
@@ -2183,9 +2189,6 @@ class Molmo2MultiModalProcessor(BaseMultiModalProcessor[Molmo2ProcessingInfo]):
|
||||
|
||||
return prompt_tokens
|
||||
|
||||
def _get_data_parser(self) -> MultiModalDataParser:
|
||||
return MultiModalDataParser(video_needs_metadata=True)
|
||||
|
||||
def _call_hf_processor(
|
||||
self,
|
||||
prompt: str,
|
||||
|
||||
Reference in New Issue
Block a user