File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -505,8 +505,8 @@ def INPUT_TYPES(s):
505505 }
506506 }
507507
508- RETURN_TYPES = (IO .INT , IO .INT )
509- RETURN_NAMES = ("width" , "height" )
508+ RETURN_TYPES = (IO .INT , IO .INT , IO . INT )
509+ RETURN_NAMES = ("width" , "height" , "batch_size" )
510510 FUNCTION = "get_size"
511511
512512 CATEGORY = "image"
@@ -515,12 +515,13 @@ def INPUT_TYPES(s):
515515 def get_size (self , image , unique_id = None ) -> tuple [int , int ]:
516516 height = image .shape [1 ]
517517 width = image .shape [2 ]
518+ batch_size = image .shape [0 ]
518519
519520 # Send progress text to display size on the node
520521 if unique_id :
521- PromptServer .instance .send_progress_text (f"width: { width } , height: { height } " , unique_id )
522+ PromptServer .instance .send_progress_text (f"width: { width } , height: { height } \n batch size: { batch_size } " , unique_id )
522523
523- return width , height
524+ return width , height , batch_size
524525
525526NODE_CLASS_MAPPINGS = {
526527 "ImageCrop" : ImageCrop ,
You can’t perform that action at this time.
0 commit comments