[0:00] hey everyone I'm b-size genius prompting [0:02] instable diffusion can be a mystery and [0:05] it's sometimes tricky to know what does [0:07] what but there are techniques that you [0:10] can use to get the results you want and [0:12] in this video I'll be breaking them down [0:14] so you can spend less time reading and [0:16] more time creating but like the video [0:19] and give it to me bite-sized so let me [0:21] quickly cover some basic information [0:24] prompts are ordered from most important [0:26] to least important from the top to the [0:29] bottom from the left to the right there [0:31] were various theories on how you [0:33] structure your prompt for the best [0:35] result but it's worth keeping in mind [0:37] certain Concepts such as the subject [0:40] lighting photography style color scheme [0:43] doing words and much more which help to [0:46] build up your image when it comes to [0:49] style prompts can influence this [0:51] alongside your desired checkpoint as [0:53] stable diffusion was trained on a [0:54] multitude of data sets from across the [0:56] internet meaning you can draw references [0:59] to art style [1:00] celebrities clothing types and much more [1:03] to influence your image The Prompt [1:06] sections have these numbers on the top [1:08] right called token limits and these [1:10] refer to the maximum number of words you [1:12] could fit into a chunk of 75 tokens for [1:15] example if you had 100 tokens then it [1:18] would process 75 tokens and then 25 [1:21] tokens independently into stable [1:24] diffusions unit this in plain English is [1:28] how the AI language model breaks down [1:30] and manipulates text for processing The [1:33] Prompt box is where the magic happens [1:35] this is where you will describe [1:37] manipulate and design your image through [1:39] the text to image section or alter [1:42] images if you're using image to image in [1:44] conjunction with your reference photo [1:46] you can put as much text as you like in [1:48] here but often it's better to keep [1:50] things short and sweet so your prompts [1:52] are easier to fix orine as you make [1:55] adjustments closer to your desired image [1:57] for example let's type out medium shot [2:00] of a woman with four lips golden eyes [2:02] and a white crop top long black hair [2:05] snowy weather octane render we can see [2:08] that stable diffusion will attempt to [2:10] generate its interpretation of that [2:11] prompt and this interpretation will [2:13] change depending on the seed image size [2:17] and other settings which change the type [2:18] of image generated from the same prompt [2:21] the negative prompt box is where you [2:23] tell stable diffusion what you don't [2:25] want in your image and this can include [2:28] literal Concepts items weather or [2:31] artifacts and bad Anatomy within an [2:34] image again you can put as much text as [2:37] you want in here but it's good to keep [2:39] it reasonable to make life easier for [2:41] yourself later down the line for example [2:44] let's type out bad dream unrealistic [2:47] dream nons saafe for work and we will [2:50] notice that we get a much higher quality [2:51] image that's safe for work it's worth [2:54] checking the example images of the [2:56] checkpoint you are using to ensure that [2:58] you are using the best NE negative [3:00] prompts for your chosen model the [3:02] parenthesis is used to put a greater [3:04] weight or importance on a word than your [3:06] prompt and for each parenthesis wrapping [3:09] a word it would increase its attention [3:11] by a factor of 1.1 and the further [3:13] parenthesis will multiply the attention [3:16] by 1.1 I'll be honest in saying that the [3:19] mass behind this isn't really all that [3:21] important as experimenting with your [3:23] prompts will yield better results but [3:25] it's still important to see this in [3:27] action so you can find two your images [3:30] so for example if I were to write out [3:32] our previous prompt but put snowy [3:34] weather in parenthesis then we can see [3:37] how the snow and even the clothes start [3:39] to turn either white or have a much [3:41] snowier presence the more parenthesis we [3:43] use square brackets are used to reduce [3:46] the weight or the importance of a word [3:48] in your prompt and for each square [3:50] bracket it will decrease the attention [3:52] to the word by 1.1 and of course we'll [3:55] multiply the detention by 1.1 for each [3:58] pair of square brackets WRA a word again [4:01] it's better to experiment when it comes [4:03] to fine-tuning your prompt but by [4:05] understanding what these functions do [4:06] you have another tool in your belt for [4:08] fine tuning images so for example if I [4:11] were to write out our previous prompt [4:14] but put snowy weather in square brackets [4:16] then we can see how the snow is reduced [4:19] especially around the hair and the [4:20] clothing the more square brackets we use [4:23] let's address prompt waiting you can [4:26] manipulate prompts to either add or [4:28] remove waiting or importance from words [4:30] within your prompts and what this means [4:32] in plain English is that you can control [4:35] how much impact certain words have over [4:37] others within your prompt and words with [4:40] greater impact will be visualized more [4:42] strongly in your image this is done by [4:45] wrapping your word in a parenthesis but [4:48] we will now add both a colon and then a [4:50] number which can be a whole number or [4:52] with decimal values so for example if I [4:56] were to write out snowy weather with a [4:58] variety of prompt ratings we can see how [5:00] the impact changes from no promp waiting [5:03] to a really high promp waiting value we [5:05] obviously get rather lowquality images [5:08] at very high waiting so keep the numbers [5:10] reasonable you may have seen these [5:12] angled brackets in certain prompts [5:14] perhaps some websites that provide [5:16] checkpoints and luras these are known as [5:19] embeddings and are common in luras where [5:21] a file and multiplier for the file needs [5:24] to be specified to determine the [5:26] strength of the Laura the typical format [5:28] would be Laura file name and then [5:31] multiplier and unfortunately you can't [5:33] do prompt editing with Aur in this [5:36] version of stable diffusion in this [5:38] example I've used the add details Laura [5:41] which adds or removes detail from our [5:43] generated images and we can see the [5:46] effects of changing the values within [5:48] our embeddings and how it is structured [5:51] now prompt editing is a powerful way of [5:54] controlling your generated images by [5:56] swapping the prompts being used for [5:58] generating an image during the [6:00] generation a good way to illustrate the [6:02] format is by using from to and when [6:06] where from determines what prompt you [6:08] start with two determines which prompt [6:11] you end with and the Step at which the [6:13] switch takes place is determined by when [6:16] you can also do from and when with two [6:19] colons in between to remove the prompt [6:21] being specified after a fixed number of [6:24] steps determined by when and don't worry [6:27] I'll show you this in practice so you [6:29] don't feel like you're in another Mass [6:30] class but remember this key piece of [6:32] information the weightings you provide [6:35] in decimal numbers are percentages of [6:37] your sampling steps which must total up [6:39] to one meaning 0.5 is actually 50% of [6:43] your total sampling steps anything l a [6:46] whole number above one will be the exact [6:48] sampling step you want to specify [6:51] meaning a figure of 20 means stop or [6:54] switch at sampling step 20 so for [6:57] example you can see the impact in these [6:59] images with our first image using [7:02] decimals which represent percentages to [7:04] transition from snow to Sun after a [7:07] certain number of steps the second image [7:10] uses whole numbers to represent the step [7:12] for the transition based on the 30 steps [7:14] we are using and lastly we can indicate [7:17] at which step we should stop using the [7:20] selected prompt s weather Al together [7:22] now here's a call trick using a [7:25] backslash before a special character [7:27] such as a bracket or par parenthesis [7:30] will turn that special character into [7:32] ordinary text so using it in practice [7:35] we'll remove the effect of the [7:36] parenthesis giving you snowy weather as [7:39] pure text with no effect you can see an [7:42] action here where we have the standard [7:44] prompt snowy weather compared to snowy [7:46] weather within the parenthesis and then [7:48] the literal parenthesis represented as [7:50] text alongside our prompt and you know [7:53] it worked because the snow is less [7:54] prominent now thinking back to the [7:57] tokens which form chunks I described in [7:59] the the beginning the break keyword in [8:01] uppercase will fill the current chunks [8:03] with padding characters and adding more [8:06] text after break will start a new chunk [8:09] I personally do not see any practical [8:11] use for breaking up your chunks [8:12] prematurely before hitting that 75 token [8:15] limit but if you wanted to achieve this [8:17] then this is your solution now the [8:19] horizontal line is used to trigger [8:22] alternation or a loop in prompts where [8:25] words are broken up with horizontal [8:26] lines and are given the chance to [8:28] influence the generation repeatedly as [8:30] stable diffusion Loops through the words [8:33] within the square brackets so if we were [8:35] to use long black hair brown dreadlocks [8:38] orange curly hair as a prompt then the [8:40] first step will be long black hair then [8:43] Brown dreadlocks then orange curly hair [8:46] this is another technique for [8:47] controlling the types of generations you [8:49] get during the generation process and [8:52] you can see in action how this impacts [8:54] the final result the CFG scale will [8:57] determine how strongly the generated [8:59] image should conform to the prompt you [9:00] provide with lower values giving you [9:03] more creative results extremely low or [9:06] high values may give you unpredictable [9:08] results so I tend to go between 5 and 12 [9:12] sometimes it can be useful to generate a [9:14] few images through batch with a low CFG [9:16] scale allowing you to get a more varied [9:19] set of images and then running an image [9:21] that you like through image to image [9:23] with a higher CFG scale to make [9:25] adjustments more closer to your prompt [9:27] in these examples you can see a variety [9:30] of CFG scales being used and I think the [9:33] values 5 to9 are more accurate to The [9:35] Prompt The Prompt Matrix is used to see [9:38] what impact your individual prompts have [9:41] on your generated image allowing you to [9:43] remove unwanted or unimpactful prompts [9:46] and keep the ones nearing you to the [9:48] image you want in order to use the [9:50] prompt Matrix start your prompt with the [9:52] subject of your image and then follow up [9:54] with the prompts you want to test with a [9:56] horizontal line anything nested between [9:59] or after a horizontal line will be put [10:01] onto a matrix allowing you to see and [10:04] compare the impacts of that prompt the [10:06] more specific your prompt that the more [10:09] consistent the results you will get [10:10] across your images allowing you to [10:12] identify the prompts which are causing [10:14] issues by singling them out I'll be [10:17] doing a separate video breaking down the [10:19] prpt Matrix specifically as it's a [10:21] useful tool which could do of its own [10:23] easy to find dedicated video but in the [10:26] meantime you can look at this image to [10:28] see the comparison in action the prompts [10:30] from file or textbox section will allow [10:33] you to test multiple prompts at the same [10:35] time either from the text box or from a [10:38] file all you have to do is put your [10:40] prompts in and use a line break to [10:42] separate them then generate and you will [10:45] get an image per line of your prompts [10:47] allowing you to see the comparisons for [10:49] each and I'll probably do a separate [10:50] Deep dive video on this topic so it's [10:53] easy to find here are some examples and [10:56] while you look at these if you wanted to [10:58] use a file then just put the prompts [11:00] into a notepad on separate lines then [11:02] drag the notepad file into the file [11:04] section and it will copy the information [11:06] over to disable diffusion for generating [11:09] XYZ plot allows you to test and compare [11:12] a range of variables on your generated [11:15] images and make comparisons against [11:17] those valuables such as a seed CFG scale [11:21] and using prompt Sr or search and [11:23] replace which allows you to replace your [11:25] prompt with a different prompt during a [11:28] generation to see the results now this [11:31] script has a lot of options so I'll [11:33] probably do a separate breakdown video [11:36] of each option so you know what they do [11:38] and you can see comparisons between each [11:40] of the options but I've used this [11:42] feature throughout the video to generate [11:44] comparisons such as a CFG scale so [11:47] hopefully you have a good indication of [11:48] what it does but to wrap things up I [11:51] hope this video has helped you to [11:52] understand prompting a little bit more [11:54] like the video before you leave the [11:56] building and subscribe to be notified [11:58] when my next video drops drops there's [12:00] also a patreon for those who want to [12:01] support this is bite-sized genius and I [12:04] hope you enjoyed