diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.py index 8aced8a94..5de477fb7 100644 --- a/python/sglang/srt/managers/scheduler.py +++ b/python/sglang/srt/managers/scheduler.py @@ -2192,11 +2192,14 @@ class Scheduler( request_errors = [] for tokenized_req in tokenized_reqs: + # The request broadcast makes this skip consistent across ranks. + if tokenized_req.mm_inputs is None: + request_errors.append(None) + continue + local_error = None try: - if tokenized_req.mm_inputs is not None and not isinstance( - tokenized_req.mm_inputs, MultimodalInputs - ): + if not isinstance(tokenized_req.mm_inputs, MultimodalInputs): tokenized_req.mm_inputs = MultimodalInputs.from_processor_output( tokenized_req.mm_inputs, requires_mm_token_modalities=self.model_config.requires_mm_token_modalities, diff --git a/test/registered/unit/multimodal/test_gpu_feature_transport.py b/test/registered/unit/multimodal/test_gpu_feature_transport.py index f3413bd69..670e68a04 100644 --- a/test/registered/unit/multimodal/test_gpu_feature_transport.py +++ b/test/registered/unit/multimodal/test_gpu_feature_transport.py @@ -9,6 +9,7 @@ from unittest.mock import AsyncMock, MagicMock, call, patch import torch from sglang.test.ci.ci_register import register_cpu_ci +from sglang.test.test_utils import CustomTestCase register_cpu_ci(est_time=11, suite="base-a-test-cpu") @@ -760,7 +761,7 @@ class TestCudaVmmFeatureTransport(unittest.TestCase): self.assertIs(transport.pool, pool) -class TestSchedulerMmTransportBoundary(unittest.TestCase): +class TestSchedulerMmTransportBoundary(CustomTestCase): def _publish(self, **fields): from sglang.srt.runtime_context import get_context