mirror of
https://github.com/facefusion/facefusion-labs.git
synced 2026-04-19 15:56:37 +02:00
changes
This commit is contained in:
@@ -39,7 +39,7 @@ def calc_embedding(embedder : EmbedderModule, input_tensor : Tensor, padding : P
|
||||
|
||||
|
||||
def overlay_mask(target_tensor : Tensor, mask_tensor : Tensor) -> Tensor:
|
||||
color_tensor = torch.zeros(*list(target_tensor.shape), dtype = target_tensor.dtype, device = target_tensor.device)
|
||||
color_tensor = torch.zeros(*target_tensor.shape, dtype = target_tensor.dtype, device = target_tensor.device)
|
||||
color_tensor[:, 2, :, :] = 1
|
||||
mask_tensor = mask_tensor.repeat(1, 3, 1, 1).clamp(0, 0.8)
|
||||
output_tensor = target_tensor * (1 - mask_tensor) + color_tensor * mask_tensor
|
||||
|
||||
Reference in New Issue
Block a user