Spaces:
No application file
No application file
Download tests/test_execution.py from NSOUP/facefusion: direct link, hf CLI and curl.
- Browser
- Download file 696 Bytes
-
https://huggingface.co/spaces/NSOUP/facefusion/resolve/refs%2Fpr%2F1/tests/test_execution.py
- Command line
-
hf download hf://spaces/NSOUP/facefusion@refs/pr/1/tests/test_execution.py
-
curl -L -o test_execution.py https://huggingface.co/spaces/NSOUP/facefusion/resolve/refs%2Fpr%2F1/tests/test_execution.py
696 Bytes
| from facefusion.execution import encode_execution_providers, decode_execution_providers, apply_execution_provider_options | |
| def test_encode_execution_providers() -> None: | |
| assert encode_execution_providers([ 'CPUExecutionProvider' ]) == [ 'cpu' ] | |
| def test_decode_execution_providers() -> None: | |
| assert decode_execution_providers([ 'cpu' ]) == [ 'CPUExecutionProvider' ] | |
| def test_multiple_execution_providers() -> None: | |
| execution_provider_with_options =\ | |
| [ | |
| 'CPUExecutionProvider', | |
| ('CUDAExecutionProvider', | |
| { | |
| 'cudnn_conv_algo_search': 'DEFAULT' | |
| }) | |
| ] | |
| assert apply_execution_provider_options([ 'CPUExecutionProvider', 'CUDAExecutionProvider' ]) == execution_provider_with_options | |