MedMLX
Model setup for applications
Install the setup extra to use medmlx setup MODEL --progress. It reuses
explicitly supplied model directories, the MedMLX asset cache, or the Hub cache,
then downloads missing native files and retains publisher notices. It returns
the runner arguments for the application to remember. Downloads can be resumed
by running setup again; --plan only describes the operation.
medmlx.list_setup_plans(), setup_plan(model_id), and
setup_model(model_id, existing_paths=..., progress=...) expose the same actions
to Python clients. The default asset cache search is ~/.cache/medmlx (override
with MEDMLX_ASSET_CACHE); downloads use the normal Hugging Face cache. Setup
supports published VISTA3D CT, Reason-CT, FleXray flagship, and named BraTS bundles,
plus the radiomics runtime. Other checkpoints require their provider's setup.
Runtime installation uses this release's family pins. Frozen applications must
already bundle the runtime; setup can still download their model files. An
already installed runtime is detected by package metadata and is not checked
against the family pin or imported by that check.
Setup checks required files and available provider admission contracts. Model
execution retains responsibility for tensor compatibility and input validation.
One Python API, command line and MCP server for native medical imaging on Apple Silicon. Run TotalSegmentator, nnU-Net, MedSAM2, SynthSeg and more through their independent MLX runtimes.
Apple Silicon · Metal · Python 3.13 · uv
Install
Install all model families with MCP and model setup support:
uv venv --python 3.13
source .venv/bin/activate
uv pip install "medmlx[all,mcp,setup]"
medmlx models
Choose segment, generate or vision instead of all for a smaller install.
The segment extra includes SAM3 image/video support; generate includes NV-Reason-CT
and the weight-free FDG PET adapter. Model weights have their own download and access
requirements. Provisional medgemma and lingshu adapters use an explicitly selected
separate MedVLM environment; real-checkpoint inference through these bridges is
unqualified. The MedVLM runtime is not bundled because its MLX and Transformers
requirements conflict with the unified environment. See the
bridge setup and limits and
dependency compatibility notes.
Run a model
medmlx describe totalsegmentator
medmlx readiness totalsegmentator --arguments arguments.json --root /path/to/work
medmlx checkpoints --model-id nnunet
medmlx run totalsegmentator --arguments arguments.json --root /path/to/work
describe includes the provider's full instructions and argument descriptions,
including documented units and ranges. Descriptions reproduce provider documentation;
they do not establish validated constraints or numerical qualification. Relative
paths resolve against --root.
Readiness preserves ready as a boolean for imports/provider checks and Metal;
runtime_ready makes that same limited meaning explicit. Neither validates run
inputs or weights. The separate run_ready is false for a known blocker and
null while input/checkpoint contents remain unverified; this check never returns
run_ready=true. Passing arguments checks names, required arguments and local
input/weight path existence, without running inference or creating outputs.
checkpoints lists five source references, including catalog-only liver and AutoPET
entries for the general nnU-Net provider. It neither stages assets nor qualifies a
checkpoint. The same action is available as list_checkpoints in Python and MCP.
import json
from pathlib import Path
import medmlx
arguments = json.loads(Path("arguments.json").read_text())
result = medmlx.run("totalsegmentator", arguments=arguments, root="/path/to/work")
For an MCP client, use medmlx serve --root /path/to/work as its stdio command.
Jobs belong to that server session; disconnecting cancels workers and their child
processes. Client registration and persistent filesystem access are configured by
that client, not changed by this package. Some providers fetch default assets when
paths are omitted; supply explicit local checkpoints for offline execution.
See the MCP guide for client setup, tools, and a complete job workflow.
For checkpoint conversion and development, see conversion and core.
License
Apache-2.0. See third-party notices. Runtimes and model weights retain their own terms.
For research and education. Outputs require human review.
Metadata
Release files for medmlx 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medmlx-0.3.2.tar.gz | 45.4 kB | Without provenance | Details for medmlx-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medmlx-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for medmlx-0.3.2-py3-none-any.whl |
Total release size: 100.2 kB
Release files / medmlx-0.3.2.tar.gz
| Download URL | medmlx-0.3.2.tar.gz |
|---|---|
| Size | 45.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ea817525550df2bdf57c014b170743484d41b4f4c2fc390d0a25cb2e5b8b34e
|
|
BLAKE2b-256 checksum How to use checksums |
ed49a6aafb60d6a4f7663999134f155209162f27b3dd1af1f85f29011d421c07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / medmlx-0.3.2-py3-none-any.whl
| Download URL | medmlx-0.3.2-py3-none-any.whl |
|---|---|
| Size | 54.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da500288180f4411ec72291c96c15bf1ad39204193caaca8c105e47b14207b94
|
|
BLAKE2b-256 checksum How to use checksums |
5b73c35377845be74a167d4d652b9975e5abc06b68ab720104b642a6021eb596
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for medmlx 0.3.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.