fixed cuda to cpu in WarpFacesBack

This commit is contained in:
David Chatel
2024-02-29 18:56:14 +01:00
parent 8cfdb9a815
commit b5deb5ae4b
+1 -1
View File
@@ -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]