{"record":{"id":"186defc527c5f8a9","repo":"unslothai/unsloth","slug":"base-repo-is-limited-to-unsloth-repos-the-offic","errorCode":null,"errorMessage":"base_repo is limited to unsloth/* repos, the official family base repos, and local paths; '{base_repo}' is neither.","messagePattern":"base_repo is limited to unsloth/\\* repos, the official family base repos, and local paths; '(.+?)' is neither\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/video.py","lineNumber":1189,"sourceCode":"        else:\n            # Refuse a too-old diffusers here rather than deep in the load.\n            from .diffusion_families import assert_pipeline_class_available\n            assert_pipeline_class_available(fam.pipeline_class, fam.name)\n            if fam.modular_workflow:\n                import diffusers\n                if not hasattr(diffusers, fam.transformer_class):\n                    raise ValueError(\n                        \"MiniMax-H3 needs the Diffusers revision bundled with this Studio \"\n                        \"version. Reinstall Studio dependencies and retry.\"\n                    )\n        if kind != \"gguf\" and not _is_trusted_video_repo(repo_id):\n            raise ValueError(\n                f\"Non-GGUF video loads are limited to unsloth/* repos, the official \"\n                f\"family base repos, and local paths; '{repo_id}' is neither.\"\n            )\n        # Companions load with from_pretrained, so a base repo is held to the non-GGUF bar: a GGUF pick must not smuggle in a remote base.\n        if base_repo and (base_repo or \"\").strip() and not _is_trusted_video_repo(base_repo):\n            raise ValueError(\n                f\"base_repo is limited to unsloth/* repos, the official family base \"\n                f\"repos, and local paths; '{base_repo}' is neither.\"\n            )\n        # A local base_repo loads as a full pipeline (needs model_index.json); reject a non-pipeline one here, before the load.\n        from core.inference.diffusion import _assert_local_base_is_pipeline\n\n        _assert_local_base_is_pipeline(base_repo)\n        if kind in (\"gguf\", \"single_file\") and not gguf_filename:\n            raise ValueError(\"A gguf/single_file load needs the checkpoint filename.\")\n        if kind in (\"gguf\", \"single_file\") and fam.is_moe:\n            # A single checkpoint carries one expert; the other would load dense bf16, off-plan.\n            raise ValueError(\n                f\"'{fam.name}' is a dual-expert model: a single {kind} file covers only \"\n                f\"one of its two transformers. Load the diffusers pipeline repo \"\n                f\"('{fam.base_repo}') instead.\"\n            )\n        # A missing local checkpoint must fail HERE, before the route evicts a resident model.\n        if kind in (\"gguf\", \"single_file\"):","sourceCodeStart":1171,"sourceCodeEnd":1207,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L1171-L1207","documentation":"Same trusted-repo guard as for repo_id, applied to base_repo: companion components of a GGUF load are fetched with from_pretrained, so the base repo a GGUF pick points at is held to the non-GGUF bar even though the main load is GGUF. base_repo must be an unsloth/* repo, an official family base repo, or a local path.","triggerScenarios":"Loading model_kind='gguf' with a base_repo that is a remote repo outside unsloth/* and the official set (e.g. base_repo='someone/wan-base') — the GGUF pick would otherwise smuggle in an untrusted remote base for the companion components.","commonSituations":"Manually overriding base_repo to a mirror when the default is unavailable; configs written for older versions that allowed any base repo; mixing a GGUF from one source with a base repo copied from a forum post.","solutions":["Drop the custom base_repo and let the family default (fam.base_repo) be used.","Point base_repo at the official family base repo or an unsloth/* mirror.","Clone the base pipeline locally and pass that directory path as base_repo (local paths pass).","Leave base_repo empty/None when the GGUF repo already implies its base."],"exampleFix":"# before\nload(repo_id='gguf-repo/x-Q4.gguf-dir', model_kind='gguf',\n     gguf_filename='x-Q4_K_M.gguf', base_repo='randomuser/Wan2.5-base')\n\n# after\nload(repo_id='...', model_kind='gguf', gguf_filename='x-Q4_K_M.gguf')\n# or\nload(..., base_repo='unsloth/Wan2.5')","handlingStrategy":"validation","validationCode":"from core.inference.video import _is_trusted_video_repo\n\nif base_repo and not _is_trusted_video_repo(base_repo):\n    base_repo = None  # fall back to fam.base_repo","typeGuard":"def base_repo_ok(base_repo: str | None) -> bool:\n    return not base_repo or _is_trusted_video_repo(base_repo)","tryCatchPattern":"try:\n    load(...)\nexcept ValueError as e:\n    if 'base_repo is limited' in str(e):\n        load(..., base_repo=None)\n    else:\n        raise","preventionTips":["Omit base_repo unless you have a specific reason; the family default is already trusted.","Treat base_repo like repo_id security-wise: unsloth/*, official base, or local path only."],"tags":["video","security","gguf","base-repo","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}