{"record":{"id":"185be35ab2510296","repo":"odysseus-dev/odysseus","slug":"boogu-mlx-serving-requires-boogu-image-mlx-in-the","errorCode":null,"errorMessage":"Boogu MLX serving requires boogu-image-mlx in the launch Python. Install with: python -m pip install -U git+https://github.com/xocialize/boogu-image-mlx.git","messagePattern":"Boogu MLX serving requires boogu-image-mlx in the launch Python\\. Install with: python -m pip install -U git\\+https://github\\.com/xocialize/boogu-image-mlx\\.git","errorType":"http","errorClass":"HTTPException","httpStatus":503,"severity":"error","filePath":"scripts/mlx_image_server.py","lineNumber":292,"sourceCode":"        \"--height\",\n        str(height),\n        \"--num-inference-steps\",\n        str(steps),\n        \"--no-snap-resolution\",\n    ]\n    env = os.environ.copy()\n    proc = subprocess.run(cmd, env=env, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n    if proc.returncode != 0:\n        detail = (proc.stderr or proc.stdout or \"HiDream generator failed\").strip()\n        raise HTTPException(500, detail[-4000:])\n\n\ndef _generate_boogu(model: str, prompt: str, out_path: Path, width: int, height: int, steps: int) -> None:\n    try:\n        from boogu_image_mlx.pipeline_mlx import BooguImagePipeline\n        from PIL import Image\n    except Exception as e:\n        raise HTTPException(\n            503,\n            \"Boogu MLX serving requires boogu-image-mlx in the launch Python. \"\n            \"Install with: python -m pip install -U git+https://github.com/xocialize/boogu-image-mlx.git\",\n        ) from e\n\n    model_path = _snapshot_path(model)\n    vlm_model = (_args.vlm_model or os.environ.get(\"ODYSSEUS_MLX_IMAGE_VLM_MODEL\") or \"\").strip()\n    if not vlm_model:\n        raise HTTPException(\n            422,\n            \"This MLX image pipeline requires a companion vision-language model. \"\n            \"Relaunch with --vlm-model <repo_or_path> or set ODYSSEUS_MLX_IMAGE_VLM_MODEL.\",\n        )\n    try:\n        pipe = BooguImagePipeline.from_pretrained(\n            str(model_path),\n            vlm_model,\n        )","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/odysseus-dev/odysseus/blob/f9235ebbf13f693a6fd29ce70b097f6ec83705bf/scripts/mlx_image_server.py#L274-L310","documentation":"Raised by _generate_boogu in scripts/mlx_image_server.py with HTTP 503 when the in-process import of boogu_image_mlx (BooguImagePipeline) or PIL fails. Unlike the mflux/HiDream paths, Boogu generation runs inside the server process, so the boogu-image-mlx package must be installed in the launch Python.","triggerScenarios":"POST /v1/images/generations with a model matched by _is_boogu when 'from boogu_image_mlx.pipeline_mlx import BooguImagePipeline' raises ImportError/ModuleNotFoundError.","commonSituations":"boogu-image-mlx is only distributed via GitHub (not PyPI), so plain pip install boogu misses it; installed into a different venv than the server; Pillow missing in the same environment triggers the same raise.","solutions":["Install exactly as instructed: python -m pip install -U git+https://github.com/xocialize/boogu-image-mlx.git","Install into the same interpreter that launches mlx_image_server.py (check sys.executable in logs)","Also ensure Pillow is present since the same try block imports it"],"exampleFix":"# before\npython scripts/mlx_image_server.py --model xocialize/boogu-image  # 503\n# after\npython -m pip install -U git+https://github.com/xocialize/boogu-image-mlx.git\npython scripts/mlx_image_server.py --model xocialize/boogu-image","handlingStrategy":"type-guard","validationCode":"import importlib.util, sys, subprocess\nif importlib.util.find_spec('boogu_image_mlx') is None:\n    subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-U',\n        'git+https://github.com/xocialize/boogu-image-mlx.git'])","typeGuard":"def boogu_available() -> bool:\n    import importlib.util\n    return importlib.util.find_spec('boogu_image_mlx') is not None","tryCatchPattern":null,"preventionTips":["Install the git package explicitly in the server's Dockerfile/requirements","Health-check imports of every backend the model router can select","Keep the install URL in your provisioning script, not in memory"],"tags":["boogu","mlx","dependency","http-503"],"backgroundTag":null,"analyzedSha":"f9235ebbf13f693a6fd29ce70b097f6ec83705bf","analyzedAt":"2026-08-14T21:47:48.359Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}