[Bugfix][Gemma4] Keep image kwargs out of video preprocessing (#56652)

Signed-off-by: Ylean <61880605+Woolgathererer@users.noreply.github.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Ylean
2026-09-13 09:07:12 +00:00
committed by GitHub
co-authored by Codex
parent fa008bdccf
commit a987777755
2 changed files with 71 additions and 0 deletions
+3
View File
@@ -629,6 +629,9 @@ class Gemma4MultiModalProcessor(BaseMultiModalProcessor[Gemma4ProcessingInfo]):
# Process frames as images with max_soft_tokens=70
video_mm_kwargs = dict(hf_processor_mm_kwargs)
# Override configured image options too: these inputs are video
# frames, whose cache keys exclude images_kwargs.
video_mm_kwargs["images_kwargs"] = {}
video_mm_kwargs["max_soft_tokens"] = _VIDEO_MAX_SOFT_TOKENS
dummy_prompt = ("\t" + processor.image_token) * len(frames)