odysseus-dev/odysseus · error · HTTPException
Boogu MLX generation failed: {e}
Error message
Boogu MLX generation failed: {e} What it means
Raised by _generate_boogu in scripts/mlx_image_server.py with HTTP 500 wrapping any exception from BooguImagePipeline.from_pretrained or pipe.generate (load, VLM fetch, generation, or Image.fromarray(...).save). The chained exception text {e} carries the underlying cause; it is a runtime failure, not a client-input error.
Source
Thrown at scripts/mlx_image_server.py:320
422,
"This MLX image pipeline requires a companion vision-language model. "
"Relaunch with --vlm-model <repo_or_path> or set ODYSSEUS_MLX_IMAGE_VLM_MODEL.",
)
try:
pipe = BooguImagePipeline.from_pretrained(
str(model_path),
vlm_model,
)
img = pipe.generate(
prompt,
height=height,
width=width,
steps=steps,
guidance=3.5,
)
Image.fromarray(img).save(out_path)
except Exception as e:
raise HTTPException(500, f"Boogu MLX generation failed: {e}") from e
@app.get("/v1/models")
def list_models():
return {"data": [{"id": _args.model, "object": "model", "owned_by": "local"}]}
@app.post("/v1/images/generations")
def generate(req: ImageRequest):
model = req.model or _args.model
width, height = _size(req.size)
out_images = []
count = max(1, min(int(req.n or 1), 4))
for _ in range(count):
with tempfile.TemporaryDirectory(prefix="odysseus-mlx-image-") as td:
out_path = Path(td) / "image.png"
if _is_hidream(model):
_generate_hidream(model, req.prompt, out_path, width, height, _steps(req.quality))View on GitHub (pinned to f9235ebbf1)
Solutions
- Read {e} in the response to identify the failing stage (from_pretrained vs generate)
- Verify the VLM repo id/path resolves and re-download if the error mentions missing files
- Pin/upgrade mlx and boogu-image-mlx to a known-compatible pair (reinstall the git package)
- Lower height/width/steps if the error indicates memory pressure
Defensive patterns
Strategy: try-catch
Validate before calling
from pathlib import Path assert Path(vlm_model).exists() or '/' in vlm_model, 'vlm_model must be a hub id or local path'
Try / catch
except HTTPException as e:
if e.status_code == 500 and 'Boogu MLX generation failed' in e.detail:
log(e.detail) # contains chained cause
if 'No such file' in e.detail: refresh_vlm_snapshot(); retry_once()
else: raise Prevention
- Pre-download both the boogu and VLM snapshots before serving
- Pin compatible mlx + boogu-image-mlx versions together
- Cap resolution/steps to keep memory headroom
When it happens
Trigger: Boogu generation where pipeline construction or generate raises: bad/missing VLM path, corrupted weights, MLX version incompatibility, unsupported height/width/steps causing an internal assertion, or out-of-memory during generate.
Common situations: vlm-model pointing at a wrong repo id; mlx package version mismatch with boogu-image-mlx; first-run weight download interrupted; very large resolution requests exhausting unified memory.
Related errors
- No safetensors weights found for {model} in {snap}
- detail[-4000:]
- HiDream generator script not found in snapshot: {script}
- Boogu MLX serving requires boogu-image-mlx in the launch Pyt
- This MLX image pipeline requires a companion vision-language
AI-assisted analysis of odysseus-dev/odysseus@f9235ebbf1 (2026-08-14).
Data as JSON: /api/errors/2cfda2e59ac3b1c8.
Report an issue: GitHub.