mirror of
https://github.com/facefusion/facefusion-labs.git
synced 2026-05-22 23:59:40 +02:00
Cosmetic changes
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user