Skip to content

Commit d9e4e4d

Browse files
Fix non-square full resolution inpainting.
1 parent 71571e3 commit d9e4e4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/masking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def expand_crop_region(crop_region, processing_width, processing_height, image_w
4949
ratio_processing = processing_width / processing_height
5050

5151
if ratio_crop_region > ratio_processing:
52-
desired_height = (x2 - x1) * ratio_processing
52+
desired_height = (x2 - x1) / ratio_processing
5353
desired_height_diff = int(desired_height - (y2-y1))
5454
y1 -= desired_height_diff//2
5555
y2 += desired_height_diff - desired_height_diff//2

0 commit comments

Comments
 (0)