[ModelRunner V2] Fix whisper test (#46773)

This commit is contained in:
Nick Hill
2026-06-25 22:10:36 -07:00
committed by GitHub
parent 1a4984520e
commit 5b33041746
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -12,6 +12,9 @@ class EncoderCache:
# MM hash -> encoder outputs
self.encoder_outputs: dict[str, torch.Tensor] = {}
def __len__(self) -> int:
return len(self.encoder_outputs)
def add_request(
self, req_id: str, mm_features: list[MultiModalFeatureSpec]
) -> None:
@@ -121,10 +121,10 @@ def maybe_create_mm_pruner(
) -> MultiModalPruner | None:
"""Create a MultiModalPruner if the model prunes embeddings and uses M-RoPE."""
if (
not rope_state
rope_state is None
or not rope_state.has_delta
or not encoder_cache
or not model_config.multimodal_config
or encoder_cache is None
or model_config.multimodal_config is None
or not model_config.multimodal_config.is_multimodal_pruning_enabled()
or not supports_multimodal_pruning(model)
):