aboutsummaryrefslogtreecommitdiffstats
path: root/modules/masking.py
diff options
context:
space:
mode:
authorevshiron <evshiron@gmail.com>2022-11-04 17:43:02 +0000
committerevshiron <evshiron@gmail.com>2022-11-04 17:43:02 +0000
commit73e1cd6f53f3566973805666a4049450cdb8da1b (patch)
tree90c4f0e6b8853c564894409c596e4bd57bca578a /modules/masking.py
parente21fcd72fcf147904a1df060226c4df12acf251e (diff)
parent89722fb5e4eda2adc5d3a6abf8babf8a58e80d69 (diff)
downloadstable-diffusion-webui-gfx803-73e1cd6f53f3566973805666a4049450cdb8da1b.tar.gz
stable-diffusion-webui-gfx803-73e1cd6f53f3566973805666a4049450cdb8da1b.tar.bz2
stable-diffusion-webui-gfx803-73e1cd6f53f3566973805666a4049450cdb8da1b.zip
Merge branch 'master' into fix/encode-pnginfo
Diffstat (limited to 'modules/masking.py')
-rw-r--r--modules/masking.py2
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