The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Add batch to GetImageSize node. (#8419)
comfyanonymous871749c20842
diff --git a/comfy_extras/nodes_images.py b/comfy_extras/nodes_images.pyindex 58b29f9a9..b1e0d4666 100644--- a/comfy_extras/nodes_images.py+++ b/comfy_extras/nodes_images.py@@ -505,8 +505,8 @@ class GetImageSize:}}- RETURN_TYPES = (IO.INT, IO.INT)- RETURN_NAMES = ("width", "height")+ RETURN_TYPES = (IO.INT, IO.INT, IO.INT)+ RETURN_NAMES = ("width", "height", "batch_size")FUNCTION = "get_size"CATEGORY = "image"@@ -515,12 +515,13 @@ class GetImageSize:def get_size(self, image, unique_id=None) -> tuple[int, int]:height = image.shape[1]width = image.shape[2]+ batch_size = image.shape[0]# Send progress text to display size on the nodeif unique_id:- PromptServer.instance.send_progress_text(f"width: {width}, height: {height}", unique_id)+ PromptServer.instance.send_progress_text(f"width: {width}, height: {height}\n batch size: {batch_size}", unique_id)- return width, height+ return width, height, batch_sizeNODE_CLASS_MAPPINGS = {"ImageCrop": ImageCrop,