From 4ebdeee634275b21d7d1c1e45d213b63539d0325 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sun, 23 Mar 2025 16:21:40 +0100 Subject: [PATCH] Alphabetical order for warp templates --- face_swapper/src/helper.py | 12 ++++++------ face_swapper/src/types.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/face_swapper/src/helper.py b/face_swapper/src/helper.py index 0839a40..ff9d4d2 100644 --- a/face_swapper/src/helper.py +++ b/face_swapper/src/helper.py @@ -5,20 +5,20 @@ from .types import EmbedderModule, Embedding, Mask, Padding, WarpTemplate, WarpT WARP_TEMPLATE_SET : WarpTemplateSet =\ { - 'vgg_face_hq_to_arcface_128_v2': torch.tensor( + 'arcface_128_v2_to_arcface_112_v2': torch.tensor( [ - [ 1.01305414, -0.00140513, -0.00585911 ], - [ 0.00140513, 1.01305414, 0.11169602 ] + [ 8.75000016e-01, -1.07193451e-08, 3.80446920e-10 ], + [ 1.07193451e-08, 8.75000016e-01, -1.25000007e-01 ] ]), 'ffhq_to_arcface_128_v2': torch.tensor( [ [ 8.50048894e-01, -1.29486822e-04, 1.90956388e-03 ], [ 1.29486822e-04, 8.50048894e-01, 9.56254653e-02 ] ]), - 'arcface_128_v2_to_arcface_112_v2': torch.tensor( + 'vgg_face_hq_to_arcface_128_v2': torch.tensor( [ - [ 8.75000016e-01, -1.07193451e-08, 3.80446920e-10 ], - [ 1.07193451e-08, 8.75000016e-01, -1.25000007e-01 ] + [ 1.01305414, -0.00140513, -0.00585911 ], + [ 0.00140513, 1.01305414, 0.11169602 ] ]) } diff --git a/face_swapper/src/types.py b/face_swapper/src/types.py index 7c0c1c9..342dc6f 100644 --- a/face_swapper/src/types.py +++ b/face_swapper/src/types.py @@ -21,5 +21,5 @@ FaceMaskerModule : TypeAlias = Module OptimizerSet : TypeAlias = Any -WarpTemplate = Literal['vgg_face_hq_to_arcface_128_v2', 'ffhq_to_arcface_128_v2', 'arcface_128_v2_to_arcface_112_v2'] +WarpTemplate = Literal['arcface_128_v2_to_arcface_112_v2', 'ffhq_to_arcface_128_v2', 'vgg_face_hq_to_arcface_128_v2'] WarpTemplateSet : TypeAlias = Dict[WarpTemplate, Tensor]