diff --git a/comfy_extras/nodes_images.py b/comfy_extras/nodes_images.py index 58b29f9a911f..b1e0d4666950 100644 --- a/comfy_extras/nodes_images.py +++ b/comfy_extras/nodes_images.py @@ -505,8 +505,8 @@ def INPUT_TYPES(s): } } - 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 @@ def INPUT_TYPES(s): 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 node if 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_size NODE_CLASS_MAPPINGS = { "ImageCrop": ImageCrop, diff --git a/requirements.txt b/requirements.txt index 1c1ff54acec8..c470b9ead45e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -comfyui-frontend-package==1.21.6 +comfyui-frontend-package==1.21.7 comfyui-workflow-templates==0.1.25 comfyui-embedded-docs==0.2.0 torch diff --git a/server.py b/server.py index f772545dc734..878b5eeb1eb5 100644 --- a/server.py +++ b/server.py @@ -788,7 +788,7 @@ async def send_image(self, image_data, sid=None): if hasattr(Image, 'Resampling'): resampling = Image.Resampling.BILINEAR else: - resampling = Image.ANTIALIAS + resampling = Image.Resampling.LANCZOS image = ImageOps.contain(image, (max_size, max_size), resampling) type_num = 1