mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-23 12:50:18 +08:00
Merge branch 'comfyanonymous:master' into master
This commit is contained in:
commit
3fb70ef893
@ -505,8 +505,8 @@ class GetImageSize:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_TYPES = (IO.INT, IO.INT)
|
RETURN_TYPES = (IO.INT, IO.INT, IO.INT)
|
||||||
RETURN_NAMES = ("width", "height")
|
RETURN_NAMES = ("width", "height", "batch_size")
|
||||||
FUNCTION = "get_size"
|
FUNCTION = "get_size"
|
||||||
|
|
||||||
CATEGORY = "image"
|
CATEGORY = "image"
|
||||||
@ -515,12 +515,13 @@ class GetImageSize:
|
|||||||
def get_size(self, image, unique_id=None) -> tuple[int, int]:
|
def get_size(self, image, unique_id=None) -> tuple[int, int]:
|
||||||
height = image.shape[1]
|
height = image.shape[1]
|
||||||
width = image.shape[2]
|
width = image.shape[2]
|
||||||
|
batch_size = image.shape[0]
|
||||||
|
|
||||||
# Send progress text to display size on the node
|
# Send progress text to display size on the node
|
||||||
if unique_id:
|
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 = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"ImageCrop": ImageCrop,
|
"ImageCrop": ImageCrop,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
comfyui-frontend-package==1.21.6
|
comfyui-frontend-package==1.21.7
|
||||||
comfyui-workflow-templates==0.1.25
|
comfyui-workflow-templates==0.1.25
|
||||||
comfyui-embedded-docs==0.2.0
|
comfyui-embedded-docs==0.2.0
|
||||||
torch
|
torch
|
||||||
|
|||||||
@ -788,7 +788,7 @@ class PromptServer():
|
|||||||
if hasattr(Image, 'Resampling'):
|
if hasattr(Image, 'Resampling'):
|
||||||
resampling = Image.Resampling.BILINEAR
|
resampling = Image.Resampling.BILINEAR
|
||||||
else:
|
else:
|
||||||
resampling = Image.ANTIALIAS
|
resampling = Image.Resampling.LANCZOS
|
||||||
|
|
||||||
image = ImageOps.contain(image, (max_size, max_size), resampling)
|
image = ImageOps.contain(image, (max_size, max_size), resampling)
|
||||||
type_num = 1
|
type_num = 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user