
* Introduce download providers * update processors download method * add ui * Fix CI * Adjust UI component order, Use download resolver for benchmark * Remove is_download_done() * Introduce download provider set, Remove choices method from execution, cast all dict keys() via list() * Fix spacing --------- Co-authored-by: harisreedhar <h4harisreedhar.s.s@gmail.com>
24 lines
604 B
Python
24 lines
604 B
Python
from facefusion.execution import create_execution_providers, get_execution_provider_set, has_execution_provider
|
|
|
|
|
|
def test_get_execution_provider_set() -> None:
|
|
assert 'cpu' in get_execution_provider_set().keys()
|
|
|
|
|
|
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_providers =\
|
|
[
|
|
('CUDAExecutionProvider',
|
|
{
|
|
'device_id': '1'
|
|
}),
|
|
'CPUExecutionProvider'
|
|
]
|
|
|
|
assert create_execution_providers('1', [ 'cpu', 'cuda' ]) == execution_providers
|