diff options
author | Yevhenii Hurin <evgeny.gurin@gmail.com> | 2023-01-29 13:47:14 +0000 |
---|---|---|
committer | Yevhenii Hurin <evgeny.gurin@gmail.com> | 2023-01-29 13:47:14 +0000 |
commit | c46f3ad98b1171d7ad42bf1653e6770b52147bfd (patch) | |
tree | 3eb596481afd559bf94a8c696b93d3f22b0e65c8 /modules/images.py | |
parent | 7c53f81caf817a7e7dc9c2fafebfcce269ecb1d7 (diff) | |
parent | 00dab8f10defbbda579a1bc89c8d4e972c58a20d (diff) | |
download | stable-diffusion-webui-gfx803-c46f3ad98b1171d7ad42bf1653e6770b52147bfd.tar.gz stable-diffusion-webui-gfx803-c46f3ad98b1171d7ad42bf1653e6770b52147bfd.tar.bz2 stable-diffusion-webui-gfx803-c46f3ad98b1171d7ad42bf1653e6770b52147bfd.zip |
Merge branch 'master' of https://github.com/AUTOMATIC1111/stable-diffusion-webui
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/images.py b/modules/images.py index 0bc3d524..ae3cdaf4 100644 --- a/modules/images.py +++ b/modules/images.py @@ -36,6 +36,8 @@ def image_grid(imgs, batch_size=1, rows=None): else:
rows = math.sqrt(len(imgs))
rows = round(rows)
+ if rows > len(imgs):
+ rows = len(imgs)
cols = math.ceil(len(imgs) / rows)
|