From 3391fb9537770f53e756e1b9afb13d736c90ac79 Mon Sep 17 00:00:00 2001 From: David Chatel Date: Sun, 8 Dec 2024 12:27:26 +0100 Subject: [PATCH] CropFace now returns crop_sized black crops when no face is detected. --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 148dc2a..ff87f19 100644 --- a/nodes.py +++ b/nodes.py @@ -176,7 +176,7 @@ class SoftErosion: soft_m = np.minimum(dist / size, 1) soft_m = torch.from_numpy(soft_m) soft_mask.append(soft_m) - soft_mask = torch.from_numpy(np.array(soft_mask)) + soft_mask = torch.from_numpy(np.array(soft_mask)).type(torch.FloatTensor) return (soft_mask, ) class ApplyMask: