vllm-project/vllm · error · ValueError
encoder_cudagraph_max_vision_items_per_batch must be non-neg
Error message
encoder_cudagraph_max_vision_items_per_batch must be non-negative (0 = auto-infer)
What it means
Error "encoder_cudagraph_max_vision_items_per_batch must be non-negative (0 = auto-infer)" thrown in vllm-project/vllm.
Source
Thrown at vllm/config/compilation.py:1038
# Currently only eager and inductor backend are supported.
# for piecewise compilation. Custom backends are not supported for
# piecewise compilation. Update when more backends are supported.
if self.mode == CompilationMode.VLLM_COMPILE and self.backend not in [
"",
"eager",
"inductor",
]:
raise ValueError(
f"Invalid backend for piecewise compilation: {self.backend}"
)
# Validate encoder CUDA graph configuration
if (
self.cudagraph_mm_encoder
and self.encoder_cudagraph_max_vision_items_per_batch < 0
):
raise ValueError(
"encoder_cudagraph_max_vision_items_per_batch must be "
"non-negative (0 = auto-infer)"
)
if (
self.cudagraph_mm_encoder
and self.encoder_cudagraph_max_frames_per_batch is not None
and self.encoder_cudagraph_max_frames_per_batch < 0
):
raise ValueError(
"encoder_cudagraph_max_frames_per_batch must be "
"non-negative (None = auto-infer)"
)
if self.encoder_cudagraph_token_budgets and any(
b <= 0 for b in self.encoder_cudagraph_token_budgets
):
raise ValueError(
f"All encoder_cudagraph_token_budgets must be positive, "View on GitHub (pinned to c794754062)
Solutions
- Set encoder_cudagraph_max_vision_items_per_batch to a non-negative integer (0 to auto-infer).
When it happens
Trigger: Raised at vllm/config/compilation.py:1038 when validation fails: encoder_cudagraph_max_vision_items_per_batch must be non-negative (0 = auto-infer). Typically triggered by an incompatible or incomplete vLLM configuration, an unsupported platform/backend combination, or a runtime resource/dependency that is missing.
Common situations: Commonly encountered at vllm/config/compilation.py:1038 during vLLM startup/config validation or runtime setup when: (1) conflicting CLI flags or config fields are combined, (2) the current platform (CUDA/ROCm/CPU/XPU) or installed optional packages do not support the requested feature, or (3) a required value is absent or out of range. Resolve by correcting the configuration as described in the message, or by selecting a supported alternative.
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/0c2387a2b060042c.
Report an issue: GitHub.