[CI/Build] Declare the video modality on the CohereCompass reference model (#60063)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
stefankoncarevic
2026-10-05 16:25:42 +00:00
committed by GitHub
co-authored by Andreas Karatzas
parent d23af12cb1
commit 87954c5b04
2 changed files with 17 additions and 0 deletions
@@ -1111,6 +1111,19 @@ def qwen3_vl_patch_hf_runner(hf_model: HfRunner) -> HfRunner:
return hf_model
def cohere_compass_patch_hf_runner(hf_model: HfRunner) -> HfRunner:
"""Declare the video modality that CohereCompass omits upstream.
Without it ``generate`` leaves ``pixel_values_videos`` unconsumed and the
forward pass rejects it, see huggingface/transformers#49320. Drop this once
the pinned transformers declares the modality itself.
"""
model = hf_model.model
if "video" not in model.input_modalities:
model.input_modalities = (*model.input_modalities, "video")
return hf_model
def voxtral_patch_hf_runner(hf_model: "HfRunner") -> "HfRunner":
"""Patch HfRunner for Voxtral's conversation-based processor.