Skip to content
1 change: 1 addition & 0 deletions tests/model_executor/test_qwen3_omni.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def test_qwen3_omni_get_updates_use_audio_in_video(

# Create a mock context
mock_ctx = Mock(spec=InputProcessingContext)
mock_ctx.tokenizer = mock_tokenizer

# Create processing info
info = Qwen3OmniMoeThinkerProcessingInfo(mock_ctx)
Expand Down
3 changes: 3 additions & 0 deletions vllm/model_executor/models/terratorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def get_dummy_mm_data(


class TerratorchMultiModalProcessor(BaseMultiModalProcessor[TerratorchProcessingInfo]):
# Terratorch models, including Prithvi, consume tokenizer-free inputs.
requires_tokenizer = False

def _get_mm_fields_config(
self,
hf_inputs: BatchFeature,
Expand Down
10 changes: 10 additions & 0 deletions vllm/multimodal/processing/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from functools import lru_cache
from typing import (
TYPE_CHECKING,
ClassVar,
Generic,
NamedTuple,
Protocol,
Expand Down Expand Up @@ -1033,6 +1034,8 @@ class BaseMultiModalProcessor(ABC, Generic[_I]):
Not to be confused with `transformers.ProcessorMixin`.
"""

requires_tokenizer: ClassVar[bool] = True

def __init__(
self,
info: _I,
Expand All @@ -1042,6 +1045,13 @@ def __init__(
) -> None:
super().__init__()

if self.requires_tokenizer and info.ctx.tokenizer is None:
raise ValueError(
f"{type(self).__name__} requires a tokenizer and cannot be "
"initialized when `skip_tokenizer_init=True`. Disable "
"`--skip-tokenizer-init`."
)

self.info = info
self.dummy_inputs = dummy_inputs
self.cache = cache
Expand Down
Loading