SD reads the prompt left to right one word (token) at a time. It associates the current token with the one appearing next to it. It cannot reread the prompt at all.
You want to have as strong association between tokens as possible, and order them so there aren't any room for misunderstanding between every token. It's up to you how to do this.
Personally I'd start with the selfie and then try to string it together.
Ideally you want to say the photo is blurry at first too, and then at the very end say the photo is in fact "good". This will hide mistakes.
You want to set gender early otherwise the hair and other things will get weird.
Because commas are so common they work well to "soften" terms that have no association.
SD likes to draw stuff white gray because thats the average color of everything. If you add colors mid-prompt, expect it to be matched/mixed with white.
If you start a prompt with color, expect it to dominate the entire scene. You want a scene at night, make sure to start with black colors, etc.
So while there are many ways to do this , I would use these principles to do something like:
"blurry footage she selfie photography skirt her skinny , dimly orange background floor teal carpet stockphoto"
Negatives are kind of counterintuitive. They don't block content, just minimizes it. So here I would put "girl woman face" in the negatives because we have already specified the gender.
This will make SD "steer away" from average output and make more unique features. Don't put too much in the negatives though or the output will clog up. I usually limit myself at 5-6 tokens in the negatives at most.
"female" is a good negative to get unique body shapes. "figurine" is a good negative for realistic skin.
You want to activate negatives at late generation. So negative would be " [ : girl woman face : 0.6 ] if you want it to activate after 60% of the steps.
Pixels placed by the stable diffusion sampler do not "move around". Once they have been set they are there until the final image.
Why is this important? You can use this feature when prompt switching, by "coercing" SD into filling out the existing pixels.
E.g [ stockphoto orange black background of woman with white pants candid view upclose : nudephoto bare : 0.1 ]
Finally, the weights. When doing non-dynamic prompting I find weights to be really useful to balance common tokens with less common tokens.
You can also set weight at negative value for some interesting results.
Main benefit is that you can set tokens at very low weight between tokens that usually have no association to one another, without loosing either of the token meanings , i.e "bear (trap : 0.1) door"
There are too many factors to say for certain what will be best, for instance, the specific checkpoint (model) you are using makes a massive difference in your results. It's probably best to find just a single model for each type of art you want to do (realistic, anime, comics, 3d, etc.) and master just that one model. But here are a few general tips that should help:
For backgrounds I find that they usually work best as a real-world description. Since I suck at that I get Gemini or another chat AI to generate background text for me. e.g. I tell Gemini I need help with stable-diffusion prompts. Then I say to Gemini:
"Give me a prompt for an Egyptian tomb as background."
And I get something like this:
"The cavernous interior of an ancient Egyptian tomb, dimly lit by flickering torches. Hieroglyphs adorn the walls, depicting scenes of deities and pharaohs. Cobwebs and dust motes dance in the air, revealing hints of forgotten treasures and secrets."
Then when writing up the prompt I define the person and what they are doing, then add the space afterwards, then add cleanup prompts, like "high definition" and such at the end.
Another thing that can be helpful to getting what you want is the use of parentheses. The more you put around a term or phrase the more weight that is given. It allows you to force certain elements if you want.
Another important tool is BREAK, which if put between elements makes it less likely they will bleed over. This is especially useful with colors, though it is no guarantee by any means.
Another thing is that you should choose a seed and stick with it when doing fine tweaking, but you should also try different seeds in case your prompt is good, but it is just a bad seed for that prompt. If you use random seeds then you can't tell when your prompt adjustments are working or not. For instance, you might want a red shirt, you prompt (red shirt) and get a black shirt because you have black mentioned earlier in the prompt. So you try ((red shirt)) and change seeds, and get a black shirt still, but if you had stayed on that original seed you would have gotten a red shirt.
Here is a prompt I built to try and get a specific kind of look based loosely on what you started with and what AdComfortable1544 was doing for the background:
blurry portrait of skinny girl, small nose, BREAK wearing a (((red skirt))) BREAK and wearing a ((black shirt)), BREAK pink hair BREAK standing in a living room with (orange walls) BREAK the ((room has teal carpet)) BREAK stockphoto, sharp, high resolution, in focus, detailed <lora:more_details:0.6>
This works perfectly in the specific Checkpoint/Model I was in, and for that seed. But if I add 1 to the end of the seed she is leaning against the wall now, and missing an arm. If I add another 1 to the end of that, one of the walls is now teal instead of orange. So I put an extra () around "orange walls" and the picture changes a lot, the walls are all orange, but now her hair is teal.... ugh..
Another approach is to get something that should work (with less parentheses than I used, because those are temperamental) , and just run a massive batch and find the one that worked best.
Finally, use the whole (skinny:1.2) kind of thing to further tweak things.
In my experience working with stable diffusion, stable diffusion works better when you cut out all the fluff words. Don't get me wrong, sometimes using narrative writing works as long as you keep it short. But because I didn't have to worry about figuring out how to do that every time I wanted to make a prompt, I designed a prompt generator to do it all for me.
So by asking it something like this: Selfie photo of a skinny girl in a short skirt.
The output was Selfie photography, (Youthful girl taking a selfie:1.3), Self-portrait perspective, Smiling and confident, (Fashion-forward style:1.2), Vibrant cityscape background, Candid moment, Modern street setting, Casual chic, (Soft afternoon light:1.2), Captured with a Canon EOS 5D Mark IV, 35mm f/2.0 lens, Sharp focus, Expressive mood, Urban flair.
And as you can see there's very little in the way of article words or narrative. The prompt is structured in a very specific way to net the best result. A lot of it has to do with the model or checkpoint you're using. But I'm constantly using this so I'm not having to build the base prompt. I get the prompt I want, and then I can start structuring a little bit differently if I want changes.
I have no technical information to back this up. But like Thunderous71 said, it is to my understanding (from trying myself) that it does depend on the model (checkpoint) you are using and also the Stable Diffusion version.
13
u/AdComfortable1544 Feb 13 '24 edited Feb 14 '24
SD reads the prompt left to right one word (token) at a time. It associates the current token with the one appearing next to it. It cannot reread the prompt at all.
You want to have as strong association between tokens as possible, and order them so there aren't any room for misunderstanding between every token. It's up to you how to do this.
Personally I'd start with the selfie and then try to string it together.
Ideally you want to say the photo is blurry at first too, and then at the very end say the photo is in fact "good". This will hide mistakes.
You want to set gender early otherwise the hair and other things will get weird.
Because commas are so common they work well to "soften" terms that have no association.
SD likes to draw stuff white gray because thats the average color of everything. If you add colors mid-prompt, expect it to be matched/mixed with white.
If you start a prompt with color, expect it to dominate the entire scene. You want a scene at night, make sure to start with black colors, etc.
So while there are many ways to do this , I would use these principles to do something like:
"blurry footage she selfie photography skirt her skinny , dimly orange background floor teal carpet stockphoto"
Negatives are kind of counterintuitive. They don't block content, just minimizes it. So here I would put "girl woman face" in the negatives because we have already specified the gender.
This will make SD "steer away" from average output and make more unique features. Don't put too much in the negatives though or the output will clog up. I usually limit myself at 5-6 tokens in the negatives at most.
"female" is a good negative to get unique body shapes. "figurine" is a good negative for realistic skin.
You want to activate negatives at late generation. So negative would be " [ : girl woman face : 0.6 ] if you want it to activate after 60% of the steps.
Pixels placed by the stable diffusion sampler do not "move around". Once they have been set they are there until the final image.
Why is this important? You can use this feature when prompt switching, by "coercing" SD into filling out the existing pixels.
E.g [ stockphoto orange black background of woman with white pants candid view upclose : nudephoto bare : 0.1 ]
Finally, the weights. When doing non-dynamic prompting I find weights to be really useful to balance common tokens with less common tokens.
You can also set weight at negative value for some interesting results.
Main benefit is that you can set tokens at very low weight between tokens that usually have no association to one another, without loosing either of the token meanings , i.e "bear (trap : 0.1) door"
3
u/arentol Feb 16 '24
There are too many factors to say for certain what will be best, for instance, the specific checkpoint (model) you are using makes a massive difference in your results. It's probably best to find just a single model for each type of art you want to do (realistic, anime, comics, 3d, etc.) and master just that one model. But here are a few general tips that should help:
For backgrounds I find that they usually work best as a real-world description. Since I suck at that I get Gemini or another chat AI to generate background text for me. e.g. I tell Gemini I need help with stable-diffusion prompts. Then I say to Gemini:
"Give me a prompt for an Egyptian tomb as background."
And I get something like this:
"The cavernous interior of an ancient Egyptian tomb, dimly lit by flickering torches. Hieroglyphs adorn the walls, depicting scenes of deities and pharaohs. Cobwebs and dust motes dance in the air, revealing hints of forgotten treasures and secrets."
Then when writing up the prompt I define the person and what they are doing, then add the space afterwards, then add cleanup prompts, like "high definition" and such at the end.
Another thing that can be helpful to getting what you want is the use of parentheses. The more you put around a term or phrase the more weight that is given. It allows you to force certain elements if you want.
Another important tool is BREAK, which if put between elements makes it less likely they will bleed over. This is especially useful with colors, though it is no guarantee by any means.
Another thing is that you should choose a seed and stick with it when doing fine tweaking, but you should also try different seeds in case your prompt is good, but it is just a bad seed for that prompt. If you use random seeds then you can't tell when your prompt adjustments are working or not. For instance, you might want a red shirt, you prompt (red shirt) and get a black shirt because you have black mentioned earlier in the prompt. So you try ((red shirt)) and change seeds, and get a black shirt still, but if you had stayed on that original seed you would have gotten a red shirt.
Here is a prompt I built to try and get a specific kind of look based loosely on what you started with and what AdComfortable1544 was doing for the background:
blurry portrait of skinny girl, small nose, BREAK wearing a (((red skirt))) BREAK and wearing a ((black shirt)), BREAK pink hair BREAK standing in a living room with (orange walls) BREAK the ((room has teal carpet)) BREAK stockphoto, sharp, high resolution, in focus, detailed <lora:more_details:0.6>
This works perfectly in the specific Checkpoint/Model I was in, and for that seed. But if I add 1 to the end of the seed she is leaning against the wall now, and missing an arm. If I add another 1 to the end of that, one of the walls is now teal instead of orange. So I put an extra () around "orange walls" and the picture changes a lot, the walls are all orange, but now her hair is teal.... ugh..
Another approach is to get something that should work (with less parentheses than I used, because those are temperamental) , and just run a massive batch and find the one that worked best.
Finally, use the whole (skinny:1.2) kind of thing to further tweak things.
Sorry for the wall of text.
2
u/Xerophayze Mar 06 '24
In my experience working with stable diffusion, stable diffusion works better when you cut out all the fluff words. Don't get me wrong, sometimes using narrative writing works as long as you keep it short. But because I didn't have to worry about figuring out how to do that every time I wanted to make a prompt, I designed a prompt generator to do it all for me.
So by asking it something like this: Selfie photo of a skinny girl in a short skirt.
The output was Selfie photography, (Youthful girl taking a selfie:1.3), Self-portrait perspective, Smiling and confident, (Fashion-forward style:1.2), Vibrant cityscape background, Candid moment, Modern street setting, Casual chic, (Soft afternoon light:1.2), Captured with a Canon EOS 5D Mark IV, 35mm f/2.0 lens, Sharp focus, Expressive mood, Urban flair.
And as you can see there's very little in the way of article words or narrative. The prompt is structured in a very specific way to net the best result. A lot of it has to do with the model or checkpoint you're using. But I'm constantly using this so I'm not having to build the base prompt. I get the prompt I want, and then I can start structuring a little bit differently if I want changes.
1
u/[deleted] Feb 13 '24
My understanding is that depends on the version of SD your using.