unslothai/unsloth · error · ValueError
a .gguf checkpoint needs model_kind 'gguf', not 'single_file
Error message
a .gguf checkpoint needs model_kind 'gguf', not 'single_file'.
What it means
The mirror of error 71: the filename ends in .gguf but model_kind is 'single_file'. The single-file path loads a .safetensors checkpoint via from_single_file, so a .gguf name means the caller actually wants the GGUF path and mislabelled the kind.
Source
Thrown at studio/backend/core/inference/diffusion.py:1682
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:
raise ValueError(
"a 'pipeline' load takes a full diffusers repo, not a single-file name."
)
if local_root.exists():
if not (local_root / "model_index.json").exists():
raise FileNotFoundError(View on GitHub (pinned to 203007d190)
Solutions
- Set model_kind='gguf' (or drop model_kind entirely - a .gguf filename usually resolves the kind automatically).
- If you really want the single-file safetensors path, pick the corresponding .safetensors filename from the repo.
Example fix
# before
manager.validate_load_request(repo_id="org/model", model_kind="single_file",
gguf_filename="model-Q4_K_M.gguf")
# 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
if gguf_filename and gguf_filename.lower().endswith(".gguf"):
assert model_kind != "single_file", "a .gguf name means kind 'gguf'" Try / catch
try:
fam = manager.validate_load_request(repo_id=r, model_kind=k, gguf_filename=f)
except ValueError as e:
if "needs model_kind 'gguf'" in str(e):
manager.validate_load_request(repo_id=r, model_kind="gguf", gguf_filename=f)
else:
raise Prevention
- Migrate legacy configs that labelled every transformer-only load 'single_file' - GGUF files need the 'gguf' kind.
- Treat the file extension as the source of truth and normalize the kind field from it on load of any saved preset.
When it happens
Trigger: model_kind='single_file' with gguf_filename ending in .gguf (case-insensitive) - typically a stale kind field or a UI that renamed its modes while the filename carried over.
Common situations: Older configs that called every transformer-only load 'single_file' before the gguf kind existed; UI mode renamed from single-file to include GGUF but the stored kind string was not migrated.
Related errors
- '{fam.name}' checkpoints are whole-pipeline single files and
- a single-file checkpoint name is required for a '{kind}' loa
- a 'gguf' load requires a .gguf checkpoint name.
- '{repo_id}' is a single-file GGUF repo; load it with model_k
- '{fam.name}' loads only as a full diffusers pipeline (it ass
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/605268074483506e.
Report an issue: GitHub.