Skip to content

[pull] master from comfyanonymous:master #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions comfy_extras/nodes_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading