[Misc] Don't allow language-model-only used with encoder CG together (#53127)
Signed-off-by: Isotr0py <Isotr0py@outlook.com>
Isotr0py committed
Aug 21, 2026 at 01:26 UTC
00f7f258282ad3ea400a760ba3bc4679ef4e40fe
1 file changed
+13
vllm/config/vllm.py
+13
@@ -1147,6 +1147,19 @@ class VllmConfig:
1147
"connectors (PD disaggregation, KV cache offload)."
1148
)
1149
1150
+ if (
1151
+ self.model_config is not None
1152
+ and self.model_config.multimodal_config is not None
1153
+ and self.model_config.multimodal_config.language_model_only
1154
+ and self.compilation_config.cudagraph_mm_encoder
1155
+ ):
1156
+ raise ValueError(
1157
+ "--language-model-only is incompatible with "
1158
+ "cudagraph_mm_encoder=True, since it disables all multimodal "
1159
+ "inputs and the multimodal encoder is never run. Please "
1160
+ "disable one of them."
1161
+ )
1162
+
1163
self._verify_sampling_replay_config()
1164
self._verify_trace_replay_config()
1165