Skip to main content

mfluxible

A minimal streaming HTTP API for image generation on Apple Silicon, built on mflux. Runs most of the models that mflux supports — one model per server process, configured at startup (see Models; Z-Image-Turbo is the default).

Rather than a full node-graph tool (ComfyUI) or a proprietary format (Draw Things), this exposes a small API in the same spirit as a chat-completions endpoint: each denoising step streams as a "thinking" event while generation happens, with optional in-progress preview images (Draw Things-style), followed by the final image.

Layout

mfluxible/          the model + HTTP API (FastAPI), and the detection sidecar
clients/            everything that talks to it: terminal scripts, a browser harness, an MCP tool
Caddyfile.example   optional: a reverse proxy that puts a bearer token in front of the API

Two packages are published from here, and they stay separate so that neither install drags in the other's dependencies:

install what it is
mfluxible pip install mfluxible the server, its mfluxible-vlm-worker sidecar, and the browser harness. Apple Silicon only — mflux and MLX are
mfluxible-mcp uvx mfluxible-mcp the MCP tool. Talks HTTP to a running server, so it needs no mflux, no MLX and no PyTorch, and can live on a different machine

Quickstart

Requires Python 3.11+ on Apple Silicon.

pip install mfluxible
mfluxible-server

That listens on 127.0.0.1:8420; --host, --port and --config are the flags, and mfluxible-server --help lists them. Everything else is configured with environment variables or a config file.

Running from a checkout instead

Dependencies are managed with uv — brew install uv, or see its installation docs.

uv venv --python 3.11
uv pip install -e .

uv run mfluxible-server --host 127.0.0.1 --port 8420

uv venv creates .venv/ in the repo root; uv pip install and uv run both find it there, so nothing needs activating. uvicorn mfluxible.server:app works too and is the way to reach any uvicorn option mfluxible-server doesn't expose — the config file is applied when the package is imported, so both routes behave identically.

Note that pyproject.toml here is a packaging manifest, not a uv project: it sets [tool.uv] managed = false, so uv run keeps using .venv and writes no lock file. That is what lets a machine running only clients/stream_client.py install requests and nothing else.

The model loads on startup, before the server accepts any requests. On first run this downloads its weights from Hugging Face — expect a sizable one-time download — then quantizes them and caches the quantized copy (see Model cache); both only happen once.

The default model is Z-Image-Turbo (Tongyi-MAI/Z-Image-Turbo). To run something else, set MFLUXIBLE_MODEL (or model in a config file) before starting the server. Only the model you select is ever downloaded. See Models for the full table, what differs between them, and roughly how much memory each needs — 8.6 GB to 31 GB of weights at the default quantization, about half that at MFLUXIBLE_QUANTIZE=4.

Once it's running:

curl -N -X POST http://127.0.0.1:8420/mfluxible/v1/images/generations \
  -H 'Content-Type: application/json' \
  -d '{"prompt": "a puffin on a cliff at sunset", "preview_every": 2}'

or use one of the clients for something more visual.

Documentation

  • Clients — the bundled terminal scripts, the browser harness, and pointing a third-party frontend (OpenAI-compatible, or SillyTavern) at the server.
  • MCP tool — generating images from an MCP client: what the tool does, how to register it with each tested client, and its own environment variables.
  • API — every endpoint: the native streaming endpoint and its SSE event schema, image-to-image and fractional start, the OpenAI-compatible /v1 endpoints, and the AUTOMATIC1111-shaped txt2img shim SillyTavern needs.
  • Server — running it: how a synchronous mflux call is streamed out of an async server, environment variables (memory, model cache, LoRAs, CORS), binding to the network, authentication, and troubleshooting.
  • Models — the checkpoints it can run: what differs between them, the defaults and capability flags for each, memory, and gated weights.
  • Contributing — for developers: the weight-free test suite and CI, what it takes to add another mflux model, and how a release is cut.
  • Changelog — what changed in each version.

License

Apache 2.0.

Metadata

Release files for mfluxible 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mfluxible 0.9.3
File Size Uploaded Provenance Actions
mfluxible-0.9.3.tar.gz 244.7 kB With provenance Details for mfluxible-0.9.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mfluxible 0.9.3
File Interpreter ABI Platform Actions
mfluxible-0.9.3-py3-none-any.whl Python 3 none any Details for mfluxible-0.9.3-py3-none-any.whl

Total release size: 384.0 kB

Release files / mfluxible-0.9.3.tar.gz

Download URL mfluxible-0.9.3.tar.gz
Size 244.7 kB
Tags Source
SHA-256 checksum
How to use checksums
723b42f43e2044c4486a4314861d5d7e1a8341e7b4c5bbb6539de37352696185
BLAKE2b-256 checksum
How to use checksums
431cd34e53addd535e77880645a92bfa67301263835ac7ad8a76ec3bad26c60e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / mfluxible-0.9.3-py3-none-any.whl

Download URL mfluxible-0.9.3-py3-none-any.whl
Size 139.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ea655331a7f7522e76e0439f50bd779d8047c1a92bc7b814de4bc3c4d01e7e4
BLAKE2b-256 checksum
How to use checksums
0cee614e18139501c1d5a330db7577e3eb74e81b04c63e246b97bc2261adcb03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for mfluxible 0.9.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mfluxible-0.9.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page