Files
ollama/x/imagegen/cmd/engine
Daniel Hiltgen 87d21c7fc0 MLX: harden for init failures (#14777)
The CLI now links to the lazy-load MLX code, but that still happens in
init functions.  On internal MLX errors, the CLI exits before it has a
chance to start.  This change re-wires the MLX error handling so it
doesn't exit by default.  The MLX based runners currently expect exits
on failure, so they re-initialize the default error handling.  We can
refine error handling for better go stack traces in the future.
2026-03-10 22:52:23 -07:00
..
2026-03-10 22:52:23 -07:00

MLX Engine

Experimental MLX backend for running models on Apple Silicon and CUDA.

Build

go build -o engine ./x/imagegen/cmd/engine

Text Generation

Text generation models are no longer supported by this engine.

Image Generation

./engine -zimage -model /path/to/z-image -prompt "a cat" -output cat.png

Options:

  • -width, -height - image dimensions (default 1024x1024)
  • -steps - denoising steps (default 9)
  • -seed - random seed (default 42)