Summary
EncoderScheduler.__init__ accepts **kwargs and only reads kwargs.get("tokenizers", "tokenizer"). Every other key passed in is silently discarded. Because stage.py always forwards precompile_params=... plus **scheduler_params to the scheduler constructor, any of the following fail silently for an encoder stage:
- A typo in the YAML key (e.g.
tokenizer instead of tokenizers) falls back to the default "tokenizer" with no warning — the configured value is ignored.
precompile_params (and any other key) is absorbed by **kwargs and dropped; it has no effect on the encoder stage at all.
This is not a correctness bug today, but it's a latent foot-gun: a misconfigured text_encoder stage looks like it's honoring the YAML when it isn't.
Evidence
python/sgl_jax/srt/multimodal/manager/scheduler/encoder_scheduler.py — __init__(..., **kwargs), uses only kwargs.get("tokenizers", "tokenizer").
python/sgl_jax/srt/multimodal/manager/stage.py (~L181) — scheduler_class(..., precompile_params=precompile_params, **self.stage_config.scheduler_params) is applied uniformly to all schedulers.
Suggested fix
Validate/observe unexpected kwargs in EncoderScheduler.__init__, e.g.:
known_keys = {"tokenizers"}
unknown = set(kwargs) - known_keys
if unknown:
logger.warning(
"EncoderScheduler received unexpected kwargs (ignored): %s", sorted(unknown)
)
Optionally, audit whether the uniform precompile_params=... forwarding in stage.py makes sense for schedulers that don't consume it.
Context
Spotted during review of #1316 (wan text-encoder rewire to text_encoder scheduler). Not introduced by that PR — pre-existing interface behavior. Filing separately to keep #1316 scoped to the mis-wiring fix.
Summary
EncoderScheduler.__init__accepts**kwargsand only readskwargs.get("tokenizers", "tokenizer"). Every other key passed in is silently discarded. Becausestage.pyalways forwardsprecompile_params=...plus**scheduler_paramsto the scheduler constructor, any of the following fail silently for an encoder stage:tokenizerinstead oftokenizers) falls back to the default"tokenizer"with no warning — the configured value is ignored.precompile_params(and any other key) is absorbed by**kwargsand dropped; it has no effect on the encoder stage at all.This is not a correctness bug today, but it's a latent foot-gun: a misconfigured
text_encoderstage looks like it's honoring the YAML when it isn't.Evidence
python/sgl_jax/srt/multimodal/manager/scheduler/encoder_scheduler.py—__init__(..., **kwargs), uses onlykwargs.get("tokenizers", "tokenizer").python/sgl_jax/srt/multimodal/manager/stage.py(~L181) —scheduler_class(..., precompile_params=precompile_params, **self.stage_config.scheduler_params)is applied uniformly to all schedulers.Suggested fix
Validate/observe unexpected kwargs in
EncoderScheduler.__init__, e.g.:Optionally, audit whether the uniform
precompile_params=...forwarding instage.pymakes sense for schedulers that don't consume it.Context
Spotted during review of #1316 (wan text-encoder rewire to
text_encoderscheduler). Not introduced by that PR — pre-existing interface behavior. Filing separately to keep #1316 scoped to the mis-wiring fix.