unslothai/unsloth · error · ValueError
Local pipeline path is not a diffusers directory (no {' or '
Error message
Local pipeline path is not a diffusers directory (no {' or '.join(indexes)}): {repo_id} What it means
Raised when model_kind='pipeline' and repo_id exists on disk but is not a diffusers pipeline directory: it lacks model_index.json (or, for modular_workflow families, both model_index.json and modular_model_index.json). A local pipeline pick must be a real diffusers layout or the load would only fail after the resident model had been evicted — hence the early gate.
Source
Thrown at studio/backend/core/inference/video.py:1257
raise ValueError(
f"Local checkpoint '{repo_id}' is not a .safetensors file; a "
f"'single_file' load needs a .safetensors checkpoint."
)
elif path_shaped:
raise ValueError(f"Local model path '{repo_id}' does not exist.")
# A local pipeline pick must be a diffusers directory (model_index.json), else it would only fail after eviction.
if kind == "pipeline":
root = Path(repo_id).expanduser()
# Gate on .exists() (not .is_dir()) so a local FILE picked as a pipeline is rejected too.
indexes = (
("model_index.json", "modular_model_index.json")
if fam.modular_workflow
else ("model_index.json",)
)
if root.exists() and not (
root.is_dir() and any((root / name).is_file() for name in indexes)
):
raise ValueError(
f"Local pipeline path is not a diffusers directory "
f"(no {' or '.join(indexes)}): {repo_id}"
)
# Reject a malformed transformer_quant cheaply, before the handoff (pipeline-kind only, matching the image backend).
normalize_transformer_quant(transformer_quant)
# Reject a malformed text_encoder_quant the same way. Every kind: an unsupported scheme is
# a bad request regardless of whether this family has a hosted quantized encoder for it.
normalize_te_quant(text_encoder_quant)
_ensure_mp4_encoder_available()
return fam
# ── background load + progress ───────────────────────────────────────────
def begin_load(
self,
repo_id: str,
*,
gguf_filename: Optional[str] = None,View on GitHub (pinned to 203007d190)
Solutions
- Download the complete pipeline snapshot (hf download <repo> --local-dir ...) so model_index.json is present at the top level.
- Check you are pointing at the directory that CONTAINS model_index.json, not a subfolder of it (e.g. not the transformer/ subfolder).
- If you only have a single checkpoint file, load it with model_kind='gguf' or 'single_file' instead of 'pipeline'.
- For modular workflows, ensure the export produced modular_model_index.json.
Example fix
# before: loose safetensors dir load(repo_id='/data/loose-ckpts', model_kind='pipeline') # after # hf download Wan2.5 --local-dir /data/wan25-pipe load(repo_id='/data/wan25-pipe', model_kind='pipeline') # has model_index.json
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
root = Path(repo_id).expanduser()
indexes = (('model_index.json', 'modular_model_index.json') if fam.modular_workflow
else ('model_index.json',))
if root.exists() and not (root.is_dir() and any((root / n).is_file() for n in indexes)):
raise ValueError(f'{repo_id} is not a diffusers pipeline directory') # client-side Type guard
def is_pipeline_dir(repo_id: str, modular: bool) -> bool:
root = Path(repo_id).expanduser()
idx = ('model_index.json', 'modular_model_index.json') if modular else ('model_index.json',)
return root.is_dir() and any((root / n).is_file() for n in idx) Prevention
- Download full snapshots (hf download repo --local-dir) so model_index.json lands at the top level.
- Point at the directory containing model_index.json, not a subfolder or a loose-checkpoint folder.
- For single files, use gguf/single_file kinds instead of pipeline.
When it happens
Trigger: load(repo_id='/data/wan25-safetensors-dir', model_kind='pipeline') where the directory holds raw .safetensors files but no model_index.json; also when repo_id is a local FILE picked as a pipeline (root.exists() but not a dir with an index).
Common situations: Pointing at a folder of loose checkpoint files instead of the full pipeline snapshot; incomplete huggingface download that skipped model_index.json; extracted archives missing the top-level folder; modular model directories missing modular_model_index.json.
Related errors
- Local pipeline directory has no model_index.json: {repo_id}
- {exc}
- Local checkpoint '{repo_id}' is not a .gguf file; a 'gguf' l
- Local checkpoint '{repo_id}' is not a .safetensors file; a '
- Local model path '{repo_id}' does not exist.
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/0ce141a9bd507ce1.
Report an issue: GitHub.