Join MaskNet to guide generator

This commit is contained in:
henryruhs
2025-03-16 12:29:17 +01:00
parent c45fcbba84
commit 24f2e14a95
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ strategy = auto
precision = 16-mixed
logger_path = .logs
logger_name = face_swapper
preview_frequency = 250
preview_frequency = 100
```
```
-1
View File
@@ -39,7 +39,6 @@ def calc_embedding(embedder : EmbedderModule, input_tensor : Tensor, padding : P
def overlay_mask(input_tensor : Tensor, input_mask : Mask) -> Tensor:
input_mask = input_mask.mean(dim = 1, keepdim = True)
overlay_tensor = torch.zeros(*input_tensor.shape, dtype = input_tensor.dtype, device = input_tensor.device)
overlay_tensor[:, 2, :, :] = 1
input_mask = input_mask.repeat(1, 3, 1, 1).clamp(0, 0.8)