diff --git a/tests/models/multimodal/generation/test_vit_cudagraph.py b/tests/models/multimodal/generation/test_vit_cudagraph.py index d927c547f4..1972064b1d 100644 --- a/tests/models/multimodal/generation/test_vit_cudagraph.py +++ b/tests/models/multimodal/generation/test_vit_cudagraph.py @@ -286,6 +286,12 @@ MODEL_CONFIGS: dict[str, VitCudagraphTestConfig] = { "user\n<|video|>\nDescribe this video in one sentence." "\nmodel\n" ), + # The 16-frame test video produces 1056 vision tokens. Capture only + # the smallest supported bucket that covers it instead of all default + # buckets through max_model_len, which adds unrelated memory pressure. + compilation_config_overrides={ + "encoder_cudagraph_token_budgets": [1120], + }, needs_video_metadata=True, marks=[pytest.mark.core_model], ), diff --git a/vllm/model_executor/models/gemma4_mm.py b/vllm/model_executor/models/gemma4_mm.py index 7263d77896..aa9669aeb1 100644 --- a/vllm/model_executor/models/gemma4_mm.py +++ b/vllm/model_executor/models/gemma4_mm.py @@ -801,7 +801,7 @@ class Gemma4MultiModalProcessor(BaseMultiModalProcessor[Gemma4ProcessingInfo]): MultiModalFieldConfig.flat_from_sizes("video", vfc) ), video_frame_counts=MultiModalFieldConfig.batched( - "video", + "video", keep_on_cpu=True ), video_num_soft_tokens=MultiModalFieldConfig.batched( "video", keep_on_cpu=True