was-node-suite-comfyui icon indicating copy to clipboard operation
was-node-suite-comfyui copied to clipboard

[Question] Load image batch sorting dont work

Open Milor123 opened this issue 1 year ago • 4 comments

How can I load a folder of images, and that it keep the order?

image

I have this config

image

but the problems is that the image generator dont have sense, it looks like Random generator, i have it in incremental

how can i do send me the imagenes by name order? Please help! Thank u very much

Milor123 avatar Apr 04 '24 22:04 Milor123

Not sure. I didn't have issues with incremented file, and that's exactly what the code does in general with the list:

            self.load_images(directory_path, pattern)
            self.image_paths.sort()

Which sorts the list lexicographic, regardless of the mode it's on.

WAS-PlaiLabs avatar May 02 '24 00:05 WAS-PlaiLabs

Same problem, it doesnt seem to sorts. In my folder it is : image But when i use Load Image Batch with the follwoing workflow: image

I could see from the Show Text node that it wasnt in the order. It is strange.

BTW, what does "label" mean and how does it influence the output? I did modify it but nothing happened.

Zeelyne avatar May 13 '24 12:05 Zeelyne

I can't reproduce the issue. The class sorts the list explicitly, and that sorting is lexicographic, the same as say Windows File Explorer you take pictures of.

Here's an example of incrementing, and single index:

https://github.com/WASasquatch/was-node-suite-comfyui/assets/160535949/f626c3d8-45dc-45e0-b33e-3aaee5cbccac

WAS-PlaiLabs avatar May 14 '24 19:05 WAS-PlaiLabs

@Zeelyne By any chance, could it be that your output order is 10uComfyUI.png, 11uComfyUI.png, ... 1uComfyUI.png, 20uComfyUI.png, ...? Because that's what happens when you sort these file names alphabetically. You should try to zero-pad them.

D4KU avatar Jul 03 '24 16:07 D4KU