sgl-project/sglang · error · TypeError
JoyEchoPipeline requires JoyEchoPipelineConfig, got {type(co
Error message
JoyEchoPipeline requires JoyEchoPipelineConfig, got {type(config)} What it means
Raised by JoyEchoPipeline.create_pipeline_stages when server_args.pipeline_config is not a JoyEchoPipelineConfig. The stage-construction phase (memory bank, multishot setup, LTX2 front stages) reads settings only present on the typed config, so mismatched configs fail fast.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines/joy_echo_pipeline.py:54
def _get_or_create_memory_bank(
self, config: JoyEchoPipelineConfig
) -> PairedAudioVideoMemoryBank:
if self._memory_bank is None:
self._memory_bank = PairedAudioVideoMemoryBank(
max_size=int(config.memory_max_size),
num_fix_frames=int(config.memory_num_fix_frames),
)
return self._memory_bank
def reset_memory_bank(self) -> None:
if self._memory_bank is not None:
self._memory_bank.memory.clear()
def create_pipeline_stages(self, server_args: ServerArgs):
config = server_args.pipeline_config
if not isinstance(config, JoyEchoPipelineConfig):
raise TypeError(
f"JoyEchoPipeline requires JoyEchoPipelineConfig, got {type(config)}"
)
memory_bank = self._get_or_create_memory_bank(config)
self.add_stage(JoyEchoMultishotSetupStage(pipeline=self))
_add_ltx2_front_stages(self)
self.add_stage(JoyEchoSigmaPreparationStage())
self.add_standard_timestep_preparation_stage(
prepare_extra_kwargs=[prepare_ltx2_mu]
)
self.add_stages(
[
LTX2AVLatentPreparationStage(
scheduler=self.get_module("scheduler"),
transformer=self.get_module("transformer"),
audio_vae=self.get_module("audio_vae"),
),
LTX2ImageEncodingStage(View on GitHub (pinned to 0132848349)
Solutions
- Construct JoyEchoPipelineConfig with the memory/multishot settings and assign it to server_args.pipeline_config before stage creation
- Verify the pipeline registry selected JoyEchoPipeline for your model (a wrong registry mapping can pass the wrong config)
- Add an isinstance check in your own startup script to give a clearer error location
Example fix
// before server_args.pipeline_config = PipelineConfig() # generic pipeline.create_pipeline_stages(server_args) // after server_args.pipeline_config = JoyEchoPipelineConfig(...) pipeline.create_pipeline_stages(server_args)
Defensive patterns
Strategy: type-guard
Validate before calling
from sglang.multimodal_gen.runtime.pipelines.joy_echo_pipeline import JoyEchoPipelineConfig
if not isinstance(server_args.pipeline_config, JoyEchoPipelineConfig):
server_args.pipeline_config = JoyEchoPipelineConfig() Type guard
def is_joyecho_config(cfg: object) -> TypeGuard[JoyEchoPipelineConfig]:
return isinstance(cfg, JoyEchoPipelineConfig) Prevention
- Select the pipeline and its config class from one mapping/registry
- Assert the config type before create_pipeline_stages in launch scripts
When it happens
Trigger: Advancing a JoyEcho pipeline to stage construction with server_args.pipeline_config set to None or another pipeline's config class; running the server with a JoyEcho model path but generic pipeline args.
Common situations: Copy-pasted launch scripts from another multimodal pipeline; configs produced by a factory that returns the base PipelineConfig; version skew where JoyEchoPipelineConfig moved modules.
Related errors
- Expected Hunyuan3D2PipelineConfig, got {type(config)}
- Expected scheduler.sigmas to be a tensor for JoyEcho.
- Unknown serve backend {name!r}. Available values: {available
- Multiple distributions register serve backend {name!r}: {pro
- Failed to load serve backend {name!r} from {self._entry_poin
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/d89f27925a7d63eb.
Report an issue: GitHub.