sd-dynamic-prompts icon indicating copy to clipboard operation
sd-dynamic-prompts copied to clipboard

I would like to go through my wildcard in order without others having this function

Open Hezow opened this issue 1 year ago • 5 comments

In most of my prompts, I have several wildcards but I would like one of them to perfectly follow the order in which I listed my terms.

Thanks again for this extension, it's the most useful.

Hezow avatar Sep 04 '23 06:09 Hezow

If I understand you correctly, you mean "I would like to specify some wildcards as combinatorial, and others as random", correct?

If so, I would also find this feature extremely useful.

rjgoif avatar Sep 13 '23 14:09 rjgoif

Yes, that's pretty much it, I had several wildcards and by default the terms selected in them are completely random. And I wanted one of them not to be in these conditions, I wanted it to follow the order in which I made my list.

I found a solution with the Jinja2 Template. If you want I'll share it with you.

Hezow avatar Sep 15 '23 21:09 Hezow

I found a solution with the Jinja2 Template. If you want I'll share it with you.

Could be useful for me and maybe some others. Would you be so kind as to share your solution? Thank you.

anothertal3 avatar Nov 10 '23 10:11 anothertal3

You should be able to use the variant/wildcard prefix option (which, apparently, hasn't really been documented!), implemented in https://github.com/adieyal/dynamicprompts/pull/27

If your default mode is combinatorial, you can do __~foo__ to force random sampling for the foo wildcard (or {~A|B|C} for a variant).

Similarly, in random mode you can use @ to force a given command to be interpreted in combinatorial mode.

akx avatar Nov 10 '23 13:11 akx

It has been documented, but perhaps not easy to find - https://github.com/adieyal/sd-dynamic-prompts/blob/main/docs/SYNTAX.md#cyclical-sampler

adieyal avatar Nov 10 '23 23:11 adieyal