mcmonkeyprojects / SwarmUI

SwarmUI (formerly StableSwarmUI), A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
1.22k stars 88 forks source link

Combinatorial Generation and/or more randomisation for wildcards #134

Open Taruvi opened 2 months ago

Taruvi commented 2 months ago

Feature Idea

Following on from this issue, I would like to see a tweak to how wildcards work. They're great and very useful but quite often I see the same wildcards being generated over and over. This is even when I might have dozens or a hundred-plus lines in a wildcard file.

What's the feasibility of either:

  1. Adding a Combinatorial Generation feature like this extension for A1111 whereby Swarm would run through all available lines in the wildcard no matter how many images are set in the batch.
  2. Adding some sort of tracking to the file - a simple numbering system to indicate how many times the line in the wildcard has been used before?

Regarding 2.: Maybe in each wildcard that gets used, add a comma, then a number that increments each time that line is called. So if you generated two images with a wildcard that contains animals, Swarm would pick lines randomly and then you could have something like:

cat,1
dog,0
tiger,1
wolf,0

Then the next time you call that wildcard, Swarm would automatically pick the lowest numbered lines and use them first, increment the number and then move on to the next.

Or maybe in some sort of database like there are for models and Image History. Maybe this would be better since it wouldn't 'pollute' the files so you could use them elsewhere.

Either way, I'm not always seeing a huge amount in the way of randomisation.

Thanks.

Other

No response

misakitchi commented 1 month ago

Same issue: its always the same wildcards that are used... its not "real" random... :(