Explaining Prompting Techniques In 12 Minutes – Stable Diffusion (Automatic 1111 | Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone I'm bite size genius prompting in stable diffusion can be a mystery and it's sometimes tricky to know what does well but there are techniques that you can use to get the results you want and in this video I'll be breaking them down so you can spend less time reading and more time creating but like the video and give it to me bite-sized so let me quickly cover some basic information prompts are ordered from most important to least important from the top to the bottom from the left to the right there were various theories on how you structure your prompt for the best result but it's worth keeping in mind certain Concepts such as the subject lighting photography style color scheme doing words and much more which help to build up your image when it comes to style prompts can influence this alongside your desired checkpoint as stable diffusion was trained on a multitude of data sets from across the internet meaning you can draw references to art styles celebrities clothing types and much more to influence your image The Prompt sections have these numbers on the top right called token limits and these refer to the maximum number of words you can fit into a chunk of 75 tokens for example if you had a hundred tokens then it would process 75 tokens and then 25 tokens independently into stable diffusion's unit this in plain English is how the AI language model breaks down and manipulates text for processing The Prompt box is where the magic happens this is where you will describe manipulate and design your image through the text to image section all alter images if you're using image to image in conjunction with your reference photo you can put as much text as you like in here but often it's better to keep things short and sweet so your prompts are easier to fix or refine as you make adjustments closer to your desired image for example let's type out medium shot of a woman with four lips golden eyes and a white crop top long black hair snowy weather octane render we can see that stable diffusion will attempt to generate its interpretation of that prompt and this interpretation will change depending on the seed image size and other settings which change the type of image generated from the same prompt the negative prompt box is where you tell stable diffusion what you don't want in your image and this can include leisurable Concepts items weather or artifacts and bad Anatomy within an image again you can put as much text as you want in here but it's good to keep it reasonable to make life easier for yourself later down the line for example let's type out bad dream unrealistic dream non-safe for work and we will notice that we get a much higher quality image let's say for work it's worth checking the example images of the checkpoint you are using to ensure that you are using the best negative prompts for your chosen model the parenthesis is used to put a greater weight over importance unaware than your prompt and for each parenthesis wrapping a word it would increase his attention by a factor of 1.1 and the further parenthesis will multiply the attention by 1.1 I'll be honest in saying that the mass behind this isn't really all that important as experimenting with your prompts will yield better results but it's still important to see this in action so you can fine tune your images so for example if I were to write out our previous prompt but put snowy weather in parenthesis then we can see how the snow and even the clothes start to turn either white will have a much snowier presence the more parenthesis we use square brackets are used to reduce the weight or the importance of a word in your prompt and for each square bracket it will decrease the attention to the word by 1.1 and of course we're multiply that attention by 1.1 for each pair with square brackets wrapping a word again it's better to experiment when it comes to fine-tuning your prompt but by understanding what these functions do you have another two in your belt for fine-tuning images so for example if I were to write out our previous prompt but put snowy weather in square brackets then we can see how how the snow is reduced especially around the hair and the clothing the more square brackets we use let's address prompt weighting you can manipulate prompts to either add or remove waiting or the importance from words within your prompts and what this means in plain English is that you can control how much impact certain words have over others within your prompt and words with greater impact will be visualized more strongly in your image this is done by wrapping your word in a parenthesis but we will now add both a colon and then a number which can be a whole number or with decimal values so for example if I were to write out snowy weather with a variety of font weightings we can see how the impact changes from no prompt weighting to a really high prompt weighting value we obviously get rather low quality images have very high weighting so keep the numbers reasonable you may have seen these angled brackets in certain prompts perhaps some websites that provide checkpoints and laws these are known as embeddings and are common in lauras where a file and multiplier folder file needs to be specified to determine the strength of the Laura the typical format would be Laura file name and then multiplier and unfortunately you can't do prompt editing with a Lora in this version of stable diffusion in this example I have used the add details lover which adds over moves detail for my generated images and we can see the effects of changing the values within our embeddings and how it is structured now prompt editing is a powerful way of controlling your generated images by swapping the prompts being used for generating an image during degeneration a good way to illustrate the format is by using from to and when where from determines what prompt you start with two determines which prompt you end with and a step at which the switch takes place is determined by when you can also do from and when with two colons in between to remove the prompt being specified after a fixed number of steps determined by when and don't worry I'll show you this in practice so you don't feel like you're in another math class but remember this key piece of information the weightings you provide in decimal numbers are percentages of your sampling steps which must total up to one meaning 0.5 is actually fifty percent of your total sampling steps anything that's a whole number above one will be the exact sampling step you want to specify meaning a figure of 20 means stop or switch at sampling step 20. so for example you can see the impact in these images with our first image using decimals which represent percentages to transition from snow to Sun out to a certain number of steps the second image uses whole numbers to represent the step for the transition based on the 30 steps we are using and lastly we can indicate yeah which step we should stop using the selected prompt snowy weather altogether now here's a cool trick using a backslash before a special character such as a bracket or parenthesis will turn that special character into ordinary text so using it in practice will remove the effect of the parenthesis giving you snowy weather as pure text with no effect you can see it in action here where we have the standard prompt snowy weather compared to snowy weather within the parenthesis and then the literal parenthesis represented as text alongside our prompt and you know it worked because the snow is less prominent now thinking back to the tokens which form chunks I described in the beginning the break keyword in uppercase will field the current chunks with padding characters and adding more text after break will start a new chunk I personally do not see any practical use for breaking up your trunks prematurely before hitting that 75 token limit but if you wanted to achieve this then this is your solution now the horizontal line is used to trigger alternation over looping prompts where words are broken up with horizontal lines and are given the chance to influence the generation repeatedly as stable diffusion Loops through the words within the square bracket kids so if we were to use long black hair brown dreadlocks orange curly hair as a prompt then the first step will be long black hair then Brown dreadlocks then orange curly hair this is another technique for controlling the types of generations you get during the generation process and you can see in action how this impacts the final result the CFG scale will determine how strongly the generated image should conform to the prompt you provide with lower values giving you more creative results extremely low or high values may give you unpredictable results so I tend to go between 5 and 12. sometimes it can be useful to generate a few images through batch with a low CFG scale allowing you to get a more varied set of images and then running an image that you like through image to image with a higher CFG scale to make adjustments more closer to your prompts in these examples you can see a variety of CFG scales being used and I think the value is 5 to 9 are more accurate to The Prompt The Prompt Matrix is used to see what impacts your individual prompts have on your generated image allowing you to remove unwanted or unimpactful prompts and keep the ones nearing you to the image you want in order to use the prompt Matrix start your prompt with the subject of your image and then follow up with the prompts you want to test with a horizontal line anything nested between or after a horizontal line will be put onto a matrix and I want you to see and compare the impacts of that prompt the more specific your prompt then the more consistent the results you will get across your images allowing you to identify the prompts which are causing issues by singling them out I'll be doing a separate video breaking down the prompt Matrix specifically as it's a useful tool which could do with its own easy to find dedicated video but in the meantime you can look at this image to see the comparisons in action the prompts from file or text box section will allow you to test multiple prompts at the same time either from the text box or from a file all you have to do is put your prompts in and use a line break to separate them then generate and you will get an image per line of your prompts allowing you to see the comparisons for each and I'll probably do a separate Deep dive video on this topic so it's easy to find here are some examples and why you look at these if you wanted to use a file then just put the prompts into a notepad on separate lines then drag the notepad file into the file section and it will copy the information over to Sable diffusion for generating XYZ plot allows you to test and compare a range of variables on your generated images and make comparisons against those variables such as the seed CFG scale and using prompt Sr or search and replace which allows you to replace your prompt with a different prompt during a generation to see the results now this script has a lot of options so I'll probably do a separate breakdown video of each option so you know what they do and you can see comparisons between each of the options but I've used this feature throughout the video to generate comparisons such as a CFG scale so hopefully you have a good indication of what it does but to wrap things up I hope this video has helped you to understand prompting a little bit more like the video before you leave the building and subscribe to be notified when my next video drops there's also a patreon for those who want to support this is bite size genius and I hope you enjoyed
Info
Channel: Bitesized Genius
Views: 105,666
Rating: undefined out of 5
Keywords: Stable Diffusion, stable diffusion prompt guide, stable diffusion controlnet, stable diffusion prompts, BitesizedGenius, Automatic1111, stable diffusion lora, stable diffusion extensions, stable diffusion embeddings, stable diffusion checkpoints, stable diffusion anime, stable diffusion scripts, stable diffusion video, stable diffusion img2img, Stable diffusion realistic, stable diffusion models, stable diffusion install, stable diffusion tutorial install
Id: dlUpSEbbCho
Channel Id: undefined
Length: 12min 6sec (726 seconds)
Published: Thu Jun 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.