diff options
author | Bruno Seoane <brunoseoaneamarillo@gmail.com> | 2022-11-04 19:40:13 +0000 |
---|---|---|
committer | Bruno Seoane <brunoseoaneamarillo@gmail.com> | 2022-11-04 19:40:13 +0000 |
commit | fd66f669ea25bad1409aec87ef14b8417009bddc (patch) | |
tree | 42348fb16d018920f6d7fc5970f6c54803ba5e72 /modules/masking.py | |
parent | 31db25ecc8d9c3996e7bac00cc616ee12557b7d3 (diff) | |
parent | 89722fb5e4eda2adc5d3a6abf8babf8a58e80d69 (diff) | |
download | stable-diffusion-webui-gfx803-fd66f669ea25bad1409aec87ef14b8417009bddc.tar.gz stable-diffusion-webui-gfx803-fd66f669ea25bad1409aec87ef14b8417009bddc.tar.bz2 stable-diffusion-webui-gfx803-fd66f669ea25bad1409aec87ef14b8417009bddc.zip |
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui
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
|