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

Random mode on Load Image Batch keeps choosing the same images #379

Open
Tromazing opened this issue Apr 9, 2024 · 1 comment
Open

Random mode on Load Image Batch keeps choosing the same images #379

Tromazing opened this issue Apr 9, 2024 · 1 comment

Comments

@Tromazing
Copy link

Tromazing commented Apr 9, 2024

I've set up a Load Image Batch node to select from a few hundred different images in several subfolders, using the "*/**" pattern and Random mode. But around 8 out of 10 that come up are the same few on rotation. What could be causing this and is there a way around it?

@WAS-PlaiLabs
Copy link
Collaborator

random is incredibly un-random, is really the issue likely. In ComfyUI you'll notice if you select from a range of numbers you get the same repeated vales all the time. The best way around that is simply a better random number generator.

I can't see anything wrong with the code. It simply grabs a random number between 0 and the number of images detected, and selects a random index.

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

2 participants