{"record":{"id":"f8030889cc0ba210","repo":"unslothai/unsloth","slug":"local-checkpoint-repo-id-is-not-a-gguf-file","errorCode":null,"errorMessage":"Local checkpoint '{repo_id}' is not a .gguf file; a 'gguf' load needs a .gguf checkpoint.","messagePattern":"Local checkpoint '(.+?)' is not a \\.gguf file; a 'gguf' load needs a \\.gguf checkpoint\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/video.py","lineNumber":1234,"sourceCode":"                    f\"'{gguf_filename}' is not a loadable single-file checkpoint \"\n                    f\"(expected a .safetensors name; use a .gguf name for a GGUF load).\"\n                )\n            root = Path(repo_id).expanduser()\n            # Path-shaped: \".\"/\"..\" prefix, a backslash (never in \"org/name\"), or an absolute path, so a missing local pick fails before the handoff.\n            path_shaped = (\n                repo_id.startswith((\"/\", \"\\\\\", \"~\", \".\")) or \"\\\\\" in repo_id or root.is_absolute()\n            )\n            if root.is_dir():\n                from .diffusion_families import resolve_local_gguf_child\n                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\",)","sourceCodeStart":1216,"sourceCodeEnd":1252,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L1216-L1252","documentation":"Raised when repo_id is a local FILE (not a directory) passed to a 'gguf' load whose suffix is not .gguf. The loader hands a local file straight through, ignoring gguf_filename, so the file's own extension must match the declared kind; the mismatch is caught before the GPU handoff.","triggerScenarios":"load(repo_id='/models/denoiser.safetensors', model_kind='gguf') — repo_id is an existing file whose suffix lowercased is not .gguf.","commonSituations":"Passing a single downloaded safetensors file with the GGUF kind copied from another workflow; mislabeling a pickle .ckpt as gguf; drag-and-drop paths from a file manager mapping to the wrong kind.","solutions":["Use model_kind='single_file' if the file is .safetensors.","If you intend a GGUF load, pass the .gguf file's path (or its directory + gguf_filename).","Make the client derive model_kind from the file's suffix."],"exampleFix":"# before\nload(repo_id='/models/denoiser.safetensors', model_kind='gguf')\n\n# after\nload(repo_id='/models/denoiser.safetensors', model_kind='single_file')","handlingStrategy":"validation","validationCode":"from pathlib import Path\nroot = Path(repo_id).expanduser()\nif root.is_file() and model_kind == 'gguf' and root.suffix.lower() != '.gguf':\n    model_kind = 'single_file' if root.suffix.lower() == '.safetensors' else None","typeGuard":"def local_file_kind_ok(repo_id: str, kind: str) -> bool:\n    root = Path(repo_id).expanduser()\n    return not root.is_file() or not (kind == 'gguf' and root.suffix.lower() != '.gguf')","tryCatchPattern":null,"preventionTips":["When passing a local file path, set model_kind from the file's suffix.","Prefer directory + gguf_filename over raw file paths for GGUF loads."],"tags":["video","local-path","gguf","file-extension","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}