{"record":{"id":"041eb68730002f54","repo":"unslothai/unsloth","slug":"the-stable-diffusion-cpp-binary-at-binary-does-n","errorCode":null,"errorMessage":"The stable-diffusion.cpp binary at {binary} does not advertise MiniMax-H3 support (its --help does not list the H3 options), so generation would fail on it. Point SD_CLI_PATH at a build from master-812-ea7f0c8 or newer, or UNSLOTH_SD_CPP_PATH at the directory holding one{_h3_replacement_hint(binary)}.","messagePattern":"The stable-diffusion\\.cpp binary at (.+?) does not advertise MiniMax-H3 support \\(its --help does not list the H3 options\\), so generation would fail on it\\. Point SD_CLI_PATH at a build from master-812-ea7f0c8 or newer, or UNSLOTH_SD_CPP_PATH at the directory holding one(.+?)\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":409,"severity":"error","filePath":"studio/backend/core/inference/sd_cpp_backend.py","lineNumber":508,"sourceCode":"    # What is wrong with it, for the log lines on the managed path below: a managed copy that is not\n    # sd.cpp at all is still deleted and reinstalled, but calling it an old build would be false.\n    fault = \"does not advertise MiniMax-H3 support\" if identified else \"is not stable-diffusion.cpp\"\n    if not is_managed_binary(binary):\n        # Not an old sd.cpp -- not sd.cpp at all. Worth its own message: the H3 marker is missing\n        # from EVERY program that is not stable-diffusion.cpp, so reporting the capability verdict\n        # here sent users hunting for a newer build of something they never installed (#8507, where\n        # the binary was Debian/Ubuntu's `sd` find-and-replace tool). Discovery already skips an\n        # unrelated PATH `sd`, so what reaches this line came from somewhere the identity gate does\n        # not cover -- an SD_CLI_PATH / UNSLOTH_SD_CPP_PATH override, an in-tree developer build, or\n        # a PATH `sd-cli`. None of them is ours to overwrite, so all four say so and stop.\n        if not identified:\n            raise RuntimeError(\n                f\"The executable at {binary} is not stable-diffusion.cpp: its --help output does \"\n                f\"not identify the project. Point SD_CLI_PATH at a stable-diffusion.cpp build from \"\n                f\"master-812-ea7f0c8 or newer, or UNSLOTH_SD_CPP_PATH at the directory holding one\"\n                f\"{_h3_replacement_hint(binary)}.\"\n            )\n        raise RuntimeError(\n            f\"The stable-diffusion.cpp binary at {binary} does not advertise MiniMax-H3 support \"\n            f\"(its --help does not list the H3 options), so generation would fail on it. \"\n            f\"Point SD_CLI_PATH at a build from master-812-ea7f0c8 or \"\n            f\"newer, or UNSLOTH_SD_CPP_PATH at the directory holding one\"\n            f\"{_h3_replacement_hint(binary)}.\"\n        )\n    if not allow_install:\n        # Ours, but replacing it is exactly what auto-install is switched off for.\n        logger.warning(\"managed sd.cpp binary %s %s\", binary, fault)\n        return None\n    # Deleting it is a WRITE to the managed tree, so it takes the same admission an install does.\n    # An image one-shot may be executing this very file: on Linux the running child survives the\n    # unlink but the next image in the batch can no longer resolve it, and on Windows the unlink\n    # fails outright and the H3 load is refused. Held only across the unlink -- ensure_sd_cpp_binary\n    # below claims the tree itself, and the claim is not reentrant.\n    with _tree_claimed_for_install() as claimed:\n        if not claimed:\n            logger.warning(","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/sd_cpp_backend.py#L490-L526","documentation":"Raised when the binary's --help DOES identify stable-diffusion.cpp but does not list the MiniMax-H3 options, i.e. it is a genuine but too-old build. The backend refuses to proceed because generation with H3 options would fail on that build, and since the binary is user-provided (not managed) it cannot be silently replaced.","triggerScenarios":"SD_CLI_PATH / UNSLOTH_SD_CPP_PATH / in-tree developer build / PATH sd-cli pointing at a stable-diffusion.cpp build older than master-812-ea7f0c8, then triggering a load or generation that requires H3 support.","commonSituations":"A previously-working pinned build after the H3 requirement was introduced; a distro or container image shipping an older sd.cpp; a stale developer build in the tree after pulling new backend code.","solutions":["Rebuild/re-download stable-diffusion.cpp from master-812-ea7f0c8 or newer and point SD_CLI_PATH (or UNSLOTH_SD_CPP_PATH) at it.","Unset the override and let the backend auto-install its managed binary, if auto-install is permitted.","Verify with `<binary> --help | grep -i h3` that the new build advertises the H3 options before retrying."],"exampleFix":"# before\nexport SD_CLI_PATH=/opt/sd.cpp-old/sd-cli  # pre-H3 build\n\n# after\ngit checkout master-812-ea7f0c8 && cmake --build build\nexport SD_CLI_PATH=/opt/sd.cpp/build/sd-cli","handlingStrategy":"validation","validationCode":"import subprocess\n\ndef supports_h3(binary: str) -> bool:\n    out = subprocess.run([binary, '--help'], capture_output=True, text=True, timeout=15)\n    text = (out.stdout + out.stderr).lower()\n    return 'stable-diffusion' in text and 'h3' in text","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin sd.cpp builds to master-812-ea7f0c8 or newer in CI and deployment images.","Add a smoke test that checks the binary's --help for the H3 options after every rebuild."],"tags":["version-mismatch","binary-validation","sd-cpp","configuration"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}