{"record":{"id":"30a4b4f0437ebc45","repo":"sgl-project/sglang","slug":"minimax-h3-adaln-cache-does-not-exist-self-path","errorCode":null,"errorMessage":"MiniMax H3 AdaLN cache does not exist: {self.path}","messagePattern":"MiniMax H3 AdaLN cache does not exist: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py","lineNumber":1175,"sourceCode":"        self.path = path\n        self.model_variant = model_variant\n        self.weight_files = weight_files\n        self.max_plans = max_plans\n        self.max_plan_width = max_plan_width\n        self.num_layers = arch.num_layers\n        self.hidden_size = arch.hidden_size\n        self.block_width = 6 * MINIMAX_H3_ADALN_MODALITY_NUM * arch.hidden_size\n        self.final_width = 2 * arch.hidden_size\n        # Rebuild path only: plan bit pattern -> slot, tracked on the host.\n        self._slots: dict[tuple[int, ...], int] = {}\n        self.rebuilds = 0\n\n    def load(self, device: torch.device) -> None:\n        if self.path is None:\n            self._allocate(device)\n            return\n        if not os.path.isfile(self.path):\n            raise ValueError(f\"MiniMax H3 AdaLN cache does not exist: {self.path}\")\n\n        with safe_open(self.path, framework=\"pt\", device=\"cpu\") as cache_file:\n            metadata = cache_file.metadata() or {}\n            if metadata.get(\"format_version\") != self._FORMAT_VERSION:\n                raise ValueError(\n                    \"MiniMax H3 AdaLN cache has an unsupported or missing format_version\"\n                )\n            cache_variant = metadata.get(\"model_variant\")\n            if self.model_variant is not None and cache_variant != self.model_variant:\n                raise ValueError(\n                    \"MiniMax H3 AdaLN cache model_variant does not match the loaded \"\n                    f\"variant ({cache_variant!r} != {self.model_variant!r})\"\n                )\n            plan_timesteps = cache_file.get_tensor(\"plan_timesteps\")\n            plan_lengths = cache_file.get_tensor(\"plan_lengths\")\n            block_params = cache_file.get_tensor(\"block_params\")\n            final_params = cache_file.get_tensor(\"final_params\")\n","sourceCodeStart":1157,"sourceCodeEnd":1193,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py#L1157-L1193","documentation":"The AdaLN cache was constructed in sidecar mode (path set), but load() finds no regular file at that path. The cache cannot be hydrated, so weight loading (post_load_weights) aborts.","triggerScenarios":"path points to a nonexistent file or a directory; typical with a stale sidecar path, a typo, or a sidecar that was never generated on this node.","commonSituations":"Distributed runs where the sidecar was built on one node and not synced, CI environments missing large cache artifacts, or a path relative to a different working directory.","solutions":["Check the path exists and is a file: ls -l <path>; fix typos or make it absolute","Regenerate the sidecar (build it once, then pass path afterwards)","Sync/ship the sidecar with the checkpoint in multi-node setups","Fall back to weight_files mode to rebuild on the fly"],"exampleFix":"# before\ncache = MinimaxH3AdaLNCache(path=\"adaln_cache.safetensors\")  # missing\n# after\n# regenerate once, then:\ncache = MinimaxH3AdaLNCache(path=\"/abs/path/ckpt/adaln_cache.safetensors\")","handlingStrategy":"type-guard","validationCode":"import os\nif not os.path.isfile(cache_path):\n    raise FileNotFoundError(f\"generate the AdaLN sidecar first: {cache_path}\")","typeGuard":"def sidecar_ready(path: str | None) -> bool:\n    return path is not None and os.path.isfile(path)","tryCatchPattern":"try:\n    cache.load(device)\nexcept ValueError as e:\n    if \"does not exist\" in str(e):\n        cache = MinimaxH3AdaLNCache(weight_files=shards)  # rebuild fallback\n    else:\n        raise","preventionTips":["Use absolute sidecar paths","Ship/regenerate sidecars as part of checkpoint provisioning","Add existence checks in deployment scripts"],"tags":["minimax-h3","adaln-cache","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}