{"record":{"id":"0ce141a9bd507ce1","repo":"unslothai/unsloth","slug":"local-pipeline-path-is-not-a-diffusers-directory","errorCode":null,"errorMessage":"Local pipeline path is not a diffusers directory (no {' or '.join(indexes)}): {repo_id}","messagePattern":"Local pipeline path is not a diffusers directory \\(no (.+?)\\): (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/video.py","lineNumber":1257,"sourceCode":"                    raise ValueError(\n                        f\"Local checkpoint '{repo_id}' is not a .safetensors file; a \"\n                        f\"'single_file' load needs a .safetensors checkpoint.\"\n                    )\n            elif path_shaped:\n                raise ValueError(f\"Local model path '{repo_id}' does not exist.\")\n        # A local pipeline pick must be a diffusers directory (model_index.json), else it would only fail after eviction.\n        if kind == \"pipeline\":\n            root = Path(repo_id).expanduser()\n            # Gate on .exists() (not .is_dir()) so a local FILE picked as a pipeline is rejected too.\n            indexes = (\n                (\"model_index.json\", \"modular_model_index.json\")\n                if fam.modular_workflow\n                else (\"model_index.json\",)\n            )\n            if root.exists() and not (\n                root.is_dir() and any((root / name).is_file() for name in indexes)\n            ):\n                raise ValueError(\n                    f\"Local pipeline path is not a diffusers directory \"\n                    f\"(no {' or '.join(indexes)}): {repo_id}\"\n                )\n        # Reject a malformed transformer_quant cheaply, before the handoff (pipeline-kind only, matching the image backend).\n        normalize_transformer_quant(transformer_quant)\n        # Reject a malformed text_encoder_quant the same way. Every kind: an unsupported scheme is\n        # a bad request regardless of whether this family has a hosted quantized encoder for it.\n        normalize_te_quant(text_encoder_quant)\n        _ensure_mp4_encoder_available()\n        return fam\n\n    # ── background load + progress ───────────────────────────────────────────\n\n    def begin_load(\n        self,\n        repo_id: str,\n        *,\n        gguf_filename: Optional[str] = None,","sourceCodeStart":1239,"sourceCodeEnd":1275,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/video.py#L1239-L1275","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"# before: loose safetensors dir\nload(repo_id='/data/loose-ckpts', model_kind='pipeline')\n\n# after\n# hf download Wan2.5 --local-dir /data/wan25-pipe\nload(repo_id='/data/wan25-pipe', model_kind='pipeline')  # has model_index.json","handlingStrategy":"validation","validationCode":"from pathlib import Path\nroot = Path(repo_id).expanduser()\nindexes = (('model_index.json', 'modular_model_index.json') if fam.modular_workflow\n           else ('model_index.json',))\nif root.exists() and not (root.is_dir() and any((root / n).is_file() for n in indexes)):\n    raise ValueError(f'{repo_id} is not a diffusers pipeline directory')  # client-side","typeGuard":"def is_pipeline_dir(repo_id: str, modular: bool) -> bool:\n    root = Path(repo_id).expanduser()\n    idx = ('model_index.json', 'modular_model_index.json') if modular else ('model_index.json',)\n    return root.is_dir() and any((root / n).is_file() for n in idx)","tryCatchPattern":null,"preventionTips":["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."],"tags":["video","pipeline","local-path","diffusers","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}