Skip to content

Dynamic syntax

When you want several variations at once (different hair colours, poses, or a comparison of a few LoRAs), write them into the prompt instead of editing it again and again.

Syntax Meaning Example
[[A|B|C]] Generate one set for each. Several [[ ]] groups multiply [[red|blue]] hair, [[smile|crying]] → 4 combinations
{A|B|C} Pick one at random {red|blue|silver} hair

With dynamic syntax, the count next to the Generate button means how many images per combination. Four combinations with a count of 2 gives 8 images.

Below the prompt editor there are [[ ]] and { } buttons: select some text and press one to wrap it (select red, blue, press [[ ]], and it becomes [[red|blue]]).

Syntax Meaning
[[A|B|C]] One set for each; groups multiply
{A|B|C} Pick one at random
{3::A|B} Weighted random: A is three times as likely as B
{A|} Sometimes nothing at all
{2$$A|B|C} Pick 2, no repeats
{1-3$$A|B|C} Pick 1 to 3
{2$$ and $$A|B|C} Pick 2, joined with and
__pose__ A random line from the wildcard file pose
[[__pose__]] One set for every line of the wildcard file
{set:c=red|blue} … {get:c} Pick once, reuse the same value later
${c={red|blue}} … ${c} The same
# comment Everything to the end of the line is left out

A wildcard is a list file with one option per line. If pose lists standing, sitting and lying, writing __pose__ picks one of those lines at random.

  • Press “Syntax” below the editor and open the “Wildcards” tab to create and edit list files. Names can include folders, such as chara/hair, used as __chara/hair__.
  • Type __ in the prompt to get a list of wildcard files. Picking one gives a random line per image; Shift+Enter turns it into [[__name__]] (one set per line).

A variable is a name that stands for a fixed piece of text — handy for a character’s look or the quality tags you always use.

  • Add one in “Syntax” → “Variables”, for example name my_oc, content silver long hair, blue eyes, hair ribbon.
  • Writing ${my_oc} in the prompt is replaced with that content. Type $ to list your variables.
  • A variable’s content can use dynamic syntax too.

“Syntax” → “Preview” lists what the prompt expands into and how many prompts that is.

With “Lock random picks” on, random picks stay the same within a batch. Make the character’s look random and the expression [[ ]], and you get a character sheet: the same character with different expressions.

1girl, solo, upper body, [[<lora:StyleA_v3:0.8>|<lora:StyleB_v1:0.8>|]]

Set “Seed” to “Fixed” so all three share one seed and the only difference is the LoRA (the empty last option is the no-LoRA baseline). Then send the results to Compare.