diff --git a/pyproject.toml b/pyproject.toml index 0752748..5d821c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "mlx-cv" -version = "0.0.3" +version = "0.0.4" description = "MLX-native computer vision for Apple Silicon: open-vocabulary grounding, object detection, depth and camera geometry, segmentation, and video object tracking." readme = "README.md" requires-python = ">=3.13" diff --git a/scripts/hugging_face/model_cards/appautomaton/locateanything-3b-bf16-mlx.md b/scripts/hugging_face/model_cards/appautomaton/locateanything-3b-bf16-mlx.md index f5f12fe..140ed41 100644 --- a/scripts/hugging_face/model_cards/appautomaton/locateanything-3b-bf16-mlx.md +++ b/scripts/hugging_face/model_cards/appautomaton/locateanything-3b-bf16-mlx.md @@ -19,7 +19,7 @@ tags: Final-layout BF16 weights for running [NVIDIA LocateAnything-3B](https://huggingface.co/nvidia/LocateAnything-3B) with [`mlx-cv`](https://github.com/appautomaton/mlx-cv) on Apple Silicon. BF16 is reduced precision, not integer quantization. ```bash -pip install "mlx-cv[mlx,hub]==0.0.3" +pip install "mlx-cv[mlx,hub]==0.0.4" ``` ```python diff --git a/scripts/hugging_face/model_cards/appautomaton/sam3.1-multiplex-bf16-mlx.md b/scripts/hugging_face/model_cards/appautomaton/sam3.1-multiplex-bf16-mlx.md index eddd7f4..0c5963b 100644 --- a/scripts/hugging_face/model_cards/appautomaton/sam3.1-multiplex-bf16-mlx.md +++ b/scripts/hugging_face/model_cards/appautomaton/sam3.1-multiplex-bf16-mlx.md @@ -19,7 +19,7 @@ tags: Final-layout BF16 detector and Object Multiplex tracker weights for running Meta SAM 3.1 with [`mlx-cv`](https://github.com/appautomaton/mlx-cv) on Apple Silicon. BF16 is reduced precision, not integer quantization. ```bash -pip install "mlx-cv[mlx,hub]==0.0.3" +pip install "mlx-cv[mlx,hub]==0.0.4" ``` ```python diff --git a/src/mlx_cv/__init__.py b/src/mlx_cv/__init__.py index 3fe38c2..def9c11 100644 --- a/src/mlx_cv/__init__.py +++ b/src/mlx_cv/__init__.py @@ -65,7 +65,7 @@ register_model_loader, ) -__version__ = "0.0.3" +__version__ = "0.0.4" __all__ = [ "__version__", diff --git a/tests/test_version.py b/tests/test_version.py index 27acd9c..3c1a647 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,8 +1,15 @@ +from importlib.metadata import version + import mlx_cv -def test_version(): - assert mlx_cv.__version__ == "0.0.3" +def test_version_matches_distribution_metadata(): + # The version is written twice: in pyproject.toml, which becomes the + # installed distribution metadata, and in __init__.py, which is what + # callers read. Asserting a hard-coded literal here only proved that + # someone had edited this file; comparing the two catches the release + # that bumps one and forgets the other. + assert mlx_cv.__version__ == version("mlx-cv") def test_public_surface(): diff --git a/tools/convert_locateanything_checkpoint.py b/tools/convert_locateanything_checkpoint.py index 14f777a..438ee5a 100644 --- a/tools/convert_locateanything_checkpoint.py +++ b/tools/convert_locateanything_checkpoint.py @@ -10,6 +10,7 @@ ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(ROOT / "src")) +from mlx_cv import __version__ as MLX_CV_VERSION from mlx_cv.hub import read_safetensors_header, rewrite_safetensors_metadata, sha256_file from mlx_cv.models.locateanything import LOCATEANYTHING_CHECKPOINT_METADATA @@ -19,7 +20,9 @@ def main() -> None: parser.add_argument("input", type=Path, help="Existing final-layout BF16 Safetensors") parser.add_argument("output", type=Path, help="Strict output Safetensors") parser.add_argument("--source", type=Path, required=True, help="Source checkpoint for provenance") - parser.add_argument("--converter-version", default="mlx-cv-0.0.3") + # Derived, not written out: this stamps provenance into the checkpoint, so a + # literal here silently mislabels every conversion run after a release bump. + parser.add_argument("--converter-version", default=f"mlx-cv-{MLX_CV_VERSION}") args = parser.parse_args() header = read_safetensors_header(args.input)