Super Fast Image Generation in stable diffusion using LCM LoRA

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this short video is about faster image generation using an interesting new lauro model that requires only four to eight steps sampling steps instead of the usual 25 to 50 steps to produce complete detailed images I think this is an important update because it has become possible for the first time to generate high quality images with a small number of sampling steps in stable diffusion LCM Laura does not require a special Plugin or installation it can be used only using a normal luro model as we will explain in this video we will explain how to use this Laur in terms of settings its limitations and its uses now the lat consistency models or LCM are trained in a different way than normal Laura models which allows to infer images faster to download the latent consistent model luras we come to the hugging face official account okay and we can download models for SD 1.5 and the Lowa model for sdxl these are just normal lur models we just come here click here files and verion we come to this file and click on on this Arrow here download save as we save it just like any other Loro model so in a stable diffusion models Loro folder we just give it a name such as LC LCM SD 1.5 for example okay and if we want to download the sdxl we come to the sdxl again files inv virence and download the sdxl lur model and Stor in the same location so these are just normal uh lurel models now we come to automatic 1111 and just generate a prompt for example now for example if you want to generate this simple picture now normally we would generate this with 25 sampling steps to 55 sampling steps if we want to generate a high resolution image such as 1024 now the same methodology applies for sdxl nothing changes on automatic 11 11 or on confy UI now if you want to generate this picture which is a very high resolution for example my graphics card is 3070 it takes a while to generate this picture Okay so initially it took 21 seconds to generate the 25 steps so we can see that it took approximately 21 seconds 22 seconds to generate these 25 steps now the quality of the image is good however when we want to apply this Laura we can come to the Laura we don't need to install any plugins or change anything you can change the from the settings for example if you want to display the Laur in this location you can come come to the user interface and add SD lur for for instance SD lur this one here if you want to display a drop down box here where you can select the Laura but you don't need to you just go to the lur section we just search for LCM this is SD 1.5 so I'll be using it just add it to the end just like any other normal Laura however however here we now we need to put something between four to eight sampling steps be based on the guide of the latent consistency lur model this is four to eight steps so what I will be doing is something like let's do something like five and we can use a low CFG scale now for this Lura model to work it should be between one and two okay so if we want to use 1.5 we can come here and see the generation now so there's no acceleration happening here okay it's just that are only generating five sampling steps okay so even with five sampling steps the image generated is of high quality now generate another one for example we can see here it took 3 seconds there it took 20 22 seconds so we can see that the in terms of number of iterations nothing has changed because this model this lower model does not accelerate stable diffusion it just able to generate pictures with a smaller number of steps that is it okay now if we use a small number of samping steps such as five and increase the CFG scale to four to four for example something uh more than two we get a bad image so this the optimal number CFG scale value is 1 to two based on the official guide if we want to increase this value then we should decrease this value okay here so we should decrease the weight for example if you want to use eight we can use something like like 0.5 okay and produce amazing quality results only using five sampling steps this can also be used with image to image if we want to use the after detailer okay we should also duplicate the Lura inside after detailer so we can put the name of the face for example now this is an example of using after detailer as well we can see that the after detailer must also include the lur model in order to produce the phas even using five s sampling steps when we try to use control net okay we used Pixel Perfect and used normal Maps now not all all control Nets will achieve the same results some control Nets I tested for example the open pose it does not work so great with this uh with this methodology using smaller number of steps because control net often you needs more more steps in order to take control of the generation process now this is another example this is another picture and we generated this picture so using normal Maps normal map produces acceptable results now it's useful to note that the uh the lat consistency collection also includes a Dre shaper version which is version s in cooperated with LCM so we can download this model separately and use the same uh things that we do normally this is for SD 1.5 without the use of Laura so this will be like a full model but it R with LCM so we can generate we can generate images with lower number of samp steps so we can come to the dream shaer version 7 and download it just like any other model to the location of stable diffusion models uh I hope this video was useful and uh have a good day
Info
Channel: How to
Views: 15,189
Rating: undefined out of 5
Keywords:
Id: icZze060TiE
Channel Id: undefined
Length: 6min 22sec (382 seconds)
Published: Mon Nov 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.