unslothai/unsloth · error · ValueError
Local base_repo is not a diffusers pipeline directory (no {i
Error message
Local base_repo is not a diffusers pipeline directory (no {indexes}): {base} What it means
Raised by the local-path validation for diffusion base repos: the path exists on disk and is a directory (or a non-directory path) but contains neither model_index.json nor, when allow_modular, modular_model_index.json — so it is not a diffusers pipeline directory and cannot serve as base_repo.
Source
Thrown at studio/backend/core/inference/diffusion.py:593
pipeline (MiniMax-H3 ships no ``model_index.json`` at all), and the local-model scanners
already count either index. Off by default -- a conventional ``DiffusionPipeline`` load still
needs the conventional index, and accepting a modular directory there would only move the
failure back into the loader."""
base = (base_repo or "").strip()
if not base:
return
try:
root = Path(base).expanduser()
exists = root.exists()
except OSError:
return # invalid path characters -> a remote id, not a local path
if not exists:
return
indexes = ["model_index.json"]
if allow_modular:
indexes.append("modular_model_index.json")
if not root.is_dir() or not any((root / name).is_file() for name in indexes):
raise ValueError(
f"Local base_repo is not a diffusers pipeline directory "
f"(no {' or '.join(indexes)}): {base}"
)
def _repo_access_message(repo: str, *, gated: bool) -> str:
"""The repo id AND its licence page: the worker's 401/403 names neither, and the base comes from a
card tag, so the user never saw which repo it is."""
url = f"https://huggingface.co/{repo}"
if gated:
return (
f"'{repo}' is gated on Hugging Face and this model cannot be downloaded without it. "
f"Accept its licence at {url}, then add a Hugging Face token that has access in "
"Studio settings and try again."
)
return (
f"'{repo}' could not be read from Hugging Face (private, renamed or removed) and this "
f"model cannot be downloaded without it. Check {url}, then add a Hugging Face token that "View on GitHub (pinned to 203007d190)
Solutions
- Point base_repo at the directory that directly contains model_index.json (the true pipeline root)
- If the weights are a single .safetensors/.gguf checkpoint, pass it as single-file input instead of a pipeline base_repo
- Re-download or complete the pipeline so model_index.json and component subfolders are present
- Check for a nested wrapper directory (downloads often add one level)
Example fix
# before
{"base_repo": "/models/stable-diffusion/checkpoints"}
# after
{"base_repo": "/models/stable-diffusion/pipeline"} # dir containing model_index.json Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def is_diffusers_pipeline_dir(base: str, allow_modular: bool = False) -> bool:
root = Path(base).expanduser()
if not root.is_dir():
return False
names = ["model_index.json"] + (["modular_model_index.json"] if allow_modular else [])
return any((root / n).is_file() for n in names) Try / catch
try:
validate_local_base(base, allow_modular=True)
except ValueError as e:
if "not a diffusers pipeline directory" in str(e):
hint = "point base_repo at the folder containing model_index.json" Prevention
- Check for model_index.json at the exact path before passing base_repo
- Use the single-file path for raw .safetensors checkpoints
- Watch for extra wrapper directories created by downloads
When it happens
Trigger: Pointing base_repo at a checkpoint folder holding only .safetensors + a config.yaml (SingleFile layout), a LoRA directory, a GGUF folder, or a hub cache blob directory; a typo'd subfolder inside a real pipeline dir; an empty/failed download directory.
Common situations: Mixing up A1111/ComfyUI-style checkpoint layouts with diffusers layouts; moving/renaming pipeline folders so model_index.json ends up outside; interrupted downloads leaving a directory with only partial files.
Related errors
- Execution artifact path is not a dataset folder.
- Unknown model_kind '{model_kind}'. Expected one of {sorted(_
- Invalid base64 image data: {exc}
- Image is too large ({w}x{h}); maximum is {max_side}px per si
- a single-file checkpoint name is required for a '{kind}' loa
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/e8c90a815f8ab280.
Report an issue: GitHub.