unslothai/unsloth · error · ValueError

base_repo is limited to unsloth/* repos, the official family

Error message

base_repo is limited to unsloth/* repos, the official family base repos, and local paths; '{base_repo}' is neither.

What it means

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.

Source

Thrown at studio/backend/core/inference/video.py:1189

        else:
            # Refuse a too-old diffusers here rather than deep in the load.
            from .diffusion_families import assert_pipeline_class_available
            assert_pipeline_class_available(fam.pipeline_class, fam.name)
            if fam.modular_workflow:
                import diffusers
                if not hasattr(diffusers, fam.transformer_class):
                    raise ValueError(
                        "MiniMax-H3 needs the Diffusers revision bundled with this Studio "
                        "version. Reinstall Studio dependencies and retry."
                    )
        if kind != "gguf" and not _is_trusted_video_repo(repo_id):
            raise ValueError(
                f"Non-GGUF video loads are limited to unsloth/* repos, the official "
                f"family base repos, and local paths; '{repo_id}' is neither."
            )
        # 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.
        if base_repo and (base_repo or "").strip() and not _is_trusted_video_repo(base_repo):
            raise ValueError(
                f"base_repo is limited to unsloth/* repos, the official family base "
                f"repos, and local paths; '{base_repo}' is neither."
            )
        # A local base_repo loads as a full pipeline (needs model_index.json); reject a non-pipeline one here, before the load.
        from core.inference.diffusion import _assert_local_base_is_pipeline

        _assert_local_base_is_pipeline(base_repo)
        if kind in ("gguf", "single_file") and not gguf_filename:
            raise ValueError("A gguf/single_file load needs the checkpoint filename.")
        if kind in ("gguf", "single_file") and fam.is_moe:
            # A single checkpoint carries one expert; the other would load dense bf16, off-plan.
            raise ValueError(
                f"'{fam.name}' is a dual-expert model: a single {kind} file covers only "
                f"one of its two transformers. Load the diffusers pipeline repo "
                f"('{fam.base_repo}') instead."
            )
        # A missing local checkpoint must fail HERE, before the route evicts a resident model.
        if kind in ("gguf", "single_file"):

View on GitHub (pinned to 203007d190)

Solutions

  1. Drop the custom base_repo and let the family default (fam.base_repo) be used.
  2. Point base_repo at the official family base repo or an unsloth/* mirror.
  3. Clone the base pipeline locally and pass that directory path as base_repo (local paths pass).
  4. Leave base_repo empty/None when the GGUF repo already implies its base.

Example fix

# before
load(repo_id='gguf-repo/x-Q4.gguf-dir', model_kind='gguf',
     gguf_filename='x-Q4_K_M.gguf', base_repo='randomuser/Wan2.5-base')

# after
load(repo_id='...', model_kind='gguf', gguf_filename='x-Q4_K_M.gguf')
# or
load(..., base_repo='unsloth/Wan2.5')
Defensive patterns

Strategy: validation

Validate before calling

from core.inference.video import _is_trusted_video_repo

if base_repo and not _is_trusted_video_repo(base_repo):
    base_repo = None  # fall back to fam.base_repo

Type guard

def base_repo_ok(base_repo: str | None) -> bool:
    return not base_repo or _is_trusted_video_repo(base_repo)

Try / catch

try:
    load(...)
except ValueError as e:
    if 'base_repo is limited' in str(e):
        load(..., base_repo=None)
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15). Data as JSON: /api/errors/186defc527c5f8a9. Report an issue: GitHub.