ComfyUI - SUPER FAST Images in 4 steps or 0.7 seconds! On ANY stable diffusion model or LoRA

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody Scott here today we have a new Laura that makes it so that anything you put through it basically is done in four steps it's really easy to set up and it means that all the machines that have had difficulty running a lot of these other models can now run them a lot faster or maybe you could actually run it where you couldn't run it before we're talking about a latent consistency model or LCM and these have been around for a while but they're difficult to train they're expensive and they're not as flexible what we have now is a Laura that is adding in those attention layers that change the way the models are actually sample so we're going to show how to do that real quick and then you can kind of you can kind of play with it yourself but you can use this with any model you have including the 1.5 models or the sdxl models and you can also use it with other luras or in combination with anything you have basically to get it down to four or five steps now there's a couple caveats here first of all these are not going to be amazing they're not like wow the eyes are perfect everything is awesome no it's not going to do that but it's going to get it 80 or 90% of the way there so it's a great way to look through quickly and find something it's a great base and then of course you can image to image that from there so this is not going to be a Panacea for everything but it is a fantastic adaption to technology so again every day we have something new that comes out that changes everything and this is a great example of that so I'm going to walk you through how to hook hook this in your models it's not very difficult there are a couple caveats though be aware first of all that you should use a CFG between one and two if you use anything above a two it's going to get a little weird not to say that weird is necessarily a bad thing this just seems like there are scenes from a horror movie kind of sort of very dark uh kind of heads peeking around things a little weird and anything under uh one tends to look kind of uh illustration like so more like coloring book type of style which again may not be bad but it'll still adapt The Prompt but just realize that anything above a two is kind of considered bad the other thing to note is that if you're using a CFG that is less than one or one it's not going to really look at your negative prompt at all so if you're a big fan of the giant negative prompt just note that you're all that typing is going to go to waste if the CFG is one or less so keep it between one and two I set the these I think 1.2 1.3 in here so you can kind of see it let's walk through the diagram okay to get started here I'm just going to use a standard graph you guys should all seen this a thousand times but if not I'll walk through it very quickly as we modify it but basically I'm loading my checkpoint here we're going to take the clip and we're going to read the clip into both the positive and negative prompts here and we're going to read that into a case sampler uh with an empty latent image and then we're going to decode it and then make a picture from it so this is a very standard default workflow now some things to change here notice that we have the schedule name set to or the sample name set to LCM so lat and consistency model here and then the scheduler is sgm uniform now this you'll find that that some of these work better than others ddim uniform for example doesn't work at all uh with the S with with the LCM that I have found uh so I would just stick with this one and I'm going to keep my steps at four or five you're going to find that if you make it a lot higher it isn't like it's adding more detail it's more like uh changing the image completely and in some cases actually taking way detail uh so I would aim to use this between four and five steps and just kind of keep it there all right so how do we use this thing obviously we set the sampler here and for the most part this will probably work by the way I'm using the uh Juggernaut sdxl model here just because it's kind of a fun model um and it's got some great images in it but here we go and you can see we get something it's uh not quite great so what do we need to do well we need to load in that Laura we talked about so let's load in that Laura so I'm just going to add node loaders and we're going to load Laura and we're going to go ahead and change this one uh to the LCM now there are models for both sdxl and 1.5 and there's also one for 1.0 if you're using that older model uh so you will need to use the correct Laura in there and hook this up obviously just hook it into the model like you would normally um however I'm not going to use the clip outbound on this I'm going to go ahead and just leave it as it is um because the uh Laura here we're looking to use just those uh those layers to shortcut the process and I don't really care about the clip side of this in fact I think that this is almost a degradation if you use this clip versus just using the one right out of the model uh so let's do a few so you can kind of see how this works here we'll just uh run a couple then I'm going to show you something and actually kind of improve this even a little bit further let's just run three real fast you can kind of see how quickly this moves go that generated three images in the time it took us to generate not even a preview of one before uh so this is very fast and I'm really excited for this all right to get the most of this we're actually going to use a discrete sampling situation here so we're going to load model and then you're going to see you're going to look for model sampling discrete here and we're going to put this in the middle now we're doing this because some of the luras that we may choose to use with this uh use different training methods this csnr for example if you've done something where you use csnr or any other Technologies in here like EPs and so on to change how your Laura is created assuming you using more than one you're going to want to use this node for sure and then I'm going to just change this to LCM just to kind of keep it here now it isn't going to hurt us to leave it here but again if we decide to stack luras which you do simply by putting another Laura in here that's all you need to do uh then this will work just fine but putting this note in here is not going to slow things down but it will give us the ability to again use more than one Laura at a time so remember we want to keep our CFG between 1 and two ideally otherwise you're going to have some degradation there so that was 3 in images in the time it took us for us to talk about another image so I'm very impressed with this now is this image going to be perfect is it is it exactly what we want no it's going to need some love right we've got things with the eyes uh but talk about an image that was generated with literally no effort that's pretty freaking amazing and on a 4090 you're looking at less than a second in fact just a little over half a second to generate each image now from here we can take this and do image to image with it which is pretty simple simple we would simply take this and then use vae incode and then do this whole process again but we would not use this empty latent we would use the image to image everybody thanks for watching let me know what you do with this play with it give me some feedback I'd love to hear more I'll put the links to all the models and stuff down below uh so you can grab those and download them yourselves again if you have issues with this please uh post it on the comfy Anonymous uh git or the git of whatever node you're having trouble with and a lot of people uh post troubleshooting questions to this Channel's comments and I'm not the developer of all these things so I really can't help you there and some of these things we can all help together but um work with the developers on issues you're having yourself and once again like to thank everybody who supports this channel I couldn't do this without you guys thank you very much here's the Fantastic people who are sponsoring this Channel right now and I'd love to have you be one of them uh feel free to click the join button down below Everybody Take Care stay safe and I'll catch youall next time
Info
Channel: Scott Detweiler
Views: 18,488
Rating: undefined out of 5
Keywords: stable diffusion, stable diffusion xl, ComfyUI, stable diffusion tutorial, AI art, SDXL, comfy tutorial, sdxl tutorial, sdxl template, ai art tutorial, comfyui tutorial, stable diffusion beginner tutorial, LCM, latent consistency, lcm sampler, comfyui lora
Id: pw8eNpmhT5o
Channel Id: undefined
Length: 6min 53sec (413 seconds)
Published: Fri Nov 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.