diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-04 06:02:15 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 06:02:15 +0000 |
commit | 4918eb6ce484caa4bc5a9f668bb466a5122a9c87 (patch) | |
tree | 76a0e42461d620764ad810c5b8dbd5b28d757519 /modules/masking.py | |
parent | 80844ac861504e7c67a3d4dec0cbed9f6f4b3e24 (diff) | |
parent | 2cf3d2ac15530dbc8fdb486a4dac03b710972445 (diff) | |
download | stable-diffusion-webui-gfx803-4918eb6ce484caa4bc5a9f668bb466a5122a9c87.tar.gz stable-diffusion-webui-gfx803-4918eb6ce484caa4bc5a9f668bb466a5122a9c87.tar.bz2 stable-diffusion-webui-gfx803-4918eb6ce484caa4bc5a9f668bb466a5122a9c87.zip |
Merge branch 'master' into hn-activation
Diffstat (limited to 'modules/masking.py')
-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
|