From 2186e417ba5c653b37818a8c8d47e427eda22a3c Mon Sep 17 00:00:00 2001 From: Kohya S Date: Wed, 20 Dec 2023 22:12:21 +0900 Subject: [PATCH] fix size of bucket < min_size ref #1008 --- library/model_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/model_util.py b/library/model_util.py index 858c86c3..a577b97d 100644 --- a/library/model_util.py +++ b/library/model_util.py @@ -1317,7 +1317,7 @@ def make_bucket_resolutions(max_reso, min_size=256, max_size=1024, divisible=64) width = min_size while width <= max_size: height = min(max_size, int((max_area // width) // divisible) * divisible) - if height > 0: + if height >= min_size: resos.add((width, height)) resos.add((height, width))