facefusion/tests/test_execution.py
Henry Ruhs e42f91dadf
3.0.0 Gold (#787)
* Replace audio whenever set via source

* use scale_face_landmark_5() in age_modifier

* Fix wording and ordering of options

* Adjust wording for face editor

* Fix wording for processors

* Switch order of frame colorizer options

* That condition is actual not needed

* Simplify UI layout API by removing pre_render()

* Clean args and safe cast ini values (#775)

* Clean args and safe cast ini values

* Clean args and safe cast ini values

* Clean args and safe cast ini values

* Introduce paths group

* Fix job list command and change order

* Add job list testing todo

* Fix spacing in typing

* Fix benchmark by ignoring audio

* Simplify and avoid knowing the provider values (#782)

* Fix logger table with empty value

* Complete Typing

---------

Co-authored-by: harisreedhar <h4harisreedhar.s.s@gmail.com>
2024-10-02 11:08:05 +02:00

25 lines
649 B
Python

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_providers =\
[
('CUDAExecutionProvider',
{
'device_id': '1',
'cudnn_conv_algo_search': 'DEFAULT'
}),
'CPUExecutionProvider'
]
assert create_execution_providers('1', [ 'cpu', 'cuda' ]) == execution_providers