mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-25 00:40:49 +02:00
Feat/capability groups part2 (#1216)
* add groups to capabilities * update to recent groups
This commit is contained in:
@@ -15,6 +15,6 @@ async def get_capabilities(request : Request) -> JSONResponse:
|
|||||||
'image': facefusion.choices.image_formats,
|
'image': facefusion.choices.image_formats,
|
||||||
'video': facefusion.choices.video_formats
|
'video': facefusion.choices.video_formats
|
||||||
},
|
},
|
||||||
'arguments': capability_store.get_api_capability_set()
|
'arguments': capability_store.get_api_capability_group()
|
||||||
}
|
}
|
||||||
return JSONResponse(capabilities, status_code = HTTP_200_OK)
|
return JSONResponse(capabilities, status_code = HTTP_200_OK)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from argparse import Action
|
from argparse import Action
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
|
|
||||||
from facefusion.types import CapabilitySet, CapabilityStore, Scope
|
from facefusion.types import CapabilityGroup, CapabilitySet, CapabilityStore, Group, Scope
|
||||||
|
|
||||||
CAPABILITY_STORE : CapabilityStore =\
|
CAPABILITY_STORE : CapabilityStore =\
|
||||||
{
|
{
|
||||||
@@ -11,6 +11,16 @@ CAPABILITY_STORE : CapabilityStore =\
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def get_api_capability_group() -> CapabilityGroup:
|
||||||
|
capability_group : CapabilityGroup = {}
|
||||||
|
|
||||||
|
for name, value in CAPABILITY_STORE.get('api').items():
|
||||||
|
for group in value.get('groups'):
|
||||||
|
capability_group.setdefault(group, {})[name] = value
|
||||||
|
|
||||||
|
return capability_group
|
||||||
|
|
||||||
|
|
||||||
def get_api_capability_set() -> Dict[str, CapabilitySet]:
|
def get_api_capability_set() -> Dict[str, CapabilitySet]:
|
||||||
return CAPABILITY_STORE.get('api')
|
return CAPABILITY_STORE.get('api')
|
||||||
|
|
||||||
@@ -35,11 +45,12 @@ def get_sys_arguments() -> List[str]:
|
|||||||
return list(get_sys_capability_set().keys())
|
return list(get_sys_capability_set().keys())
|
||||||
|
|
||||||
|
|
||||||
def register_capability_set(actions : List[Action], scopes : List[Scope]) -> None:
|
def register_capability_set(actions : List[Action], scopes : List[Scope], groups : List[Group]) -> None:
|
||||||
for action in actions:
|
for action in actions:
|
||||||
value : CapabilitySet =\
|
value : CapabilitySet =\
|
||||||
{
|
{
|
||||||
'default': action.default
|
'default': action.default,
|
||||||
|
'groups': groups
|
||||||
}
|
}
|
||||||
|
|
||||||
if action.choices:
|
if action.choices:
|
||||||
|
|||||||
@@ -142,7 +142,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_int_metavar(age_modifier_choices.age_modifier_direction_range)
|
metavar = create_int_metavar(age_modifier_choices.age_modifier_direction_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'age_modifier' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -519,7 +519,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'background_remover' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -294,7 +294,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_int_metavar(deep_swapper_choices.deep_swapper_morph_range)
|
metavar = create_int_metavar(deep_swapper_choices.deep_swapper_morph_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'deep_swapper' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = 'EXPRESSION_RESTORER_AREAS'
|
metavar = 'EXPRESSION_RESTORER_AREAS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'expression_restorer' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = 'FACE_DEBUGGER_ITEMS'
|
metavar = 'FACE_DEBUGGER_ITEMS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_debugger' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -251,7 +251,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_float_metavar(face_editor_choices.face_editor_head_roll_range)
|
metavar = create_float_metavar(face_editor_choices.face_editor_head_roll_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_editor' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -319,7 +319,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_float_metavar(face_enhancer_choices.face_enhancer_weight_range)
|
metavar = create_float_metavar(face_enhancer_choices.face_enhancer_weight_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_enhancer' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -536,7 +536,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
choices = face_swapper_choices.face_swapper_models
|
choices = face_swapper_choices.face_swapper_models
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_swapper' ]
|
||||||
)
|
)
|
||||||
known_args, _ = program.parse_known_args()
|
known_args, _ = program.parse_known_args()
|
||||||
face_swapper_pixel_boost_choices = face_swapper_choices.face_swapper_set.get(known_args.face_swapper_model)
|
face_swapper_pixel_boost_choices = face_swapper_choices.face_swapper_set.get(known_args.face_swapper_model)
|
||||||
@@ -556,7 +557,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
choices = face_swapper_choices.face_swapper_weight_range
|
choices = face_swapper_choices.face_swapper_weight_range
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_swapper' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_int_metavar(frame_colorizer_choices.frame_colorizer_blend_range)
|
metavar = create_int_metavar(frame_colorizer_choices.frame_colorizer_blend_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_colorizer' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -598,7 +598,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_int_metavar(frame_enhancer_choices.frame_enhancer_blend_range)
|
metavar = create_int_metavar(frame_enhancer_choices.frame_enhancer_blend_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_enhancer' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,8 @@ def register_args(program : ArgumentParser) -> None:
|
|||||||
metavar = create_float_metavar(lip_syncer_choices.lip_syncer_weight_range)
|
metavar = create_float_metavar(lip_syncer_choices.lip_syncer_weight_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'lip_syncer' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+124
-62
@@ -32,7 +32,8 @@ def create_config_path_program() -> ArgumentParser:
|
|||||||
default = 'facefusion.ini'
|
default = 'facefusion.ini'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
apply_config_path(program)
|
apply_config_path(program)
|
||||||
@@ -52,7 +53,8 @@ def create_workflow_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.workflow_modes
|
choices = facefusion.choices.workflow_modes
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'workflow' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -63,7 +65,8 @@ def create_workflow_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.workflow_strategies
|
choices = facefusion.choices.workflow_strategies
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'workflow' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -81,7 +84,8 @@ def create_temp_path_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('paths', 'temp_path', tempfile.gettempdir())
|
default = config.get_str_value('paths', 'temp_path', tempfile.gettempdir())
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -99,7 +103,8 @@ def create_jobs_path_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('paths', 'jobs_path', '.jobs')
|
default = config.get_str_value('paths', 'jobs_path', '.jobs')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -118,7 +123,8 @@ def create_source_paths_program() -> ArgumentParser:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -136,7 +142,8 @@ def create_target_path_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('paths', 'target_path')
|
default = config.get_str_value('paths', 'target_path')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -154,7 +161,8 @@ def create_output_path_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('paths', 'output_path')
|
default = config.get_str_value('paths', 'output_path')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -172,7 +180,8 @@ def create_source_pattern_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('patterns', 'source_pattern')
|
default = config.get_str_value('patterns', 'source_pattern')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'patterns' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -190,7 +199,8 @@ def create_target_pattern_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('patterns', 'target_pattern')
|
default = config.get_str_value('patterns', 'target_pattern')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'patterns' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -208,7 +218,8 @@ def create_output_pattern_program() -> ArgumentParser:
|
|||||||
default = config.get_str_value('patterns', 'output_pattern')
|
default = config.get_str_value('patterns', 'output_pattern')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'patterns' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -227,7 +238,8 @@ def create_face_detector_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_detector_models
|
choices = facefusion.choices.face_detector_models
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_detector' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
known_args, _ = program.parse_known_args()
|
known_args, _ = program.parse_known_args()
|
||||||
@@ -242,7 +254,8 @@ def create_face_detector_program() -> ArgumentParser:
|
|||||||
choices = face_detector_size_choices
|
choices = face_detector_size_choices
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_detector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -254,7 +267,8 @@ def create_face_detector_program() -> ArgumentParser:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_detector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -268,7 +282,8 @@ def create_face_detector_program() -> ArgumentParser:
|
|||||||
metavar = 'FACE_DETECTOR_ANGLES'
|
metavar = 'FACE_DETECTOR_ANGLES'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_detector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -281,7 +296,8 @@ def create_face_detector_program() -> ArgumentParser:
|
|||||||
metavar = create_float_metavar(facefusion.choices.face_detector_score_range)
|
metavar = create_float_metavar(facefusion.choices.face_detector_score_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_detector' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -300,7 +316,8 @@ def create_face_aligner_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_aligner_models
|
choices = facefusion.choices.face_aligner_models
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_aligner' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -313,7 +330,8 @@ def create_face_aligner_program() -> ArgumentParser:
|
|||||||
metavar = create_float_metavar(facefusion.choices.face_aligner_score_range)
|
metavar = create_float_metavar(facefusion.choices.face_aligner_score_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_aligner' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -332,7 +350,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_selector_modes
|
choices = facefusion.choices.face_selector_modes
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -343,7 +362,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_selector_orders
|
choices = facefusion.choices.face_selector_orders
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -356,7 +376,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.face_selector_age_range)
|
metavar = create_int_metavar(facefusion.choices.face_selector_age_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -369,7 +390,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.face_selector_age_range)
|
metavar = create_int_metavar(facefusion.choices.face_selector_age_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -380,7 +402,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_selector_genders
|
choices = facefusion.choices.face_selector_genders
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -391,7 +414,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_selector_races
|
choices = facefusion.choices.face_selector_races
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -402,7 +426,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
default = config.get_int_value('face_selector', 'reference_face_position', '0')
|
default = config.get_int_value('face_selector', 'reference_face_position', '0')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -415,7 +440,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
metavar = create_float_metavar(facefusion.choices.reference_face_distance_range)
|
metavar = create_float_metavar(facefusion.choices.reference_face_distance_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -426,7 +452,8 @@ def create_face_selector_program() -> ArgumentParser:
|
|||||||
default = config.get_int_value('face_selector', 'reference_frame_number', '0')
|
default = config.get_int_value('face_selector', 'reference_frame_number', '0')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_selector' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -447,7 +474,8 @@ def create_face_tracker_program() -> ArgumentParser:
|
|||||||
metavar = create_float_metavar(facefusion.choices.face_tracker_score_range)
|
metavar = create_float_metavar(facefusion.choices.face_tracker_score_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_tracker' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -466,7 +494,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_occluder_models
|
choices = facefusion.choices.face_occluder_models
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -477,7 +506,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.face_parser_models
|
choices = facefusion.choices.face_parser_models
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -490,7 +520,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
metavar = 'FACE_MASK_TYPES'
|
metavar = 'FACE_MASK_TYPES'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -503,7 +534,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
metavar = 'FACE_MASK_AREAS'
|
metavar = 'FACE_MASK_AREAS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -516,7 +548,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
metavar = 'FACE_MASK_REGIONS'
|
metavar = 'FACE_MASK_REGIONS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -529,7 +562,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
metavar = create_float_metavar(facefusion.choices.face_mask_blur_range)
|
metavar = create_float_metavar(facefusion.choices.face_mask_blur_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -541,7 +575,8 @@ def create_face_masker_program() -> ArgumentParser:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'face_masker' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -560,7 +595,8 @@ def create_voice_extractor_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.voice_extractor_models
|
choices = facefusion.choices.voice_extractor_models
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'voice_extractor' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -579,7 +615,8 @@ def create_frame_extraction_program() -> ArgumentParser:
|
|||||||
default = facefusion.config.get_int_value('frame_extraction', 'trim_frame_start')
|
default = facefusion.config.get_int_value('frame_extraction', 'trim_frame_start')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_extraction' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -590,7 +627,8 @@ def create_frame_extraction_program() -> ArgumentParser:
|
|||||||
default = facefusion.config.get_int_value('frame_extraction', 'trim_frame_end')
|
default = facefusion.config.get_int_value('frame_extraction', 'trim_frame_end')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_extraction' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -601,7 +639,8 @@ def create_frame_extraction_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.temp_frame_formats
|
choices = facefusion.choices.temp_frame_formats
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_extraction' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -612,7 +651,8 @@ def create_frame_extraction_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.temp_pixel_formats
|
choices = facefusion.choices.temp_pixel_formats
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_extraction' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -633,7 +673,8 @@ def create_frame_distribution_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.target_frame_amount_range)
|
metavar = create_int_metavar(facefusion.choices.target_frame_amount_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'frame_distribution' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -655,7 +696,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.output_image_quality_range)
|
metavar = create_int_metavar(facefusion.choices.output_image_quality_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -667,7 +709,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.output_image_scale_range
|
choices = facefusion.choices.output_image_scale_range
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -678,7 +721,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
choices = available_encoder_set.get('audio')
|
choices = available_encoder_set.get('audio')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -691,7 +735,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.output_audio_quality_range)
|
metavar = create_int_metavar(facefusion.choices.output_audio_quality_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -704,7 +749,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.output_audio_volume_range)
|
metavar = create_int_metavar(facefusion.choices.output_audio_volume_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -715,7 +761,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
choices = available_encoder_set.get('video')
|
choices = available_encoder_set.get('video')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -726,7 +773,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.video_presets
|
choices = facefusion.choices.video_presets
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -739,7 +787,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.output_video_quality_range)
|
metavar = create_int_metavar(facefusion.choices.output_video_quality_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -751,7 +800,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.output_video_scale_range
|
choices = facefusion.choices.output_video_scale_range
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -762,7 +812,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
default = config.get_float_value('output_creation', 'output_video_fps')
|
default = config.get_float_value('output_creation', 'output_video_fps')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -773,7 +824,8 @@ def create_output_creation_program() -> ArgumentParser:
|
|||||||
default = config.get_float_value('output_creation', 'output_audio_fps', '25.0')
|
default = config.get_float_value('output_creation', 'output_audio_fps', '25.0')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'output_creation' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -794,7 +846,8 @@ def create_processors_program() -> ArgumentParser:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api', 'cli' ]
|
scopes = [ 'api', 'cli' ],
|
||||||
|
groups = [ 'processors' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
for processor_module in get_processors_modules(available_processors):
|
for processor_module in get_processors_modules(available_processors):
|
||||||
@@ -818,7 +871,8 @@ def create_download_providers_program() -> ArgumentParser:
|
|||||||
metavar = 'DOWNLOAD_PROVIDERS'
|
metavar = 'DOWNLOAD_PROVIDERS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli', 'sys' ]
|
scopes = [ 'cli', 'sys' ],
|
||||||
|
groups = [ 'download' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -837,7 +891,8 @@ def create_download_scope_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.download_scopes
|
choices = facefusion.choices.download_scopes
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli', 'sys' ]
|
scopes = [ 'cli', 'sys' ],
|
||||||
|
groups = [ 'download' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -895,7 +950,8 @@ def create_api_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.api_security_strategies
|
choices = facefusion.choices.api_security_strategies
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api' ]
|
scopes = [ 'api' ],
|
||||||
|
groups = [ 'api' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -917,7 +973,8 @@ def create_execution_program() -> ArgumentParser:
|
|||||||
metavar = 'EXECUTION_DEVICE_IDS'
|
metavar = 'EXECUTION_DEVICE_IDS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli', 'sys' ]
|
scopes = [ 'cli', 'sys' ],
|
||||||
|
groups = [ 'execution' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -930,7 +987,8 @@ def create_execution_program() -> ArgumentParser:
|
|||||||
metavar = 'EXECUTION_PROVIDERS'
|
metavar = 'EXECUTION_PROVIDERS'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli', 'sys' ]
|
scopes = [ 'cli', 'sys' ],
|
||||||
|
groups = [ 'execution' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -943,7 +1001,8 @@ def create_execution_program() -> ArgumentParser:
|
|||||||
metavar = create_int_metavar(facefusion.choices.execution_thread_count_range)
|
metavar = create_int_metavar(facefusion.choices.execution_thread_count_range)
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli', 'sys' ]
|
scopes = [ 'cli', 'sys' ],
|
||||||
|
groups = [ 'execution' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -962,7 +1021,8 @@ def create_memory_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.video_memory_strategies
|
choices = facefusion.choices.video_memory_strategies
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli', 'sys' ]
|
scopes = [ 'cli', 'sys' ],
|
||||||
|
groups = [ 'memory' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -981,7 +1041,8 @@ def create_log_level_program() -> ArgumentParser:
|
|||||||
choices = facefusion.choices.log_levels
|
choices = facefusion.choices.log_levels
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'misc' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
@@ -1000,7 +1061,8 @@ def create_halt_on_error_program() -> ArgumentParser:
|
|||||||
default = config.get_bool_value('misc', 'halt_on_error')
|
default = config.get_bool_value('misc', 'halt_on_error')
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'cli' ]
|
scopes = [ 'cli' ],
|
||||||
|
groups = [ 'misc' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
return program
|
return program
|
||||||
|
|||||||
+4
-1
@@ -133,11 +133,13 @@ Args : TypeAlias = Dict[str, Any]
|
|||||||
|
|
||||||
Choice : TypeAlias = Union[int | str]
|
Choice : TypeAlias = Union[int | str]
|
||||||
Scope : TypeAlias = Literal['api', 'cli', 'sys']
|
Scope : TypeAlias = Literal['api', 'cli', 'sys']
|
||||||
|
Group : TypeAlias = str
|
||||||
|
|
||||||
CapabilitySet = TypedDict('CapabilitySet',
|
CapabilitySet = TypedDict('CapabilitySet',
|
||||||
{
|
{
|
||||||
'default' : Any,
|
'default' : Any,
|
||||||
'choices' : NotRequired[List[Choice]]
|
'choices' : NotRequired[List[Choice]],
|
||||||
|
'groups' : NotRequired[List[Group]]
|
||||||
})
|
})
|
||||||
CapabilityStore = TypedDict('CapabilityStore',
|
CapabilityStore = TypedDict('CapabilityStore',
|
||||||
{
|
{
|
||||||
@@ -145,6 +147,7 @@ CapabilityStore = TypedDict('CapabilityStore',
|
|||||||
'cli' : Dict[str, CapabilitySet],
|
'cli' : Dict[str, CapabilitySet],
|
||||||
'sys' : Dict[str, CapabilitySet]
|
'sys' : Dict[str, CapabilitySet]
|
||||||
})
|
})
|
||||||
|
CapabilityGroup : TypeAlias = Dict[Group, Dict[str, CapabilitySet]]
|
||||||
|
|
||||||
ProcessState = Literal['checking', 'processing', 'stopping', 'pending']
|
ProcessState = Literal['checking', 'processing', 'stopping', 'pending']
|
||||||
UpdateProgress : TypeAlias = Callable[[int], None]
|
UpdateProgress : TypeAlias = Callable[[int], None]
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ def before_all() -> None:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api' ]
|
scopes = [ 'api' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -28,7 +29,8 @@ def before_all() -> None:
|
|||||||
choices = [ 'mp4', 'mkv', 'webm' ]
|
choices = [ 'mp4', 'mkv', 'webm' ]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api' ]
|
scopes = [ 'api' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -55,5 +57,5 @@ def test_get_capabilities(test_client : TestClient) -> None:
|
|||||||
|
|
||||||
assert 'mp4' in capabilities_body.get('formats').get('video')
|
assert 'mp4' in capabilities_body.get('formats').get('video')
|
||||||
|
|
||||||
assert capabilities_body.get('arguments').get('source_paths').get('default') is None
|
assert capabilities_body.get('arguments').get('paths').get('source_paths').get('default') is None
|
||||||
assert capabilities_body.get('arguments').get('output_format').get('choices') == [ 'mp4', 'mkv', 'webm' ]
|
assert capabilities_body.get('arguments').get('paths').get('output_format').get('choices') == [ 'mp4', 'mkv', 'webm' ]
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ def before_all() -> None:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api' ]
|
scopes = [ 'api' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -30,7 +31,8 @@ def before_all() -> None:
|
|||||||
'--target-path'
|
'--target-path'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api' ]
|
scopes = [ 'api' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
capability_store.register_capability_set(
|
capability_store.register_capability_set(
|
||||||
[
|
[
|
||||||
@@ -39,7 +41,8 @@ def before_all() -> None:
|
|||||||
nargs = '+'
|
nargs = '+'
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
scopes = [ 'api' ]
|
scopes = [ 'api' ],
|
||||||
|
groups = [ 'paths' ]
|
||||||
)
|
)
|
||||||
|
|
||||||
state_manager.init_item('execution_providers', [ 'cpu' ])
|
state_manager.init_item('execution_providers', [ 'cpu' ])
|
||||||
|
|||||||
Reference in New Issue
Block a user