{"record":{"id":"f596cdd0e1667ba9","repo":"unslothai/unsloth","slug":"non-gguf-video-loads-are-limited-to-unsloth-repo","errorCode":null,"errorMessage":"Non-GGUF video loads are limited to unsloth/* repos, the official family base repos, and local paths; '{repo_id}' is neither.","messagePattern":"Non-GGUF video loads are 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":1183,"sourceCode":"            picked = h3_transformer_task(gguf_filename or \"\")\n            if h3_task and h3_task != picked:\n                raise ValueError(\n                    f\"'{Path(gguf_filename or '').name}' is the {picked} partition, but the \"\n                    f\"load asked for {h3_task}. Pick the matching checkpoint.\"\n                )\n        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(","sourceCodeStart":1165,"sourceCodeEnd":1201,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L1165-L1201","documentation":"Raised when model_kind is not 'gguf' (pipeline / single_file / diffusers-style loads deserialize arbitrary safetensors) and repo_id is not a trusted source: not an unsloth/* repo, not one of the official family base repos (_TRUSTED_NON_GGUF_VIDEO_REPOS), and not an existing local path. This is a supply-chain guard mirroring the image backend: untrusted repos cannot be deserialized with from_pretrained.","triggerScenarios":"Calling the video load with model_kind='pipeline' (or any non-gguf kind) and repo_id like 'someuser/wan-2.5-fork' — the path does not exist locally, does not start with 'unsloth/', and is not in the trusted base repo set.","commonSituations":"Pointing at a community mirror or personal fork of a model repo; typo in the org name; expecting an arbitrary HF repo to be allowed like it is for GGUF loads; moving from the GGUF picker to the pipeline picker without changing the repo.","solutions":["Use the official family base repo (e.g. the family's base_repo) or an unsloth/* mirror of the model.","Or download/clone the model to a local directory and pass that path as repo_id (existing local paths are trusted).","For quantized single-file loads, use model_kind='gguf' with a .gguf checkpoint instead, which is not subject to this bar.","If the repo genuinely should be trusted, it must be added to _TRUSTED_NON_GGUF_VIDEO_REPOS in the codebase."],"exampleFix":"# before\nload(repo_id='randomuser/Wan2.5-fp8', model_kind='pipeline')\n\n# after\nload(repo_id='unsloth/Wan2.5', model_kind='pipeline')\n# or a local path\nload(repo_id='/models/wan25', model_kind='pipeline')","handlingStrategy":"validation","validationCode":"from core.inference.video import _is_trusted_video_repo\n\nif model_kind != 'gguf' and not _is_trusted_video_repo(repo_id):\n    repo_id = fam.base_repo  # or an unsloth/* mirror, or a local path","typeGuard":"def repo_allowed(repo_id: str, kind: str) -> bool:\n    return kind == 'gguf' or _is_trusted_video_repo(repo_id)","tryCatchPattern":"try:\n    load(...)\nexcept ValueError as e:\n    if 'limited to unsloth' in str(e):\n        # switch to fam.base_repo / unsloth mirror / local dir, then retry\n        raise\n    raise","preventionTips":["For non-GGUF loads, default repo_id to fam.base_repo.","Only deviate with unsloth/* repos or a local snapshot directory.","Remember the GGUF path is the only kind that accepts arbitrary hub repos."],"tags":["video","security","huggingface","validation","trusted-repos"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}