From 1094f3a9ad8e774810ba8b557847c96c0efb3be0 Mon Sep 17 00:00:00 2001 From: Harisreedhar <46858047+harisreedhar@users.noreply.github.com> Date: Tue, 29 Oct 2024 21:47:25 +0530 Subject: [PATCH] changes (#801) --- facefusion/face_helper.py | 10 +++++----- facefusion/processors/modules/age_modifier.py | 12 ++++++------ facefusion/typing.py | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/facefusion/face_helper.py b/facefusion/face_helper.py index b8a61bb3..085ebd72 100644 --- a/facefusion/face_helper.py +++ b/facefusion/face_helper.py @@ -49,13 +49,13 @@ WARP_TEMPLATES : WarpTemplateSet =\ [ 0.39032951, 0.77598822 ], [ 0.61178945, 0.77476328 ] ]), - 'styleganex_512': numpy.array( + 'styleganex_384': numpy.array( [ - [ 0.43907768, 0.54098284 ], - [ 0.56204778, 0.54122359 ], + [ 0.42353745, 0.52289879 ], + [ 0.57725008, 0.52319972 ], [ 0.50123859, 0.61331904 ], - [ 0.44716341, 0.66936502 ], - [ 0.55637032, 0.66911184 ] + [ 0.43364461, 0.68337652 ], + [ 0.57015325, 0.68306005 ] ]) } diff --git a/facefusion/processors/modules/age_modifier.py b/facefusion/processors/modules/age_modifier.py index f2bc8695..7d71a927 100755 --- a/facefusion/processors/modules/age_modifier.py +++ b/facefusion/processors/modules/age_modifier.py @@ -32,28 +32,28 @@ MODEL_SET : ModelSet =\ { 'age_modifier': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/styleganex_age.hash', - 'path': resolve_relative_path('../.assets/models/styleganex_age.hash') + 'url': 'https://huggingface.co/bluefoxcreation/StyleGANEX-AGE/resolve/main/styleganex_age_opt.hash', + 'path': resolve_relative_path('../.assets/models/styleganex_age_opt.hash') } }, 'sources': { 'age_modifier': { - 'url': 'https://github.com/facefusion/facefusion-assets/releases/download/models-3.0.0/styleganex_age.onnx', - 'path': resolve_relative_path('../.assets/models/styleganex_age.onnx') + 'url': 'https://huggingface.co/bluefoxcreation/StyleGANEX-AGE/resolve/main/styleganex_age_opt.onnx', + 'path': resolve_relative_path('../.assets/models/styleganex_age_opt.onnx') } }, 'templates': { 'target': 'ffhq_512', - 'target_with_background': 'styleganex_512' + 'target_with_background': 'styleganex_384' }, 'sizes': { 'target': (256, 256), - 'target_with_background': (512, 512) + 'target_with_background': (384, 384) } } } diff --git a/facefusion/typing.py b/facefusion/typing.py index 23a2ab99..37042fde 100755 --- a/facefusion/typing.py +++ b/facefusion/typing.py @@ -85,7 +85,7 @@ ProcessStep = Callable[[str, int, Args], bool] Content = Dict[str, Any] -WarpTemplate = Literal['arcface_112_v1', 'arcface_112_v2', 'arcface_128_v2', 'ffhq_512', 'mtcnn_512', 'styleganex_512'] +WarpTemplate = Literal['arcface_112_v1', 'arcface_112_v2', 'arcface_128_v2', 'ffhq_512', 'mtcnn_512', 'styleganex_384'] WarpTemplateSet = Dict[WarpTemplate, NDArray[Any]] ProcessMode = Literal['output', 'preview', 'stream']