unslothai/unsloth · error · ValueError
a single-file checkpoint name is required for a '{kind}' loa
Error message
a single-file checkpoint name is required for a '{kind}' load. What it means
Raised in the cheap, network-free validation when the resolved load kind is 'gguf' or 'single_file' but no checkpoint filename was supplied. Both transformer-only paths need to know which file inside the repo (or local directory) to load; its absence fails here rather than after the resident GPU model has been evicted.
Source
Thrown at studio/backend/core/inference/diffusion.py:1676
f"Non-GGUF diffusion loads are restricted to unsloth/* repos (or a local "
f"path); got '{repo_id}'. Pass a gguf_filename to load a GGUF instead."
)
# The companion base repo also loads via from_pretrained, so it must clear the same trust bar.
if base_repo and base_repo.strip() and not _is_trusted_diffusion_repo(base_repo):
raise ValueError(
f"base_repo is restricted to unsloth/* repos (or a local path); got '{base_repo}'."
)
# A local base_repo loads as a full pipeline; reject a non-pipeline one before eviction.
_assert_local_base_is_pipeline(base_repo)
# Reject a bad LOCAL pick before the route evicts chat: a path-shaped repo_id must be on disk.
local_root = Path(repo_id).expanduser()
# Path-shaped: "."/".." prefix, a backslash (never in "org/name"), or an absolute path.
path_shaped = (
repo_id.startswith(("/", "\\", "~", ".")) or "\\" in repo_id or local_root.is_absolute()
)
if kind in ("gguf", "single_file"):
if not gguf_filename:
raise ValueError(f"a single-file checkpoint name is required for a '{kind}' load.")
# Fail a kind/extension mismatch before the handoff: gguf needs .gguf, single_file must not.
is_gguf_name = gguf_filename.lower().endswith(".gguf")
if kind == "gguf" and not is_gguf_name:
raise ValueError("a 'gguf' load requires a .gguf checkpoint name.")
if kind == "single_file" and is_gguf_name:
raise ValueError("a .gguf checkpoint needs model_kind 'gguf', not 'single_file'.")
# A single-file load must name a real .safetensors, else it evicts chat then fails in background.
if kind == "single_file" and not gguf_filename.lower().endswith(".safetensors"):
raise ValueError(
f"'{gguf_filename}' is not a loadable single-file checkpoint "
f"(expected a .safetensors name; use a .gguf name for a GGUF load)."
)
if local_root.exists():
resolve_local_gguf_child(local_root, gguf_filename)
elif path_shaped:
raise FileNotFoundError(f"Local model path does not exist: {repo_id}")
else: # pipeline
if gguf_filename:View on GitHub (pinned to 203007d190)
Solutions
- Pass the checkpoint filename: a .gguf name for a gguf load, a .safetensors name for a single_file load.
- If you meant a full pipeline load, set model_kind='pipeline' (or leave unset and pass no gguf_filename).
- List the repo's files (HF file tree or local dir) to get the exact filename including quant suffix.
Example fix
# before
manager.validate_load_request(repo_id="org/model", model_kind="gguf")
# ValueError: a single-file checkpoint name is required for a 'gguf' load.
# after
manager.validate_load_request(repo_id="org/model", model_kind="gguf",
gguf_filename="model-Q4_K_M.gguf") Defensive patterns
Strategy: validation
Validate before calling
kind = resolve_model_kind(gguf_filename, model_kind)
if kind in ("gguf", "single_file"):
assert gguf_filename, f"a checkpoint name is required for a '{kind}' load" Try / catch
try:
fam = manager.validate_load_request(repo_id=r, model_kind=k, gguf_filename=f)
except ValueError as e:
if "checkpoint name is required" in str(e):
prompt_for_checkpoint_file(r, k)
else:
raise Prevention
- Make filename a required field in any UI that offers gguf/single_file modes.
- Clear gguf_filename whenever the mode switches to pipeline so stale state cannot produce kind/param mismatches.
- Prefer letting gguf_filename drive kind inference rather than setting both independently.
When it happens
Trigger: Calling validate_load_request / load with model_kind='gguf' or 'single_file' (or a family/parameters combination that resolves to those kinds) with gguf_filename=None or empty.
Common situations: UI sends model_kind but drops the filename field; saved preset from a pipeline load has kind overwritten but no file picked; scripting the API and forgetting the second positional-style parameter.
Related errors
- a .gguf checkpoint needs model_kind 'gguf', not 'single_file
- '{fam.name}' checkpoints are whole-pipeline single files and
- '{fam.name}' loads only as a full diffusers pipeline (it ass
- a 'gguf' load requires a .gguf checkpoint name.
- '{gguf_filename}' is not a loadable single-file checkpoint (
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/c09606306dfb4f3d.
Report an issue: GitHub.