From e75c9a402a56a80ee1d7630212abb525167d3ca2 Mon Sep 17 00:00:00 2001 From: toto Date: Wed, 1 Nov 2023 14:46:51 +0800 Subject: [PATCH] update --- portrait/utils/psgan_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portrait/utils/psgan_utils.py b/portrait/utils/psgan_utils.py index 1665447..7ff4de2 100755 --- a/portrait/utils/psgan_utils.py +++ b/portrait/utils/psgan_utils.py @@ -830,7 +830,7 @@ class PostProcess: height, width = source.shape[:2] small_source = cv2.resize(source, (self.img_size, self.img_size)) - laplacian_diff = source.astype(np.float) - cv2.resize(small_source, (width, height)).astype(np.float) + laplacian_diff = source.astype(np.float64) - cv2.resize(small_source, (width, height)).astype(np.float64) result = (cv2.resize(result, (width, height)) + laplacian_diff).round().clip(0, 255).astype(np.uint8) if self.denoise: result = cv2.fastNlMeansDenoisingColored(result)