{"record":{"id":"7b4411459dfd29ea","repo":"odysseus-dev/odysseus","slug":"hidream-generator-script-not-found-in-snapshot-s","errorCode":null,"errorMessage":"HiDream generator script not found in snapshot: {script}","messagePattern":"HiDream generator script not found in snapshot: (.+?)","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"scripts/mlx_image_server.py","lineNumber":262,"sourceCode":"        _write_bridge_input_image(image_raw, inp)\n        _write_bridge_mask(mask_raw, mask)\n        weights = _weights_path(model)\n        mode = \"fast\" if (\"mi-gan\" in model.lower() or \"migan\" in model.lower()) else \"best\"\n        _run_bridge([\n            bridge,\n            \"--model\", str(weights),\n            \"--image\", str(inp),\n            \"--mask\", str(mask),\n            \"--output\", str(out_path),\n            \"--mode\", mode,\n        ])\n\n\ndef _generate_hidream(model: str, prompt: str, out_path: Path, width: int, height: int, steps: int) -> None:\n    model_path = _snapshot_path(model)\n    script = model_path / \"scripts\" / \"hidream_o1\" / \"generate_hidream_o1_mlx.py\"\n    if not script.exists():\n        raise HTTPException(500, f\"HiDream generator script not found in snapshot: {script}\")\n    cmd = [\n        sys.executable,\n        str(script),\n        \"--model-path\",\n        str(model_path),\n        \"--prompt\",\n        prompt,\n        \"--output\",\n        str(out_path),\n        \"--width\",\n        str(width),\n        \"--height\",\n        str(height),\n        \"--num-inference-steps\",\n        str(steps),\n        \"--no-snap-resolution\",\n    ]\n    env = os.environ.copy()","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/scripts/mlx_image_server.py#L244-L280","documentation":"Raised by _generate_hidream in scripts/mlx_image_server.py with HTTP 500 when the downloaded HiDream snapshot lacks scripts/hidream_o1/generate_hidream_o1_mlx.py. The server shells out to that vendored generator script inside the model repo; a snapshot that omits it (incomplete download or repo revision without the script) cannot generate.","triggerScenarios":"Generating with a model matched by _is_hidream when <snapshot>/scripts/hidream_o1/generate_hidream_o1_mlx.py does not exist: partial snapshot_download, a fork/quantized mirror of the repo that dropped the scripts folder, or snapshot allow_patterns that excluded .py files.","commonSituations":"HF cache interrupted mid-download; user pointed --model at a weights-only mirror repo; revision pinned to a commit before the script was added; antivirus/backup tooling removed .py files from the cache.","solutions":["Purge the snapshot from the HF cache and re-download from the official repo (which vendors the script)","Confirm on the Hub that the pinned repo/revision actually contains scripts/hidream_o1/generate_hidream_o1_mlx.py","If using a mirror, switch --model to the canonical HiDream repo id or a local clone that includes the scripts directory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\nscript = snapshot / 'scripts' / 'hidream_o1' / 'generate_hidream_o1_mlx.py'\nif not script.exists():\n    purge_snapshot(repo); snapshot_download(repo)  # re-fetch","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After downloading HiDream, assert the vendored script exists before starting the server","Use the official repo, not weights-only mirrors","Pin a revision known to include scripts/"],"tags":["hidream","mlx","huggingface-cache","http-500"],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}