Combinatorial Randomization? #309
Replies: 5 comments
-
Responded in the issue, here it is again: Sounds like it is working as expected, combinatorial mode generates every possible prompt, including all values in wildcard files. There is however new syntax which I think will achieve what you want. In combinatorial mode, try something like this
That will choose a random value from test2.txt while iterating through every value in test1.txt. Similar syntax is available for variants,
|
Beta Was this translation helpful? Give feedback.
-
Thank you! That definitely helps and I think maybe gets me there or at least closer. Maybe wildcards inside wildcards and this would help? Going to try making sense of even what I'm asking to myself and help clarify some hopefully. So here's my noob tired brain example. There are four values, all referencing different wildcards. The goal in the end I'm trying for is; 1st image chooses four random values. Ideally with a batch limit of some kind so that on the 5th image it then chooses four new random values again and then continues retaining the first two while randomizing the second two indefinitely. So maybe it would look like this (random letters chosen to represent random values selected from the initial prompt/image); K T W L Another example I guess to show the four separate wildcard files, so number is a wildcard file followed by a value from that card. 1G 2T 3W 4L Also concerning possible combinatorial limits, the desired batch limit would always kick in before the possible combinations/wildcard files would be exhausted. Essentially I want it to always select random values, but just keep two of the chosen ones for some specific batch count before it chooses new random values. Maybe the answer is painfully obvious and I just suck. Either way I greatly appreciate your help thus far! And will update if I figure it out. :) |
Beta Was this translation helpful? Give feedback.
-
Hrm, maybe figured it out, but seems to be weird but I'll have to check more later. Basically though, if I have combinatorial on and I nested wildcards, something like... 1.txt
And then call 11 in the prompt and have a wildcard as; 11.txt
That seems to do what I'm looking for (retain some initial random values through a batch while randomizing others until all randomize again) and I can do multiple nested/randomized prompts this way. However oddly enough, it seems like the very last nested/randomized wildcard I do that for it will still always randomize every value within a given combinatorial batch. So i set Max Generations to 8, and combo batches to 1. The other wildcards I want to randomize each image (3 and 4 in my above example) are behaving as expected when called as ~3. So, if in the 1 2 3 4 example, if 1 2 3 are nested with the ~ calling the main wildcard file, it seems to treat 1 and 2 differently than 3. If all four are nested/randomized, then the 4th one will be the one still being randomized every image within the batch. Hope that all makes some kind of sense. Thank you again for everything! |
Beta Was this translation helpful? Give feedback.
-
Okay, another update. Seems like what I described in the last comment can easily be worked around by just having a single term repeated in the last nested/randomized wildcard (so basically the last one use something I don't actually want randomized). Not sure why it's behaving that way, or if it's intentional or a problem, but wanted to mention the easy workaround I landed on. Thank you again for your help and time! :) |
Beta Was this translation helpful? Give feedback.
-
There is an issue open for random order combinatorial generation - #328 - I wonder whether that may be helpful to you. It isn't high on the priority list right now so it may take a while before it's implemented. |
Beta Was this translation helpful? Give feedback.
-
Hello, had dropped this problem on an issues page, but figured this may be a better place for it. Basically, looking for a way to combine combinatoric prompting with wildcard randomization (with how it behaves if you don't enable combinatoric).
TLDR near bottom.
Okay, this seems to have to do with limiting the max generations under the Dynamic Prompts settings in the main UI page (in Automatic1111). I tried just setting it to 0, and now it seems to create every possible combination of the above wildcards as expected.
However it seems with combinatorial mode enabled (whether using the squiggly brackets or not), wildcards no longer behave as "wildcard" files (in the sense that the selections are no longer randomized), and instead will be run through as a list with the goal to make every combination in order they are listed in the text files. It will stop making these combinations when it either reaches the end of the possible combinations, or it reaches what is set for max generations (in my earlier examples, this is why it never got passed the color blue).
TLDR
I'm not sure this is related to the actual top level issue here, but wanted to make sure I clarified my situation. Maybe this is solved somehow in the Jinja template portion, though I'm not sure. Mainly I'm hoping for a way to call multiple wildcards initially, and then on subsequent generations/batches only randomize some of the called wildcards. Ideally something like;
Where test2 will randomly select a value from its associated wildcard text, and then generate combinatoric batches while still randomly choosing entries from test1's text file until it reaches the max generations limit (or total possible limit, but preferably a way to limit it and also have it retain the randomization and not become programmatic with each combination). Maybe not possible? Am I missing something?
Anyway, love the extension, thank you so much for everything you've done so far. :)
Beta Was this translation helpful? Give feedback.
All reactions