Instructions to use devin-lai/Hi3Dv1.0-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use devin-lai/Hi3Dv1.0-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download devin-lai/Hi3Dv1.0-mlx --local-dir Hi3Dv1.0-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download tests/test_empty_geometry.py from devin-lai/Hi3Dv1.0-mlx: direct link, hf CLI and curl.
- Browser
- Download file 963 Bytes
-
https://huggingface.co/devin-lai/Hi3Dv1.0-mlx/resolve/main/tests/test_empty_geometry.py
- Command line
-
hf download hf://devin-lai/Hi3Dv1.0-mlx/tests/test_empty_geometry.py
-
curl -L -o test_empty_geometry.py https://huggingface.co/devin-lai/Hi3Dv1.0-mlx/resolve/main/tests/test_empty_geometry.py
963 Bytes
| import numpy as np | |
| import pytest | |
| import torch | |
| from hi3d_mac.fast_unique import unique_keys | |
| from hi3d_mac.lean_extract import construct_voxel_grid | |
| def test_unique_empty_keys_matches_numpy(counts): | |
| keys = np.empty(0, dtype=np.int64) | |
| values, inverse, observed_counts = unique_keys(keys, return_counts=counts) | |
| reference = np.unique(keys, return_inverse=True, return_counts=counts) | |
| np.testing.assert_array_equal(values, reference[0]) | |
| np.testing.assert_array_equal(inverse, reference[1]) | |
| if counts: | |
| np.testing.assert_array_equal(observed_counts, reference[2]) | |
| else: | |
| assert observed_counts is None | |
| def test_empty_voxel_grid_preserves_shapes_and_dtypes(): | |
| vertices, cubes = construct_voxel_grid(torch.empty((0, 3), dtype=torch.int32)) | |
| assert vertices.shape == (0, 3) and vertices.dtype == torch.int32 | |
| assert cubes.shape == (0, 8) and cubes.dtype == torch.int64 | |