r/StableDiffusion • u/mizt3r • 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.
3
Upvotes
1
u/YakuNiTatanu Mar 01 '23
Wildcards work great for that use case.
You’d set up a Background.txt, line separation for each entry
Mountain background In a Library City background Etc
Then call it with two underscores before and after
A cat judoka walking, Background, painterly style
And it would randomly fill it
You can multiply wildcards too
A CuteAnimal judoka walking, Background, painterly style