{"record":{"id":"d89f27925a7d63eb","repo":"sgl-project/sglang","slug":"joyechopipeline-requires-joyechopipelineconfig-go","errorCode":null,"errorMessage":"JoyEchoPipeline requires JoyEchoPipelineConfig, got {type(config)}","messagePattern":"JoyEchoPipeline requires JoyEchoPipelineConfig, got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines/joy_echo_pipeline.py","lineNumber":54,"sourceCode":"\n    def _get_or_create_memory_bank(\n        self, config: JoyEchoPipelineConfig\n    ) -> PairedAudioVideoMemoryBank:\n        if self._memory_bank is None:\n            self._memory_bank = PairedAudioVideoMemoryBank(\n                max_size=int(config.memory_max_size),\n                num_fix_frames=int(config.memory_num_fix_frames),\n            )\n        return self._memory_bank\n\n    def reset_memory_bank(self) -> None:\n        if self._memory_bank is not None:\n            self._memory_bank.memory.clear()\n\n    def create_pipeline_stages(self, server_args: ServerArgs):\n        config = server_args.pipeline_config\n        if not isinstance(config, JoyEchoPipelineConfig):\n            raise TypeError(\n                f\"JoyEchoPipeline requires JoyEchoPipelineConfig, got {type(config)}\"\n            )\n\n        memory_bank = self._get_or_create_memory_bank(config)\n        self.add_stage(JoyEchoMultishotSetupStage(pipeline=self))\n        _add_ltx2_front_stages(self)\n        self.add_stage(JoyEchoSigmaPreparationStage())\n        self.add_standard_timestep_preparation_stage(\n            prepare_extra_kwargs=[prepare_ltx2_mu]\n        )\n        self.add_stages(\n            [\n                LTX2AVLatentPreparationStage(\n                    scheduler=self.get_module(\"scheduler\"),\n                    transformer=self.get_module(\"transformer\"),\n                    audio_vae=self.get_module(\"audio_vae\"),\n                ),\n                LTX2ImageEncodingStage(","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines/joy_echo_pipeline.py#L36-L72","documentation":"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.","triggerScenarios":"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.","commonSituations":"Copy-pasted launch scripts from another multimodal pipeline; configs produced by a factory that returns the base PipelineConfig; version skew where JoyEchoPipelineConfig moved modules.","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"],"exampleFix":"// before\nserver_args.pipeline_config = PipelineConfig()  # generic\npipeline.create_pipeline_stages(server_args)\n\n// after\nserver_args.pipeline_config = JoyEchoPipelineConfig(...)\npipeline.create_pipeline_stages(server_args)","handlingStrategy":"type-guard","validationCode":"from sglang.multimodal_gen.runtime.pipelines.joy_echo_pipeline import JoyEchoPipelineConfig\nif not isinstance(server_args.pipeline_config, JoyEchoPipelineConfig):\n    server_args.pipeline_config = JoyEchoPipelineConfig()","typeGuard":"def is_joyecho_config(cfg: object) -> TypeGuard[JoyEchoPipelineConfig]:\n    return isinstance(cfg, JoyEchoPipelineConfig)","tryCatchPattern":null,"preventionTips":["Select the pipeline and its config class from one mapping/registry","Assert the config type before create_pipeline_stages in launch scripts"],"tags":["joyecho","pipeline-stages","type-mismatch","sglang"],"backgroundTag":"pipeline-config-type-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}