Skip to content
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

[Question] Load image batch sorting dont work #376

Open
Milor123 opened this issue Apr 4, 2024 · 3 comments
Open

[Question] Load image batch sorting dont work #376

Milor123 opened this issue Apr 4, 2024 · 3 comments

Comments

@Milor123
Copy link

Milor123 commented Apr 4, 2024

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

@WAS-PlaiLabs
Copy link
Collaborator

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.

@Zeelyne
Copy link

Zeelyne commented May 13, 2024

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.

@WAS-PlaiLabs
Copy link
Collaborator

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:

load_image_batch.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants