75/75
0/75
Dynamic Prompts โ–ผ
Prompt Magic โ–ผ
Need help? โ–ผ
Syntax cheatsheet
Tutorial
Discussions
Report a bug

Combinations

Choose a number of terms from a list, in this case we choose two artists: {2$$artist1|artist2|artist3}
If $$ is not provided, then 1$$ is assumed.

If the chosen number of terms is greater than the available terms, then some terms will be duplicated, otherwise chosen terms will be unique. This is useful in the case of wildcards, e.g. {2$$__artist__} is equivalent to {2$$__artist__|__artist__}

A range can be provided: {1-3$$artist1|artist2|artist3}
In this case, a random number of artists between 1 and 3 is chosen.

Options can be given weights: {2::artist1|artist2}
In this case, artist1 will be chosen twice as often as artist2.

Wildcards can be used and the joiner can also be specified: {{1-$$and$$__adjective__}}
Here, a random number between 1 and 3 words from adjective.txt will be chosen and joined together with the word 'and' instead of the default comma.

Wildcards

Find and manage wildcards in the Wildcards Manager tab.

You can add more wildcards by creating a text file with one term per line and name is mywildcards.txt. Place it in /Users/mwq/code/stable-diffusion-webui/extensions/sd-dynamic-prompts/wildcards. __<folder>/mywildcards__ will then become available.

Variables

Set a variable like so: ${season=!{summer|autumn|winter|spring}} Now use it like this: In ${season} I wear a ${season} shirt and ${season} trousers For more details, and functionality, see the documentation (coming soon)

Find more settings on the Settings tab

You are using version 2.11.2 of the WebUI extension, and the underlying dynamicprompts library is version 0.23.0.
Jinja2 templates โ–ผ
Help for Jinja2 templates โ–ผ
Jinja2 templates is an experimental feature for advanced template generation. It is not recommended for general use unless you are comfortable with writing scripts.

Literals


    I love red roses
    

Random choices


    I love {{ choice('red', 'blue', 'green') }} roses
        
This will randomly choose one of the three colors.

Iterations

        
    {% for colour in ['red', 'blue', 'green'] %}
        {% prompt %}I love {{ colour }} roses{% endprompt %}
    {% endfor %}
        
    
This will produce three prompts, one for each color. The prompt tag is used to mark the text that will be used as the prompt. If no prompt tag is present then only one prompt is assumed

Wildcards

        
    {% for colour in wildcard("__colours__") %}
        {% prompt %}I love {{ colour }} roses{% endprompt %}
    {% endfor %}
        
    
This will produce one prompt for each colour in the wildcard.txt file.

Conditionals

        
    {% for colour in ["red", "blue", "green"] %}
        {% if colour == "red"}
            {% prompt %}I love {{ colour }} roses{% endprompt %}
        {% else %}
            {% prompt %}I hate {{ colour }} roses{% endprompt %}
        {% endif %}
    {% endfor %}
        
    
This will produce the following prompts:
  • I love red roses
  • I hate blue roses
  • I hate green roses

Jinja2 templates are based on the Jinja2 template engine. For more information see the Jinja2 documentation..
If you are using these templates, please let me know if they are useful.
Advanced options โ–ผ
Some settings have been moved to the settings tab. Find them in the Dynamic Prompts section.
ControlNet v1.1.204 โ–ผ
Image
Drop Image Here - or - Click to Upload

Set the preprocessor to [invert] If your image has white background and black lines.

Control Type
Control Mode
Resize Mode
File
00002-1957169343-occult symbol... 223.4 KB Download

occult symbols in fantasy colors, "Honeydew":"eaf2e3","Fluorescent cyan":"61e8e1","Bittersweet":"f25757","Maize":"f2e863","Naples yellow":"f2cd60", comic, illustration, weird, detailed, intricate, geometric
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1957169343, Size: 512x512, Model hash: b19fee4ab1, Conditional mask weight: 1.0, Version: v1.3.0

Saved: 00002-1957169343-occult symbols in fantasy colors, _Honeydew___eaf2e3_,_Fluorescent cyan___61e8e1_,_Bittersweet___f25757_,_Maize___f2e863_,_Naple.png