{"record":{"id":"76a240aaf1f1454c","repo":"exo-explore/exo","slug":"no-safetensors-files-found-in-self-model-path","errorCode":null,"errorMessage":"No safetensors files found in {self._model_path}","messagePattern":"No safetensors files found in (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/exo/worker/engines/mlx/vision.py","lineNumber":363,"sourceCode":"        except ValueError:\n            image_proc = None\n        if image_proc is None:\n            image_proc = self._load_image_processor_from_module(repo)\n        if image_proc is not None:\n            self._processor = image_proc\n        else:\n            self._processor = AutoImageProcessor.from_pretrained(  # type: ignore\n                repo, trust_remote_code=True\n            )\n        if processor_repo:\n            self._merge_kernel_size = vision_cfg.get(\"merge_kernel_size\", [2, 2])  # type: ignore\n            self._needs_nhwc = True\n        logger.info(f\"HF image processor loaded from {repo}\")\n\n    def _load_weights_from_separate_repo(self) -> None:\n        safetensors_files = list(self._model_path.glob(\"*.safetensors\"))\n        if not safetensors_files:\n            raise FileNotFoundError(f\"No safetensors files found in {self._model_path}\")\n\n        vision_weights: dict[str, mx.array] = {}\n        projector_weights: dict[str, mx.array] = {}\n\n        for sf_path in safetensors_files:\n            with safe_open(str(sf_path), framework=\"pt\") as f:\n                keys = cast(list[str], list(f.keys()))  # type: ignore\n                for key in keys:\n                    if key.startswith(\"vision_tower.\"):\n                        short_key = key[len(\"vision_tower.\") :]\n                        if short_key.startswith(\"encoder.\"):\n                            short_key = short_key[len(\"encoder.\") :]\n                        m = re.match(\n                            r\"^(blocks\\.\\d+)\\.(wqkv|wo)\\.(weight|bias)$\", short_key\n                        )\n                        if m:\n                            short_key = f\"{m.group(1)}.attn.{m.group(2)}.{m.group(3)}\"\n                        tensor = f.get_tensor(key)  # type: ignore","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/worker/engines/mlx/vision.py#L345-L381","documentation":"Error \"No safetensors files found in {self._model_path}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/worker/engines/mlx/vision.py:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}