mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
fix size of bucket < min_size ref #1008
This commit is contained in:
@@ -1317,7 +1317,7 @@ def make_bucket_resolutions(max_reso, min_size=256, max_size=1024, divisible=64)
|
|||||||
width = min_size
|
width = min_size
|
||||||
while width <= max_size:
|
while width <= max_size:
|
||||||
height = min(max_size, int((max_area // width) // divisible) * divisible)
|
height = min(max_size, int((max_area // width) // divisible) * divisible)
|
||||||
if height > 0:
|
if height >= min_size:
|
||||||
resos.add((width, height))
|
resos.add((width, height))
|
||||||
resos.add((height, width))
|
resos.add((height, width))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user