Image generation
12 aliases · FLUX.2 klein · Z-Image-Turbo · Qwen-Image · FLUX.1-schnell · HiDream-O1 · Stable Diffusion XL / 3.5 · Bonsai Image. Local image generation through an OpenAI-compatible /v1/images API — the same server the desktop app's Images tab uses.
Pick one
One command per model, smallest memory floor first. The floor is the alias's minimum-memory setting; the size is what rapid-mlx models --modality image-gen reports. Install the extra once with pip install rapid-mlx==0.16.0 (Python 3.11+); weights download on first use.
rapid-mlx serve qwen-image-2.1rapid-mlx serve flux2-klein-4brapid-mlx serve bonsai-image-4b-2bitrapid-mlx serve z-image-turborapid-mlx serve flux-schnellrapid-mlx serve sdxl-baserapid-mlx serve flux2-klein-4b-bf16rapid-mlx serve hidream-o1-devrapid-mlx serve sd35-large-4bitrapid-mlx serve qwen-image-2.1-bf16rapid-mlx serve qwen-imagerapid-mlx serve qwen-image-edit
rapid-mlx serves POST /v1/images/generations (and POST /v1/images/edits) in the OpenAI Images shape, rendering through mflux and pinned native MLX runtimes entirely on your Mac. One image model is resident at a time — same single-worker discipline as the video lane. In the desktop app, the Images tab drives the same endpoints: pick a model, prompt, refine, and every render lands in a filmstrip you can step back through.
- family
- Image generation (mflux + native MLX)
- aliases
- 12
- install
- pip install rapid-mlx==0.16.0
- OpenAI base URL
- http://localhost:8000/v1
Usage
pip install rapid-mlx==0.16.0
rapid-mlx serve z-image-turbo
curl http://localhost:8000/v1/images/generations \
-H 'Content-Type: application/json' \
-d '{"model":"z-image-turbo","prompt":"a lighthouse at dusk, oil painting","size":"1024x1024"}'
Family pages
Z-Image, FLUX and Qwen-Image have their own pages with usage and download details:
Notes & caveats
- Requests are validated against the served model — a mismatched
modelfield returns a clear error instead of silently ignoring it. - Generation is compute-bound: seconds to tens of seconds per image depending on model and Mac. Distilled checkpoints (FLUX.2 klein, Z-Image-Turbo, FLUX.1-schnell) take 4–8 steps; the others take 20–40.
- Licenses differ by model: HiDream-O1 is MIT, SDXL is OpenRAIL++, Stable Diffusion 3.5 Large uses the Stability AI Community License — check a model's terms before commercial use.
- The desktop app keeps a chat model and an image model warm at once, so switching tabs doesn't evict either.
Frequently asked questions
Can I generate images locally on a Mac?
Yes — POST /v1/images/generations renders entirely on Apple Silicon. No cloud, no per-image cost. The desktop Images tab uses the same server.
Which image models run on Apple Silicon?
Twelve aliases, from qwen-image-2.1 and flux2-klein-4b (8–12 GB Macs) up to qwen-image-edit (96 GB). flux2-klein-4b is the fast default.