{"record":{"id":"442d7f7aadf9eea5","repo":"unslothai/unsloth","slug":"repo-id-has-no-native-sd-cpp-asset-mapping","errorCode":null,"errorMessage":"'{'repo_id'}' has no native sd.cpp asset mapping.","messagePattern":"'(.+?)' has no native sd\\.cpp asset mapping\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"studio/backend/core/inference/sd_cpp_backend.py","lineNumber":1698,"sourceCode":"        diffusers backend returns, so the Hub download manager stages what sd-cli will actually\n        open.\n\n        The two engines want different files: diffusers builds a pipeline around the base repo's\n        sharded components, while sd-cli reads the single-file VAE + text encoders declared in\n        ``diffusion_families``. Planning with the wrong engine stages tens of GB the load never\n        opens and then pulls the native assets inline, outside the manager's progress and disk\n        preflight -- so the route asks whichever engine it predicts the load will select.\n\n        The diffusers-only kwargs (quant / memory / LoRA) are accepted and ignored, exactly as\n        ``begin_load`` accepts them: nothing sd-cli fetches depends on them.\"\"\"\n        if not gguf_filename:\n            raise ValueError(\n                \"gguf_filename is required: the native engine loads single-file GGUF checkpoints only.\"\n            )\n        fam = detect_family_for_pick(repo_id, gguf_filename, family_override)\n        if fam is None or not family_sd_cpp_supported(fam):\n            # Unreachable through the route, but a direct caller gets the same message begin_load would raise.\n            raise ValueError(f\"'{repo_id}' has no native sd.cpp asset mapping.\")\n\n        specs = self._asset_specs(\n            repo_id,\n            gguf_filename,\n            fam,\n            self._flux2_inner_dim(repo_id, gguf_filename, fam, hf_token),\n        )\n        by_repo = self._assets_by_repo(specs)\n\n        # STAGED before the load runs, so each entry must name the repo _fetch_assets will pull\n        # from: some asset repos are gated (the FLUX.1 VAE lives in black-forest-labs/FLUX.1-schnell)\n        # and an anonymous user would 401 at staging, never reaching the swap. Same per-repo file\n        # list on both sides, so both take the same decision.\n        fetch_repo = _fetch_repo_map(specs, hf_token)\n        # MERGED, not reassigned: two upstream repos can share one fetch repo (the FLUX.2 VAE and\n        # the dev encoders both come from Comfy-Org/flux2-dev once that repack is cached), and a\n        # plain comprehension would drop whichever landed first, leaving its files out of both the\n        # staged entry and the footprint.","sourceCodeStart":1680,"sourceCodeEnd":1716,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/sd_cpp_backend.py#L1680-L1716","documentation":"ValueError from the planning API when the family cannot be detected or has no native sd.cpp asset mapping. The comment notes it is unreachable through the route (which only plans for picks the native engine would accept); it exists so direct callers get the same message begin_load would raise.","triggerScenarios":"Direct call to the planning API with an unsupported repo/family or a family without an sd.cpp mapping.","commonSituations":"Plugins/MCP tools planning downloads for a diffusers-only model; family_override misuse.","solutions":["Plan/load only native-supported families (those with an sd.cpp asset mapping).","Fix family_override or the repo pick so detection yields a native-supported family.","Use the diffusers planner for diffusers-engine models."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fam = detect_family_for_pick(repo_id, gguf_filename, family_override)\nif fam is None or not family_sd_cpp_supported(fam):\n    raise ValueError(f'{repo_id}: not plannable on the native engine')","typeGuard":null,"tryCatchPattern":"try:\n    plan = backend.plan_assets(repo_id=r, gguf_filename=f)\nexcept ValueError as e:\n    if 'no native sd.cpp asset mapping' in str(e):\n        plan = diffusers_planner(r)\n    raise","preventionTips":["Gate planning calls on family_sd_cpp_supported like the route does.","Keep engine-specific planners behind an engine router in client code."],"tags":["validation","model-support","sd-cpp"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}