mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-09 20:08:39 +02:00
allow register_arguments to be nested, fix types, adjust processors
This commit is contained in:
@@ -11,17 +11,23 @@ from facefusion.apis.core import create_api
|
||||
@pytest.fixture(scope = 'module')
|
||||
def test_client() -> Iterator[TestClient]:
|
||||
program = ArgumentParser()
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--source-paths',
|
||||
nargs = '+'),
|
||||
args_store.register_arguments(
|
||||
[
|
||||
program.add_argument(
|
||||
'--source-paths',
|
||||
nargs = '+'
|
||||
)
|
||||
],
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--output-format',
|
||||
default = 'mp4',
|
||||
choices = [ 'mp4', 'mkv', 'webm' ]),
|
||||
args_store.register_arguments(
|
||||
[
|
||||
program.add_argument(
|
||||
'--output-format',
|
||||
default = 'mp4',
|
||||
choices = [ 'mp4', 'mkv', 'webm' ]
|
||||
)
|
||||
],
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
|
||||
|
||||
+20
-11
@@ -25,21 +25,30 @@ def before_all() -> None:
|
||||
@pytest.fixture(scope = 'module')
|
||||
def test_client() -> Iterator[TestClient]:
|
||||
program = ArgumentParser()
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--source-paths',
|
||||
nargs = '+'),
|
||||
args_store.register_arguments(
|
||||
[
|
||||
program.add_argument(
|
||||
'--source-paths',
|
||||
nargs = '+'
|
||||
)
|
||||
],
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--target-path'),
|
||||
args_store.register_arguments(
|
||||
[
|
||||
program.add_argument(
|
||||
'--target-path'
|
||||
)
|
||||
],
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
args_store.register_argument(
|
||||
program.add_argument(
|
||||
'--execution-providers',
|
||||
nargs = '+'),
|
||||
args_store.register_arguments(
|
||||
[
|
||||
program.add_argument(
|
||||
'--execution-providers',
|
||||
nargs = '+'
|
||||
)
|
||||
],
|
||||
scopes = [ 'api' ]
|
||||
)
|
||||
state_manager.init_item('execution_providers', [ 'cpu' ])
|
||||
|
||||
Reference in New Issue
Block a user