Repository navigation
Releases
medmlx 0.9.0
Breaking changes
segresnet-brats is removed, and medmlx requires segresnet-mlx 0.4. Use nnunet-brats2021 for BraTS brain tumor segmentation. segresnet-renal-cect is unchanged.
medmlx 0.8.0
Breaking changes
MedGemma answers can run to 2000 new tokens by default, up from 256. The medgemma default for max_new_tokens now follows Google's MedGemma 1.5 model card, which uses 2000 in its examples, and matches mc-medgemma 0.2.0 on CUDA. Answers that ended on their own before 256 tokens are unchanged; longer answers continue instead of stopping at 256. Pass max_new_tokens=256 to keep the old limit.
medmlx 0.7.0
Breaking changes
Requires mlx-reason-ct 0.6. Reports generated without a prompt change, because the request now uses the NV-Reason-CT model card's wording ("Write a structured abdominal CT report." instead of "write a structured abdomen CT report"). Reason-CT runs in bfloat16_fast by default and the float32 and bfloat16_fp32 profiles are removed; the CT agent now uses that default instead of float32.
Requires sam3-mlx 0.3. sam3 results can change slightly: float images in [0, 1] are converted to 8-bit as upstream SAM 3 does, and attention arithmetic changed at FP32 rounding level. A sam3 run in a process started with MLX_ENABLE_TF32=1 now stops with an error unless it asks for precision=tf32.
New
sam3 takes precision: fp32 (default), tf32 or bf16. On an M5 Max, one image with one text prompt took 0.48-0.53 of the FP32 time with tf32 (M5 or later) and 0.74-0.76 with bf16, with the same detections as upstream on sam3-mlx's medical test images. Its declared peak is now 5.4 GB instead of 12 GB.
medmlx run sam3 --arg image_path=scan.png text_prompt=liver output_dir=out precision=tf32Fixes
reason-ct-tools prompts match NV-Reason-CT's processor token for token. mlx-reason-ct 0.4.x sorted tool schema keys and escaped <, >, & and ', which could change the model's answer.
Readiness names medmlx setup when a model's weights are not cached. It used to name only the prepare_model MCP tool.
Faster
Reason-CT reports take less time and memory. On an M5 Max with a LUNA16 chest CT, a full report takes 12.4 s instead of 17.9 s, and readiness declares a 12.5 GB peak instead of 14.5 GB.
medmlx 0.5.0
Breaking changes
Memory no longer refuses a run. Readiness still reports a model's peak, the available memory and fits, and adds a reason when the model does not fit, but run and start go ahead either way. The insufficient_memory error code is gone.
Requires nnunet-mlx 0.8, totalsegmentator-mlx 0.2 and mlx-generate-ctmr 0.6. nnU-Net and TotalSegmentator labels can change at voxels where two classes nearly tie, because restoration now rounds as nnU-Net 2.8.1 does. mlx-generate-ctmr-mr now rejects T2 and FLAIR; use mlx-generate-ctmr-mr-brain for those contrasts.
New
medmlx run and medmlx readiness take a model's arguments on the command line. --arg accepts the names medmlx describe lists, converts each value to its declared type, and takes lists and objects as KEY:=JSON. --arguments FILE still works, and --arg overrides its keys.
medmlx run mlx-segment-ct --arg image_path=ct.nii.gz output_dir=segment-ctmedmlx.start_cohort runs up to 256 cases through one loaded model. Each case reports its own result or error, and the model is closed when the cohort finishes or is cancelled. nnunet-liver supports it.
Successful runs report memory_metrics. They give the worker's peak RSS and MLX active, peak and cache counters in bytes; measured_peak_memory_gb keeps its MLX-only meaning.
Fixes
Output summaries compute label volumes from the image affine and honor declared spatial units. Volumes were the product of header voxel sizes, assuming millimetres, which overstated them for sheared affines and was wrong for files in metres or microns.
memory_status no longer drops a live run while its record is being written.
Lower memory
Generation peaks at 10.3 GiB for CT from a mask and 9.5 GiB for MR-Brain, through mlx-generate-ctmr 0.6.0, measured at 256³ CT and the default MR-Brain grid on an M5 Max with MLX 0.32.4. Readiness now declares 11.1 GB and 10.2 GB for these models, down from 30 GB and 26 GB.
medmlx 0.4.8
Fixes installation of the all and vision extras, which selected the obsolete MLXRadiomics development release in 0.4.7. These extras now install mlxradiomics 1.0.0 or a compatible 1.0.x update.
medmlx 0.4.7
Breaking changes
medsam2 propagation stops after 8 consecutive empty slices in each direction, with medsam2-mlx 0.3.0. Pass "stop_after_empty": null in the run arguments to track through the whole volume as before.
Fixes
MedGemma runs from the documented 4-bit MedGemma 1.5 4B and MedGemma 4B checkpoints. Their folders hold one model.safetensors beside an index naming two shards, so 0.4.6 refused them with "Missing checkpoint shard". The bridge now refuses only a folder where some indexed shards are present and others are missing.
mlx-reason-ct is no longer refused on Macs with about 15 to 23 GB of free memory, with mlx-reason-ct 0.4.1. It declared a stale 22.7 GB peak; a chest or abdominal CT report peaks at 14.4 GB.
New
Most models now declare their peak memory, so medmlx refuses a run that would not fit before it starts. The README lists every model's peak. The runtime releases also add memory reductions, faster BioMedParse and MedSAM2 runs, and safer output writing; see each runtime's release notes.
medmlx 0.4.6
New
Runtime updates now reach medmlx users without a new medmlx release. Each extra accepts later releases of a runtime up to its next minor version, such as nnunet-mlx>=0.7.0,<0.8, instead of one exact version, and medmlx accepts medmlx-core>=0.2.6,<0.3. Run uv tool upgrade medmlx to pick up new runtime releases; pin exact versions in your own lockfile to hold a set fixed.
Faster
Reason-CT is faster and uses less memory with mlx-reason-ct 0.4.0. A float32 chest report takes about 0.6x the time on an M5 Max with identical text, and one-shot reports no longer balloon process memory. The new precision="bfloat16_fast" is faster still, but its text can differ from float32.
medmlx 0.4.5
Updates the nnU-Net and TotalSegmentator models to nnunet-mlx 0.7.0 and totalsegmentator-mlx 0.1.7.
Breaking changes
nnU-Net runs return the label map as mask. nnunet-liver and nnunet-autopet returned it as segmentation; the other nnU-Net models already used mask.
nnunet-brats2021 averages all five released folds by default. Pass fold=0 for the old result. Downloads from before November 2 hold only fold 0, so refresh them first:
medmlx setup nnunet-brats2021 --refresh
medmlx setup nnunet-autopet --refresh # AutoPET's folds 1-4Fixes
TotalSegmentator no longer writes probability outputs through an existing symlink. Outputs are staged privately and renamed into place, and a dangling symlink at an output path counts as an existing file.
Faster
Native 3-D nnU-Net inference is faster. A full liver CT (AMOS22, M5 Max) takes 466 s instead of 634 s, with identical labels.
medmlx 0.4.4
Fixes MedGemma's first run, which failed in 0.4.2 and 0.4.3 because they tried to install med-vlm-mlx 0.2.3, a version that isn't on PyPI. MedGemma now uses med-vlm-mlx 0.3.3, which also adds security fixes to its HTTP server.
medmlx 0.4.3
Maintenance release from 0.4.2.
- Pins
lesiondiffusion-mlx0.2.7. On its reference 160×160×128 crop, peak MLX memory falls from 14.49 GB to 3.46 GB in source mode and from 5.14 GB to 3.29 GB in conditioned mode, with bitwise-identical outputs. Its declaredpeak_memory_gbfalls from 18.74 to 3.46, so the memory guard admits it on Macs with less free memory. - Otherwise identical to 0.4.2, and still requires
medmlx-core0.2.6.