Industry leading face manipulation platform
Extend flake8 rules
henryruhsefc9652df47e
diff --git a/.flake8 b/.flake8index eac4a0d7..5419fcc6 100644--- a/.flake8+++ b/.flake8@@ -1,5 +1,5 @@[flake8]-select = E3, E4, F, I1, I2+select = E22, E23, E24, E27, E3, E4, E7, F, I1, I2per-file-ignores = facefusion.py:E402, install.py:E402plugins = flake8-import-orderapplication_import_names = facefusiondiff --git a/facefusion/processors/modules/expression_restorer.py b/facefusion/processors/modules/expression_restorer.pyindex f5b64d89..9ac4880d 100755--- a/facefusion/processors/modules/expression_restorer.py+++ b/facefusion/processors/modules/expression_restorer.py@@ -93,7 +93,7 @@ def register_args(program : ArgumentParser) -> None:if group_processors:group_processors.add_argument('--expression-restorer-model', help = wording.get('help.expression_restorer_model'), default = config.get_str_value('processors.expression_restorer_model', 'live_portrait'), choices = processors_choices.expression_restorer_models)group_processors.add_argument('--expression-restorer-factor', help = wording.get('help.expression_restorer_factor'), type = int, default = config.get_int_value('processors.expression_restorer_factor', '80'), choices = processors_choices.expression_restorer_factor_range, metavar = create_int_metavar(processors_choices.expression_restorer_factor_range))- facefusion.jobs.job_store.register_step_keys([ 'expression_restorer_model','expression_restorer_factor' ])+ facefusion.jobs.job_store.register_step_keys([ 'expression_restorer_model', 'expression_restorer_factor' ])def apply_args(args : Args, apply_state_item : ApplyStateItem) -> None:diff --git a/facefusion/processors/modules/face_editor.py b/facefusion/processors/modules/face_editor.pyindex a0d2bcc4..0759a2b8 100755--- a/facefusion/processors/modules/face_editor.py+++ b/facefusion/processors/modules/face_editor.py@@ -360,7 +360,7 @@ def edit_lip_open(motion_points : LivePortraitMotionPoints, face_landmark_68 : Felse:lip_motion_points = numpy.concatenate([ motion_points.ravel(), [ lip_ratio, 1.0 ] ])lip_motion_points = lip_motion_points.reshape(1, -1).astype(numpy.float32)- lip_motion_points = forward_retarget_lip(lip_motion_points) * numpy.abs(face_editor_lip_open_ratio)+ lip_motion_points = forward_retarget_lip(lip_motion_points) * numpy.abs(face_editor_lip_open_ratio)lip_motion_points = lip_motion_points.reshape(-1, 21, 3)return lip_motion_pointsdiff --git a/facefusion/program.py b/facefusion/program.pyindex 496647fc..41e220ff 100755--- a/facefusion/program.py+++ b/facefusion/program.py@@ -147,9 +147,9 @@ def create_frame_extraction_program() -> ArgumentParser:program = ArgumentParser(add_help = False)group_frame_extraction = program.add_argument_group('frame extraction')group_frame_extraction.add_argument('--trim-frame-start', help = wording.get('help.trim_frame_start'), type = int, default = facefusion.config.get_int_value('frame_extraction.trim_frame_start'))- group_frame_extraction.add_argument('--trim-frame-end', help = wording.get('help.trim_frame_end'), type = int, default = facefusion.config.get_int_value('frame_extraction.trim_frame_end'))+ group_frame_extraction.add_argument('--trim-frame-end', help = wording.get('help.trim_frame_end'), type = int, default = facefusion.config.get_int_value('frame_extraction.trim_frame_end'))group_frame_extraction.add_argument('--temp-frame-format', help = wording.get('help.temp_frame_format'), default = config.get_str_value('frame_extraction.temp_frame_format', 'png'), choices = facefusion.choices.temp_frame_formats)- group_frame_extraction.add_argument('--keep-temp', help = wording.get('help.keep_temp'), action = 'store_true', default = config.get_bool_value('frame_extraction.keep_temp'))+ group_frame_extraction.add_argument('--keep-temp', help = wording.get('help.keep_temp'), action = 'store_true', default = config.get_bool_value('frame_extraction.keep_temp'))job_store.register_step_keys([ 'trim_frame_start', 'trim_frame_end', 'temp_frame_format', 'keep_temp' ])return program