diff options
author | random_thoughtss <random_thoughtss@proton.me> | 2022-10-30 22:33:02 +0000 |
---|---|---|
committer | random_thoughtss <random_thoughtss@proton.me> | 2022-10-30 22:33:02 +0000 |
commit | d9e4e4d7a09d4aee8ce249a3c8e91ce165b10fa5 (patch) | |
tree | c287fbcc35e5fa6734f842a5281299c06f9e7a77 | |
parent | 71571e3f055237d71ba2d47756846ad1d73be00c (diff) | |
download | stable-diffusion-webui-gfx803-d9e4e4d7a09d4aee8ce249a3c8e91ce165b10fa5.tar.gz stable-diffusion-webui-gfx803-d9e4e4d7a09d4aee8ce249a3c8e91ce165b10fa5.tar.bz2 stable-diffusion-webui-gfx803-d9e4e4d7a09d4aee8ce249a3c8e91ce165b10fa5.zip |
Fix non-square full resolution inpainting.
-rw-r--r-- | modules/masking.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/masking.py b/modules/masking.py index fd8d9241..a5c4d2da 100644 --- a/modules/masking.py +++ b/modules/masking.py @@ -49,7 +49,7 @@ def expand_crop_region(crop_region, processing_width, processing_height, image_w ratio_processing = processing_width / processing_height
if ratio_crop_region > ratio_processing:
- desired_height = (x2 - x1) * ratio_processing
+ desired_height = (x2 - x1) / ratio_processing
desired_height_diff = int(desired_height - (y2-y1))
y1 -= desired_height_diff//2
y2 += desired_height_diff - desired_height_diff//2
|