{"record":{"id":"44960a62c5c82df4","repo":"unslothai/unsloth","slug":"local-model-path-repo-id-does-not-exist","errorCode":null,"errorMessage":"Local model path '{repo_id}' does not exist.","messagePattern":"Local model path '(.+?)' does not exist\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/video.py","lineNumber":1244,"sourceCode":"                try:\n                    resolve_local_gguf_child(root, gguf_filename or \"\")\n                except Exception as exc:  # noqa: BLE001 -- surface as client input error\n                    raise ValueError(str(exc)) from exc\n            elif root.is_file():\n                # The loader hands a local FILE straight through (ignoring gguf_filename), so the file's own suffix must match the kind.\n                suffix = root.suffix.lower()\n                if kind == \"gguf\" and suffix != \".gguf\":\n                    raise ValueError(\n                        f\"Local checkpoint '{repo_id}' is not a .gguf file; a 'gguf' load \"\n                        f\"needs a .gguf checkpoint.\"\n                    )\n                if kind == \"single_file\" and suffix != \".safetensors\":\n                    raise ValueError(\n                        f\"Local checkpoint '{repo_id}' is not a .safetensors file; a \"\n                        f\"'single_file' load needs a .safetensors checkpoint.\"\n                    )\n            elif path_shaped:\n                raise ValueError(f\"Local model path '{repo_id}' does not exist.\")\n        # A local pipeline pick must be a diffusers directory (model_index.json), else it would only fail after eviction.\n        if kind == \"pipeline\":\n            root = Path(repo_id).expanduser()\n            # Gate on .exists() (not .is_dir()) so a local FILE picked as a pipeline is rejected too.\n            indexes = (\n                (\"model_index.json\", \"modular_model_index.json\")\n                if fam.modular_workflow\n                else (\"model_index.json\",)\n            )\n            if root.exists() and not (\n                root.is_dir() and any((root / name).is_file() for name in indexes)\n            ):\n                raise ValueError(\n                    f\"Local pipeline path is not a diffusers directory \"\n                    f\"(no {' or '.join(indexes)}): {repo_id}\"\n                )\n        # Reject a malformed transformer_quant cheaply, before the handoff (pipeline-kind only, matching the image backend).\n        normalize_transformer_quant(transformer_quant)","sourceCodeStart":1226,"sourceCodeEnd":1262,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L1226-L1262","documentation":"Raised when repo_id looks like a filesystem path — starts with '/', '\\\\', '~', or '.', contains a backslash, or resolves absolute — but nothing exists at that path. Path-shaped repo_ids are never treated as hub ids ('org/name' can never look like that), so this is an explicit 'your local model path is wrong' error raised before any model eviction or download.","triggerScenarios":"load(repo_id='~/models/wan25') or '/data/missing-model' or './models/x' with model_kind 'gguf'/'single_file', where the path does not exist (typo, not yet downloaded, wrong machine).","commonSituations":"Absolute paths from another machine; paths under a mount not attached yet (network drive, encrypted volume); '~' not expanded by the shell when passed via API JSON; relative paths assuming a different cwd.","solutions":["Check the path exists from the backend's perspective (it runs as the backend user, with its own cwd and mounts): ls the exact string you send.","Use a fully expanded absolute path rather than '~' or relative segments.","Mount/copy the model into place, or switch to a hub repo id ('org/name') instead of a local path."],"exampleFix":"# before\nload(repo_id='~/models/wan25', model_kind='gguf', gguf_filename='x-Q4.gguf')\n\n# after\nload(repo_id='/home/user/models/wan25', model_kind='gguf', gguf_filename='x-Q4.gguf')","handlingStrategy":"validation","validationCode":"from pathlib import Path\np = Path(repo_id).expanduser()\npath_shaped = repo_id.startswith(('/', '\\\\', '~', '.')) or '\\\\' in repo_id or p.is_absolute()\nif path_shaped and not p.exists():\n    raise FileNotFoundError(f'local model path missing: {repo_id}')  # before the API call","typeGuard":"def local_path_valid(repo_id: str) -> bool:\n    p = Path(repo_id).expanduser()\n    path_shaped = repo_id.startswith(('/', '\\\\', '~', '.')) or '\\\\' in repo_id or p.is_absolute()\n    return not path_shaped or p.exists()","tryCatchPattern":null,"preventionTips":["Send fully expanded absolute paths; never rely on the backend's cwd.","Verify mounts/network drives are attached before starting loads.","os.path.expanduser() on the client side too, so the API never receives a bare '~'."],"tags":["video","local-path","file-not-found","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}