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)