Spaces:
Build error
Build error
File size: 673 Bytes
a1da63c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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
|