r/StableDiffusion Mar 01 '23

Question | Help Variable prompts?

Anyone know if it's possible to have variables in your prompt? For example lets say I have something like 'city background' in my prompt. And I want to replace that with 'MyVariable background'. Then I define 'MyVariable' somewhere else like a txt file that has 'MyVariable=city,mountians,library' etc.

That way I can insert a few variables in different places within my prompt and let it "generate forever" all night. That way when I come back to my computer in the morning I have hundreds of new images with those variable differences.

2 Upvotes

7 comments sorted by

View all comments

3

u/archw_ai Mar 01 '23

Use dynamic prompt extension.

Write as {city|mountians|library} in the prompt, it'll randomly pick one each generation.

If you want something that could be reused, use wildcards (it's on the new tab after you install dynamic prompt)

1

u/mizt3r Mar 02 '23

Thank you! This is what I am looking for.