Cosmetic changes

This commit is contained in:
henryruhs
2025-04-23 21:11:51 +02:00
parent ef62a2ee9e
commit 837ee1e18c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ pip install -r requirements.txt
Setup
-----
This `config.ini` utilizes the MegaFace dataset to train the Face Swapper model.
This `config.ini` utilizes the VGGFace2 dataset to train the Face Swapper model.
```
[training.dataset]
@@ -44,7 +44,7 @@ split_ratio = 0.9995
```
[training.model]
generator_embedder_path = .models/blendface.pt
loss_embedder_path = .models/adaface.pt
loss_embedder_path = .models/arcface.pt
gazer_path = .models/gazer.pt
face_masker_path = .models/face_masker.pt
```
+1 -1
View File
@@ -26,7 +26,7 @@ WARP_TEMPLATE_SET : WarpTemplateSet =\
def warp_tensor(input_tensor : Tensor, warp_template : WarpTemplate) -> Tensor:
normed_warp_template = WARP_TEMPLATE_SET.get(warp_template).repeat(input_tensor.shape[0], 1, 1)
affine_grid = nn.functional.affine_grid(normed_warp_template.to(input_tensor.device), list(input_tensor.shape))
output_tensor = nn.functional.grid_sample(input_tensor, affine_grid, align_corners = False, padding_mode = 'reflection')
output_tensor = nn.functional.grid_sample(input_tensor, affine_grid, padding_mode = 'reflection')
return output_tensor