feat: Add batch_count output to Image Scale By Aspect Ratio (UTK) node
- Added batch_count integer output to track processed image count - Updated RETURN_TYPES and RETURN_NAMES to include new output - Modified all return statements to include batch count - Version bump to 1.3.8
This commit is contained in:
@@ -135,6 +135,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
"BOX",
|
||||
"INT",
|
||||
"INT",
|
||||
"INT",
|
||||
)
|
||||
RETURN_NAMES = (
|
||||
"image",
|
||||
@@ -142,6 +143,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
"original_size",
|
||||
"width",
|
||||
"height",
|
||||
"batch_count",
|
||||
)
|
||||
FUNCTION = "image_scale_by_aspect_ratio"
|
||||
|
||||
@@ -200,6 +202,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
None,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
)
|
||||
elif orig_width + orig_height == 0:
|
||||
orig_width = _width
|
||||
@@ -216,6 +219,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
None,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
)
|
||||
|
||||
if aspect_ratio == "original":
|
||||
@@ -325,6 +329,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
[orig_width, orig_height],
|
||||
target_width,
|
||||
target_height,
|
||||
len(ret_images),
|
||||
)
|
||||
elif len(ret_images) > 0 and len(ret_masks) == 0:
|
||||
log(
|
||||
@@ -337,6 +342,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
[orig_width, orig_height],
|
||||
target_width,
|
||||
target_height,
|
||||
len(ret_images),
|
||||
)
|
||||
elif len(ret_images) == 0 and len(ret_masks) > 0:
|
||||
log(
|
||||
@@ -349,6 +355,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
[orig_width, orig_height],
|
||||
target_width,
|
||||
target_height,
|
||||
len(ret_masks),
|
||||
)
|
||||
else:
|
||||
log(
|
||||
@@ -361,6 +368,7 @@ class ImageScaleByAspectRatio_UTK:
|
||||
None,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "universaltoolkit"
|
||||
description = "A comprehensive toolkit based on ComfyUI, providing image, mask, audio, and tools nodes, fully modular and v3 compatible."
|
||||
version = "1.3.7"
|
||||
version = "1.3.8"
|
||||
license = {file = "LICENSE"}
|
||||
dependencies = [
|
||||
"torch>=1.9.0",
|
||||
|
||||
Reference in New Issue
Block a user