Download ml-stable-diffusion/mlx/tests/tests.cpp from Fahad-S/FastVLM_SANA: direct link, hf CLI and curl.
- Browser
- Download file 517 Bytes
-
https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/tests/tests.cpp
- Command line
-
hf download hf://Fahad-S/FastVLM_SANA/ml-stable-diffusion/mlx/tests/tests.cpp
-
curl -L -o tests.cpp https://huggingface.co/Fahad-S/FastVLM_SANA/resolve/main/ml-stable-diffusion/mlx/tests/tests.cpp
517 Bytes
| // Copyright © 2023 Apple Inc. | |
| using namespace mlx::core; | |
| int main(int argc, char** argv) { | |
| doctest::Context context; | |
| const char* device = std::getenv("DEVICE"); | |
| if (device != nullptr && std::string(device) == "cpu") { | |
| set_default_device(Device::cpu); | |
| } else if (metal::is_available()) { | |
| set_default_device(Device::gpu); | |
| } | |
| context.applyCommandLine(argc, argv); | |
| return context.run(); | |
| } | |