From b5deb5ae4ba54b35e5658fa33e45070239cd23ff Mon Sep 17 00:00:00 2001 From: David Chatel Date: Thu, 29 Feb 2024 18:56:14 +0100 Subject: [PATCH] fixed cuda to cpu in WarpFacesBack --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 168c5b7..6ae9f92 100644 --- a/nodes.py +++ b/nodes.py @@ -166,7 +166,7 @@ class WarpFaceBack: for single_warp, single_mask in zip(warp, mask)] full_mask = np.add.reduce(warped_masks, axis=0)[...,None] swapped = np.add.reduce([ - cv2.warpAffine(single_crop.numpy(), + cv2.warpAffine(single_crop.cpu().numpy(), cv2.invertAffineTransform(single_warp), image.shape[1::-1] ) * single_mask[..., None]