Spaces:
Build error
Build error
Download tests/test_execution.py from LULDev/facetest: direct link, hf CLI and curl.
- Browser
- Download file 673 Bytes
-
https://huggingface.co/spaces/LULDev/facetest/resolve/refs%2Fpr%2F1/tests/test_execution.py
- Command line
-
hf download hf://spaces/LULDev/facetest@refs/pr/1/tests/test_execution.py
-
curl -L -o test_execution.py https://huggingface.co/spaces/LULDev/facetest/resolve/refs%2Fpr%2F1/tests/test_execution.py
673 Bytes
| from facefusion.execution import create_execution_providers, get_execution_provider_choices, has_execution_provider | |
| def test_get_execution_provider_choices() -> None: | |
| assert 'cpu' in get_execution_provider_choices() | |
| def test_has_execution_provider() -> None: | |
| assert has_execution_provider('cpu') is True | |
| assert has_execution_provider('openvino') is False | |
| def test_multiple_execution_providers() -> None: | |
| execution_provider_with_options =\ | |
| [ | |
| ('CUDAExecutionProvider', | |
| { | |
| 'device_id': '1', | |
| 'cudnn_conv_algo_search': 'DEFAULT' | |
| }), | |
| 'CPUExecutionProvider' | |
| ] | |
| assert create_execution_providers('1', [ 'cpu', 'cuda' ]) == execution_provider_with_options | |