ComfyUI: SDXL Lightning | Stable Diffusion | German | English Subtitles

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
With SDXL Lightning, a new and very fast process for SDXL models has come out and I would like to introduce you to that today, because I had a lot of fun with it in the last few days and personally, I have to say, I liked the results better than the ones I created with SDXL Turbo and therefore welcome to this video, in which I would like to exchange a little bit of life against knowledge today. Yes, as I said, SDXL Lightning is a new technology released by ByteDance. I'll go back to the start page again. Of course, I'll put the link in the description and here we actually have everything we need to know. It's not complicated at all to use or to use. It's actually totally simple, but as I said, I had a lot of fun with it in the last few days and that's why I don't want to keep you up to date. We're going to build another workflow in a moment. I'll show you which variants you can use. So first of all here to the Hugging Face page. You can look at the scientific paper here if you are interested in it. Otherwise it is quite interesting to see that the whole thing is based on StableDiffusionXL 1.0. So that's the SDXL version of Stability AI, which is also based on Turbo, but a new variant is being released here. There are different possibilities. There are checkpoints for one step, two step, four step and eight step procedures and here it is again mentioned that the two, the four and the eight step models work very well and the one step model should actually be viewed more experimentally. That's why we're focusing on the eight step model here today. You can download the others and play around with them, but I think eight steps is pretty cool for SDXL. And yes, we will continue to offer the checkpoints here. I'll go in there in a moment, as well as LoRAs. And with LoRAs it is of course super interesting, because through the LoRAs we get the opportunity to provide any SDXL model with such a LoRA and then also to be able to benefit from this eight step, four step, two step variant. That's pretty cool, it works pretty well, I tried it out, we'll go through it again in a moment. So otherwise here comes a whole lot of Python stuff and if you scroll down further on the page, you will also get a little guide where all this should go, as well as a ComfyUI workflow so that you can get started there. Of course, I'll put the workflow we're going to build in the description below, you can also use it very much. So let's take a look at the files and versions and what we have to or can download here is that these are the checkpoints. So, so to speak, SDXL base checkpoints with the Lightning technology provided. I didn't download them because I'm interested in base models actually less for image generation. I prefer trained models, so I didn't download them. What I have downloaded, however, is that here these LoRAs, there is the two step LoRA, there is the four step LoRA, there is the eight step LoRA, there it is, I downloaded it and you just pack it as known in the LoRA folder of your models in the ComfyUI. I have it stored with me, that's why it looks different, so that would be Models and LoRAs here, that's where it came in. Here I made an folder for Lightning and here they are all in and the checkpoints, so here this one step is experimental, they mentioned. If you want to play around with it, feel free to try it out, I didn't do it, but otherwise we have the two step, four step, eight step here, the eight step unit safe tensors that come into your checkpoints folder. Here I have something else, I'll get to that in a moment, just so you know where you have to pack it. And yes, introductory is still said, it now starts on CivitAI, I have already filtered here, you can filter up here with this filter button, here you can for example then indicate that you only want to see SDXL Lightning Checkpoints, then you come to the page, it's not that much yet, but it's already doing a little something and I downloaded the Juggernaut XL for it. Here there is a V9 plus RD Photo 2 Lightning 4S variant, which I downloaded, that was what you saw here in my Checkpoints folder, here under Lightning Juggernaut XL, I'll show you that in a moment. Yes, it's a really cool variant, down here we'll take a look at the settings again. Here we can see that it is usually described how to use it, nevertheless, after a while, pre-trained checkpoints are already running, but we still have the LoRAs with which we can apply the whole thing to every SDXL model. So let's just start, I only have a node up here, I saved a few prompts that worked quite well and we'll start with a basic setup. No, then my node is gone, I'll start from the beginning, we'll say load checkpoint. First of all, I would like to load a normal SDXL Checkpoint and I'll take Fenris XL, then of course we need a positive and a negative. Negative we can already enter text words and as a positive we take the first positive that I have up here, then we are already quite well set up, we need a case sampler. We put it on Euler and SGM Uniform, that is also recommended somewhere that you should do that, let's see if I can find it quickly. Here please use Euler Sampler with SGM Uniform, of course we stick to it, let's put the whole thing together here as a latent image, namely from the Comfy Rolls, once aspect ratio SDXL, connect that with the latent up there. And we say here already a 3 to 4 portrait and now we need a VAE Decode and a save image. Yes, and I'll call the whole thing Lightning, so that I don't get lost and then we can actually get started with it. So I'll start it once so that the Checkpoint is loaded, we're still in SDXL mode, I have to install one more thing in between and that's of course the LoRA and here I say LoRA Loader Model Only. And here I can then, if I filter to Lightning, that's right here in the front, these are the folders where you have just seen in the directory that I have set up, that helps you to filter quite well. SDXL, if I want Lightning now, I say Light and then we get it. So here we take the 8-step LoRA, we have to marry it with our model for the next run and then we can do the sampler settings. What is to be noted here? So first of all, we have an 8-step LoRA, so we also go down to 8 steps. The CFG must also be quite low. I noticed when testing that it is best if you start with 1.1 and the whole thing still works quite well up to 1.5. And that's actually it. We leave the new ones at 1 and I'll just wait until the first run is through. That's still with the pure SDXL model and 20 steps, but you can see that it takes a long time for me, so let's wait a short time and then we'll continue. So here we go. I just cut the silence a bit so that you have a feeling of how long it took to create this image here. This is Fenris per normal SDXL and now I take a Fixed Seed. Well, it will change, but it doesn't matter. Now let's load the LoRA again and then take a look at how fast it works with 8 steps. I mean, we had 20 steps before. We are now in any case below half of the required steps. We will get a different picture. I'll just open the quality comparison option. Now it starts. And there we have our result. And that's what we've done with the Lightning LoRA now. Of course, this is a different picture, but I would say qualitatively it is of course a bit different. Of course, if you have the opportunity to use SDXL with full steps, you should still do that. However, I still think the lightning results are pretty, pretty good. And now let's go to increment and take a look at a few results. Oh, he's missing a leg. Then I got an arrow to my knee. I still think it's very, very nice what comes out of it and it's just very fast. You have to consider that we are in the SDXL resolution here and the results are pretty nice. If we go to fixed now and run through a picture. I'll just pull that down. Then we can take a look at what happens when we screw around the CFG. So we are now at 1.1. If we take 1.2, it becomes a bit more contrasty in terms of experience. I don't even want to say it's more detailed. It changes, so it's worth it to screw around the CFG here depending on the model and so on. There you get other results, but they are not necessarily worse or better among each other. Let's take a look again for the motif. Maybe we can go in with 1.3. It's already a little bit more detailed. I also noticed that colors and contrasts come out better when you turn it up a bit, but again as a starting point, you can always vary a bit between 1.1 and 1.5. As upscaling afterwards, I also used it quite a bit, namely I just load an upscaling template. This is my standard upscaling template actually and say now I want to convert it into a group node with the name US for upscaling. Then he mutters briefly because the name still existed somewhere in the memory. So we connect the VAE, we say we want to take the samples in here, we take a second sampler, make CTRL C, CTRL V, you see down here, so that the connections stay. However, we have to hang the latent over here once and then we can hang the save image up here. I'll take a preview image up here and I'm thinking about it right now. Yes, we'll leave it that way. I want to scale the whole thing up to a height of 1080 and keep the proportions with it. If we set it to zero and only enter 1080 down here, then the proportions will be kept. I'll take another VAE decode, hang it in here and that will be our save image. By the way, I have examples from the beginning of the video that were often upscaled to a height of 2880. I had a lot of fun with that. But I can't do that in the recording. Then OBS mocks me and I've already screwed up a recording recently, which I have to do again. Unfortunately, I'm thinking about switching to a 2 PC setup to record here so that we can see something like that live, but I don't know that yet. So now we are down here with the upscaling sampler and here I like to do it so that I say I only want to have four steps again and a CFG of one. That makes it even faster, because as far as I know, the negative is still taken into account with 1.1. Only the positive is half-knowledge, which I picked up somewhere, but if that is really the case and the negative is not taken into account, we get a little bit of a speed boost here. And to make the whole thing work, I say here I want to have a second LoRA loader. I make it a little bigger so that you can see it better here and here I take the four step LoRA from Lightning and I hang the whole thing down here. So, of course, we have to take our original base model from up here again, so I somehow get it nice. No, it's different, but yes, we have it a little bit like that. Now we have our four step Lightning LoRA hanging in between, which goes into the upscaling sampler and we can try the whole thing again. But I have to take a different seed than the one I have in the base model and now we let the whole thing run. With the denoise we have to go down pretty hard to 0.15. That worked pretty well for me. The higher I set it, the more artifacts I had in the picture. That was a bit ugly, so feel free to try it out, but 0.15 is actually a pretty good value in upscaling. Now we're still loading our LoRA, it's already in there. Our grouped upscaling nodes are rattling. When does the sampler arrive? Now the RAM is being shoved into the VRAM. Then make a sampler, like now. And then let's take a look at the whole thing and we now have a height of 1080. Does that even make sense what I'm doing here? Oh, we've increased it by 30 pixels. Of course that doesn't help. I'll try it with 1440. I hope the recording doesn't smear me. Let's take a look at OBS for a moment. No, that's still going quite well. 2880 would be difficult. And that's our upscaled version. I think it's absolutely cool. So you get really cool stuff out of it, especially if you really pump up to 2880 or something. However, in order to achieve 2880, we would have to take part in a VAE decode here. We can enter a size of 1024 here, hang it around and do it like this. That's better. ComfyUI automatically makes a fallback if a VAE decode doesn't work or a VAE encode in this case also makes a fallback to this tiled node. But we can also install it directly here like this. That doesn't do much, except that we save ourselves an out of memory error. Yes, that's the variant. I'll take another new prompt now. I'll copy it over here. A cute little cat widely playing with wool in a kid's room, Pixar-style 3D-rendered Disney cartoon. We'll let that run again now. So it goes through our upscaling. That's actually, I would say, the bottleneck now in the workflow with SDXL Lightning, because it takes the longest compared to the pure generations. And we'll take a look at that. And here, too, I think you get pretty cool, detailed results. From time to time you have a bit of bleeding. I'll take a look. Sometimes a shape in the background changes. No, that went quite well. But I also think the results are absolutely beautiful. You can have a lot of fun with that. So that was the one variant, namely from a normal SDXL model. You see, we used Fender's XL here and an 8-step LoRA for the base picture and a 4-step LoRA for the upscaling in the follow-up. Of course, we can also take a trained Lightning model directly and I said at the beginning that I downloaded the Juggernaut for once. We can also make a little more space. So what we don't need at this point are the two LoRAs. I'll put them on bypass with control B. That means the model is simply sanded through here on our two samplers. And now let's take another look at how we set it up best. Juggernaut XL. That's here. Let's take a quick look at the description. And we have four to six steps and a CFG of one to two. So here we can also play around. Two I always find a bit high. Could try it out. Depending on the model, training will definitely come in handy. I would move between 1 and 1.5, as I said. So the sampler should be DPM++SDE. We can set that up. DPM. That's the one here. DPMPP 2M SDE. DPM++. Not 2M. Where is it? There. DPMPP SDE. Let's do it for both. I was just a little blind. It was a long day today. If necessary, we'll just go back to Euler. And if something like this is written here. Four to six steps. I personally always think to myself. Come on, it doesn't hurt if we take the maximum, which is specified. CFG, let's leave it that way. And I would say we can just try it out. I'll let the model load. And there we go. Now we are on the road with six steps. And get pretty cute pictures here too, as I think. And these are really already trained models and they are better suited for normal ticking. For such a picture generation. So let's take a look. Absolutely clean or not. So I'll do another seed. Let's take a look at the next picture. That's really cute. That's what I mean here. That's a bit of the bottleneck now. It feels like the upscaling process takes the longest, so longer than the sampling process. Yes, it's a bit grainy. But that's okay. We'll just look again at how Euler behaves. Because we are now following the settings of the model. While, however, the manufacturers of Lightning say you should use Euler. So let's take a look. I can't really say it honestly. I personally think Euler is a bit better. But you can play around with it. My tests were also only designed for Euler. That has always created really cool things. So let's take the last prompting here. So video game RPG tabletop figurine of Super Mario. We'll go through that too. Still with the already trained model. Ah, there's the hand broken. I'll do 9 again. Of course I have to give a new seat for that. No, Mario is not red either. I'll go to increment now. You shouldn't be down there. Ah, then the upscaling does it again. You shouldn't be down there. Ah, then the upscaling does it again. Completely wrong clothes on here. So what is that? Does that fit or is he flying? He flies. What? Mario? At least seems to have fun with it. Let's leave that for now. Even if I think Luigi bleeds in there a bit. These are also loveless prompts that I have here right now. But here, too, I find the quality pretty good. It's sharp. You actually have nice textures. So that's what I mean by that. You can definitely have fun with all this lightning technology. What is he doing here? Oh, he's got a transparent set-up back there. Yes, that's possible. Okay, I'll let that go through. So I just want to take a look at that again. Yes, actually turned out pretty good again. You can adjust the background by prompt. That's not a problem at all. Yes, and these are the different variants for lightning. As I said, either you download already trained community models on civet.ai. Or you download the base models here. Where base models are actually only the basic technologies. We know that by now. Or you download the LoRAs. Which you can then easily combine with a LoRA Loader Model Only. And if necessary, you can then apply it to your computing steps. Yes, IP adapter works here, by the way. As usual, you can use it and hang between the models. But I noticed that if you use the IP adapter. It generally needs a little more steps when generating normally. More steps than if the model is used natively. So if you have 20 and connect the IP adapter in between, you'd better go to 30 steps. And here it is also my experience. If we now have six steps here in the example. You build the IP adapter in between. Goes up to eight steps or so. One or two steps you should still give the model more. So that the IP adapter can also have an effect. Yes, I said it's not hard to use. You would have to know a few little things to set up. But then you can have a lot of fun with it. And I hope you have a lot of fun trying it out and experimenting with it. We'll see you in the next video. Until then, take care and bye.
Info
Channel: A Latent Place
Views: 1,089
Rating: undefined out of 5
Keywords: ComfyUI, Stable Diffusion, AI, Artificial Intelligence, KI, Künstliche Intelligenz, Image Generation, Bildgenerierung, LoRA, Textual Inversion, Control Net, Upscaling, Custom Nodes, Tutorial, How to, Prompting, Lightning, SDXL
Id: AxnzWB9pRsg
Channel Id: undefined
Length: 27min 8sec (1628 seconds)
Published: Wed Feb 28 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.