sgl-project/sglang · error · ValueError
audio_sampling_rate must be set in processor_config or…
Error message
audio_sampling_rate must be set in processor_config or audio_config
What it means
Raised in MiMoProcessor.__init__ when no audio sampling rate can be resolved: processor_config['audio_sampling_rate'] is absent and audio_config provides neither 'sampling_rate' nor 'sample_rate'. The audio feature extractor cannot resample/interpret waveforms without it.
Solutions
- Set processor_config.audio_sampling_rate (commonly 16000) in preprocessor_config.json or the override passed to MiMoProcessor
- If an audio_config exists, add sampling_rate under the expected key
- Use a checkpoint revision that ships complete audio config
Example fix
# before: preprocessor_config.json has no audio key
# after
{"audio_sampling_rate": 16000, "fps": 2.0, ...} # in preprocessor_config.json Defensive patterns
Strategy: validation
Validate before calling
rate = processor_config.get('audio_sampling_rate') or (audio_config or {}).get('sampling_rate') or (audio_config or {}).get('sample_rate')
assert rate is not None, 'set processor_config.audio_sampling_rate (e.g. 16000)' Try / catch
try:
proc = MiMoProcessor(hf_config, server_args, _processor)
except ValueError as e:
if 'audio_sampling_rate' in str(e):
processor_config['audio_sampling_rate'] = 16000
proc = MiMoProcessor(hf_config, server_args, _processor)
else:
raise Prevention
- Include audio_sampling_rate in deployment config for audio-enabled models
- Validate audio config keys at startup
- Use checkpoints with complete audio sections
When it happens
Trigger: Loading a MiMo-V2 checkpoint whose preprocessor/processor config lacks audio_sampling_rate while the HF audio_config also has no rate fields, then constructing the processor (i.e., at server/model startup with audio enabled).
Common situations: Checkpoints shipped without audio config sections; configs using a different key name (e.g. 'samplingrate' or nested); older checkpoint revisions predating the audio pipeline.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- JoyEcho audio scheduler was not prepared.
- must be a dict-like config, got
- processor_config. must be set for MiMo-V2
- A CUDA VMM-enabled model must provide a multimodal processor
- Activation function is not supported.
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/2fa4fd24f64ff135.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/srt/multimodal/processors/mimo_v2.py:1556
if (
rope_scaling.get("type", None) == "default"
and rope_scaling.get("mrope_section", None) is not None
):
rope_type = "mrope"
processor_config = self._normalize_config_dict(
getattr(hf_config, "processor_config", {}), "processor_config"
)
audio_config = self._normalize_config_dict(
getattr(hf_config, "audio_config", None), "audio_config"
)
self.audio_sample_rate = processor_config.get("audio_sampling_rate")
if self.audio_sample_rate is None:
self.audio_sample_rate = audio_config.get(
"sampling_rate"
) or audio_config.get("sample_rate")
if self.audio_sample_rate is None:
raise ValueError(
"audio_sampling_rate must be set in processor_config or audio_config"
)
self.IM_START_TOKEN_ID = self._require_config_value(
processor_config, "vision_start_token_id"
)
self.IM_END_TOKEN_ID = self._require_config_value(
processor_config, "vision_end_token_id"
)
self.IM_TOKEN_ID = self._require_config_value(
processor_config, "image_token_id"
)
self.VIDEO_TOKEN_ID = self._require_config_value(
processor_config, "video_token_id"
)
self.vision_start_token_id = self.IM_START_TOKEN_ID
self.vision_end_token_id = self.IM_END_TOKEN_ID
View on GitHub (pinned to 0132848349)