Download ml-stable-diffusion/mlx/python/src/mlx_func.h from Fahad-S/FastVLM_SANA: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/python/src/mlx_func.h
- Command line
-
hf download hf://Fahad-S/FastVLM_SANA/ml-stable-diffusion/mlx/python/src/mlx_func.h
-
curl -L -o mlx_func.h https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/python/src/mlx_func.h
759 Bytes
| // Copyright © 2025 Apple Inc. | |
| namespace nb = nanobind; | |
| using namespace nb::literals; | |
| nb::callable mlx_func( | |
| nb::object func, | |
| const nb::callable& orig_func, | |
| std::vector<PyObject*> deps); | |
| template <typename F, typename... Deps> | |
| nb::callable mlx_func(F func, const nb::callable& orig_func, Deps&&... deps) { | |
| return mlx_func( | |
| nb::cpp_function(std::move(func)), | |
| orig_func, | |
| std::vector<PyObject*>{deps.ptr()...}); | |
| } | |
| template <typename... Deps> | |
| nb::callable | |
| mlx_func(nb::object func, const nb::callable& orig_func, Deps&&... deps) { | |
| return mlx_func( | |
| std::move(func), orig_func, std::vector<PyObject*>{deps.ptr()...}); | |
| } | |