mirror of
https://github.com/facefusion/facefusion.git
synced 2026-11-12 05:19:57 +01:00
improve code coverage part3
This commit is contained in:
1 parent
490b98085a
commit
339cd2aab2
1 file changed
+24
@@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
|
||||
from facefusion import state_manager
|
||||
from facefusion.download import conditional_download, resolve_download_url
|
||||
from facefusion.filesystem import resolve_relative_path
|
||||
from facefusion.model_helper import get_static_model_initializer
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'module', autouse = True)
|
||||
def before_all() -> None:
|
||||
state_manager.init()
|
||||
state_manager.init_item('download_providers', [ 'github' ])
|
||||
|
||||
conditional_download(resolve_relative_path('../.assets/models'),
|
||||
[
|
||||
resolve_download_url('models-3.0.0', 'inswapper_128.hash'),
|
||||
resolve_download_url('models-3.0.0', 'inswapper_128.onnx')
|
||||
])
|
||||
|
||||
|
||||
def test_get_static_model_initializer() -> None:
|
||||
model_path = resolve_relative_path('../.assets/models/inswapper_128.onnx')
|
||||
|
||||
assert get_static_model_initializer(model_path).shape == (512, 512)
|
||||
Reference in new issue
Block a user