Skip to content

Commit a75e7ae

Browse files
authored
Update face_restoration_helper.py
1 parent 8392d03 commit a75e7ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

facelib/utils/face_restoration_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def get_face_landmarks_5(self,
208208
else:
209209
h, w = self.input_img.shape[0:2]
210210
scale = resize / min(h, w)
211-
scale = max(1, scale) # always scale up
211+
# scale = max(1, scale) # always scale up; comment this out for HD images, e.g., AIGC faces.
212212
h, w = int(h * scale), int(w * scale)
213213
interp = cv2.INTER_AREA if scale < 1 else cv2.INTER_LINEAR
214214
input_img = cv2.resize(self.input_img, (w, h), interpolation=interp)
@@ -522,4 +522,4 @@ def clean_all(self):
522522
self.cropped_faces = []
523523
self.inverse_affine_matrices = []
524524
self.det_faces = []
525-
self.pad_input_imgs = []
525+
self.pad_input_imgs = []

0 commit comments

Comments
 (0)