ComfyUI_Comfyroll_CustomNodes icon indicating copy to clipboard operation
ComfyUI_Comfyroll_CustomNodes copied to clipboard

CR Load Image List Plus: Error - Sizes of tensors must match? Match what?

Open ewebgh33 opened this issue 1 year ago • 2 comments

Sizes of tensors must match except in dimension 0. Expected size 1024 but got size 512 for tensor number 1 in the list

I have a folder of images, all square. Some are 512, some 1024, maybe a couple are like 716 or something. This really shouldn't matter, as the very next node is a resize anyway.

The first node in the workflow to process is CR Load Image List Plus. As soon as it starts to process, it pops up with the error: Sizes of tensors must match except in dimension 0. Expected size 1024 but got size 512 for tensor number 1 in the list It hasn't got far enough into the workflow to get a mismatch to any other node... so why is it throwing an error on this first node, load images? Mismatch with what? Itself? Does it expect all images in a folder to be the same dimensions?

I am piping in a latent of 1024px later in the flow - but the error comes up well before this processes. And like I said, there's a resize straight after Load Images List Plus anyway.

If I load image 1 (image zero? the first in the folder), manually with a Load Image node, it works fine. But if I replace Load Image with CR Load Images List Plus, it fails. ??

I also tried the non-PLUS version of the load images list, same error.

Thanks

ewebgh33 avatar Sep 16 '24 06:09 ewebgh33

i have same question.

zhou779806m avatar Feb 10 '25 07:02 zhou779806m

Sizes of tensors must match except in dimension 0. Expected size 1024 but got size 512 for tensor number 1 in the list

I have a folder of images, all square. Some are 512, some 1024, maybe a couple are like 716 or something. This really shouldn't matter, as the very next node is a resize anyway.

You answered your own question =D

Tensors, in a batch, must all match size and dimensions.

It doesnt matter that you have a resize after -- the batch is made at the loading output (the node you are using to load the images).

Amorano avatar Feb 10 '25 08:02 Amorano