{"record":{"id":"8c3aa9e0c2f9b64e","repo":"sgl-project/sglang","slug":"minimaxh3textencodingstage-direct-encode-requires-8c3aa9","errorCode":null,"errorMessage":"MiniMaxH3TextEncodingStage direct encode requires a tokenizer component","messagePattern":"MiniMaxH3TextEncodingStage direct encode requires a tokenizer component","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/text_encoding.py","lineNumber":286,"sourceCode":"        elif keyframes:\n            raise ValueError(\n                f\"task {plan.task!r} cannot carry image.target_canvas materials\"\n            )\n        if MINIMAX_H3_TEXT_EMBEDDINGS_EXTRA_KEY in batch.extra:\n            return\n        if self.text_encoder is None:\n            raise ValueError(\n                \"MiniMaxH3TextEncodingStage direct encode requires a text_encoder \"\n                \"component\"\n            )\n        encode_ids = getattr(self.text_encoder, \"encode_ids\", None)\n        if not callable(encode_ids):\n            raise TypeError(\n                \"MiniMax H3 text_encoder component must expose callable \"\n                \"encode_ids(...) for direct encode (MiniMaxH3Qwen3VLEncoder)\"\n            )\n        if self.tokenizer is None:\n            raise ValueError(\n                \"MiniMaxH3TextEncodingStage direct encode requires a tokenizer component\"\n            )\n        with set_forward_context(current_timestep=0, attn_metadata=None):\n            if plan.task == \"ref2va\":\n                embeddings = self._encode_ref2va(\n                    batch,\n                    plan,\n                    encode_ids,\n                    include_video_token_mask=include_video_token_mask,\n                )\n            elif keyframes:\n                embeddings = self._encode_fl2va_keyframes(\n                    batch,\n                    plan,\n                    encode_ids,\n                    prompt=prompt,\n                )\n            else:","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/stages/text_encoding.py#L268-L304","documentation":"Direct encode also requires the tokenizer pipeline component; if self.tokenizer is None at encode time, _encode_from_plan raises this ValueError. Like 2436, it fires lazily — construction allows a tokenizer-less pipeline (embedding-only usage) but direct encode does not.","triggerScenarios":"_encode_from_plan reaches the tokenizer check with self.tokenizer None — stage constructed from a pipeline missing the tokenizer component while the plan has no cached text embeddings.","commonSituations":"Slim pipelines shipping only the diffusion model and encoder weights, tokenizer subfolder excluded from the snapshot, or embedding-replay setups accidentally receiving fresh plans.","solutions":["Load the pipeline with its tokenizer component included","Pre-populate MINIMAX_H3_TEXT_EMBEDDINGS_EXTRA_KEY to bypass direct encode","Verify the tokenizer entry exists in model_index.json"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if stage.tokenizer is None and MINIMAX_H3_TEXT_EMBEDDINGS_EXTRA_KEY not in batch.extra:\n    raise RuntimeError(\"load tokenizer component or supply precomputed embeddings\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include the tokenizer subfolder when exporting/shipping pipelines","For embedding-replay setups, always attach the embeddings extra key"],"tags":["minimax-h3","missing-component","tokenizer"],"backgroundTag":"missing-pipeline-component","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}