Fix case of rows 0

This commit is contained in:
kijai 2025-12-09 07:44:23 +02:00
parent 488e6607fe
commit 022b499c70

View File

@ -3187,7 +3187,6 @@ class LoadImagesFromFolderKJ:
median = tuple(map(int, stat.median)) median = tuple(map(int, stat.median))
return median return median
class ImageGridtoBatch: class ImageGridtoBatch:
@classmethod @classmethod
def INPUT_TYPES(s): def INPUT_TYPES(s):
@ -3212,6 +3211,7 @@ class ImageGridtoBatch:
if rows == 0: if rows == 0:
# If rows is 0, calculate number of full rows # If rows is 0, calculate number of full rows
cell_height = H // columns
rows = H // cell_height rows = H // cell_height
else: else:
# If rows is specified, adjust cell_height # If rows is specified, adjust cell_height