ltdrdata / ComfyUI-Impact-Pack

Custom nodes pack for ComfyUI This custom node helps to conveniently enhance images through Detector, Detailer, Upscaler, Pipe, and more.
GNU General Public License v3.0
1.44k stars 144 forks source link

Wildcard Seed/Randomness keeps repeating excessively #616

Closed hobojoker closed 1 month ago

hobojoker commented 1 month ago

It feels like there is something wrong with the wildcard seed assignment - I have a wildcard list with 1947 lines, and yet in 20 image generations with random seeds I somehow have 4 repeat images? I'm consistently getting repeats way more often with unique seed values than expected.

The 4 repeats in 20 generations is just one example, I've run hundreds of images through and I see a ton more repeats than expected, and specific ones are repeated more often than others.

Obviously there are going to be repeats, and I expect that, but it seems to repeat far too consistently...

Seed 609318467621642 produced the same wildcard output as seed 16860090012894, in 4 generations, there was a repeat!

ltdrdata commented 1 month ago

What is your wildcard prompt?

hobojoker commented 1 month ago

My prompt is just a wildcard file I made for the image subject "subjects" is the entire content of the impact prompt.

It's just text file with a ton of different characters (again, over 1900 lines)

 On Wednesday, May 29, 2024 at 09:47:43 PM EDT, Dr.Lt.Data ***@***.***> wrote:  

What is your wildcard prompt?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ltdrdata commented 1 month ago

My prompt is just a wildcard file I made for the image subject "subjects" is the entire content of the impact prompt. It's just text file with a ton of different characters (again, over 1900 lines) On Wednesday, May 29, 2024 at 09:47:43 PM EDT, Dr.Lt.Data @.> wrote: What is your wildcard prompt? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

  1. Is the __subject__ wildcard file nested?
  2. How many items does it contain exactly if it isn't? (If it is in a nested structure, please share the wildcard file to enable reproduction.)
hobojoker commented 1 month ago
  1. It is not nested!
  2. It has 1947 items in it
ltdrdata commented 1 month ago

workflow (18)

The test results indicate that it's just a matter of bad luck. By dividing the seed into consecutive groups of 100 (0-100, 100-200, etc.) and testing, the collision probability ranges from 0% to 5%.

One reason is that your prompt is too simple. Even if duplication occurs with the first prompt, the probability of duplication occurring consecutively with the second wildcard in a prompt decreases exponentially.

hobojoker commented 1 month ago

Okay, thanks for confirming that!