diff options
author | EllangoK <karun.ellango7@gmail.com> | 2023-01-24 07:24:32 +0000 |
---|---|---|
committer | EllangoK <karun.ellango7@gmail.com> | 2023-01-24 07:24:32 +0000 |
commit | e46bfa5a9e9b489ae925a9c23880e34fe8d9fffa (patch) | |
tree | 07f81c4debb13c60d8321faa9bf3341622bc979f /modules/images.py | |
parent | 9fc354e1303453bbd865cbede86da4c3273ed14f (diff) | |
download | stable-diffusion-webui-gfx803-e46bfa5a9e9b489ae925a9c23880e34fe8d9fffa.tar.gz stable-diffusion-webui-gfx803-e46bfa5a9e9b489ae925a9c23880e34fe8d9fffa.tar.bz2 stable-diffusion-webui-gfx803-e46bfa5a9e9b489ae925a9c23880e34fe8d9fffa.zip |
handling sub grids and merging into one
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py index 3b1c5f34..0bc3d524 100644 --- a/modules/images.py +++ b/modules/images.py @@ -195,7 +195,7 @@ def draw_grid_annotations(im, width, height, hor_texts, ver_texts): ver_text_heights = [sum([line.size[1] + line_spacing for line in lines]) - line_spacing * len(lines) for lines in
ver_texts]
- pad_top = max(hor_text_heights) + line_spacing * 2
+ pad_top = 0 if sum(hor_text_heights) == 0 else max(hor_text_heights) + line_spacing * 2
result = Image.new("RGB", (im.width + pad_left, im.height + pad_top), "white")
result.paste(im, (pad_left, pad_top))
|