{"record":{"id":"fb3f9744262582a1","repo":"unslothai/unsloth","slug":"exc-fb3f97","errorCode":null,"errorMessage":"{exc}","messagePattern":"\\{exc\\}","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/video.py","lineNumber":1229,"sourceCode":"                raise ValueError(\"a 'gguf' load requires a .gguf checkpoint name.\")\n            if kind == \"single_file\" and is_gguf_name:\n                raise ValueError(\"a .gguf checkpoint needs model_kind 'gguf', not 'single_file'.\")\n            if kind == \"single_file\" and not (gguf_filename or \"\").lower().endswith(\".safetensors\"):\n                raise ValueError(\n                    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()","sourceCodeStart":1211,"sourceCodeEnd":1247,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L1211-L1247","documentation":"A re-raise wrapper: when repo_id is a local DIRECTORY and resolving gguf_filename inside it (resolve_local_gguf_child) throws — typically because the named checkpoint does not exist in the directory — the original exception is converted into a ValueError so the API reports it as a client input error (HTTP 4xx semantics) instead of a server fault. The message text is whatever the resolver said.","triggerScenarios":"load(repo_id='/data/models/wan25', model_kind='gguf', gguf_filename='Wan2.5-Q8.gguf') where that file is absent from the directory (wrong name, different quant, file moved).","commonSituations":"Local model folders whose filenames differ from hub names (renamed after download); stale caches after re-quantizing; typos in quant suffixes (Q4_K_M vs Q4KM); directory shared across machines with partial sync.","solutions":["List the directory and pass the exact filename present on disk (case-sensitive).","Re-download or re-quantize so the expected filename exists.","Point gguf_filename at the file you actually have rather than the hub's canonical name."],"exampleFix":"# before\nload(repo_id='/data/wan25', model_kind='gguf', gguf_filename='Wan2.5-Q4_K_M.gguf')\n# FileNotFoundError: no such child\n\n# after\n# ls /data/wan25 -> wan2.5-i2v-Q4_K_M.gguf\nload(repo_id='/data/wan25', model_kind='gguf', gguf_filename='wan2.5-i2v-Q4_K_M.gguf')","handlingStrategy":"try-catch","validationCode":"from pathlib import Path\nroot = Path(repo_id).expanduser()\nif root.is_dir():\n    target = (root / gguf_filename)\n    if not target.is_file():\n        names = [p.name for p in root.iterdir() if p.suffix.lower() == '.gguf']\n        raise FileNotFoundError(f'{gguf_filename!r} not in {repo_id}; have: {names}')","typeGuard":"def checkpoint_in_dir(repo_id: str, gguf_filename: str) -> bool:\n    root = Path(repo_id).expanduser()\n    return not root.is_dir() or (root / gguf_filename).is_file()","tryCatchPattern":"try:\n    load(...)\nexcept ValueError as e:\n    if 'not found' in str(e).lower() or 'no such' in str(e).lower():\n        # list directory contents and prompt the user to re-pick\n        raise\n    raise","preventionTips":["Before loading, verify the exact filename exists in the local directory (case-sensitive).","Normalize/record filenames at download time so configs never drift from disk."],"tags":["video","local-path","gguf","file-not-found","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}