adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation
MIT License
2.02k stars 261 forks source link

"Disable sorting of wildcards before processing" should be the default. #715

Open schwern opened 8 months ago

schwern commented 8 months ago

Problem

By default, cyclical options in prompts and cyclical options in wildcards behave differently. ${number={@3|2|4}} will produce 3, 2, 4, 3, ... but in a wildcard file it will always sort them: 2, 3, 4, 2, ... This behavior is surprising and makes refactoring prompts into wildcard files difficult and confusing.

I spent quite some time trying to debug the problem and even wrote up a whole bug report before I found the "Disable sorting of wildcards before processing" option by searching the code.

Solution

"Disable sorting of wildcards before processing" should be on by default so options cycling behaves the same whether they're in a prompt or a wildcard file. This makes creating wildcard files easier.

Alternatively, document "Disable sorting of wildcards before processing"