ComfyUI: Nodes | Stable Diffusion | Deutsch | Englische Untertitel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello and welcome to the second video on this channel and as discussed, we will take a look at the nodes here. We will not go into all the nodes that are aVAElable now and we only have the standard installation at the moment. There are still a lot of custom nodes, but I will probably dedicate a separate video to custom nodes, where I will also introduce a few custom node collections. Probably one per video. Let's see how I build it up. In any case, here we will first try to get a bit of an overview of the nodes. So a node is such a thing here. Every node has its own purpose of use and we will go through that. If you want to get involved with the nodes, I will post the link to the ComfyUI GitHub page in the description below. It's a bit hidden here on this page. If you go to the page here, scroll down a bit, you will find a link for ComfyUI examples. Click on it. Then you come to this page here. Here you have examples, i.e. workflows from ComfyUI, which are presented directly by the developers, such as image2image. The whole thing looks like this. You can also import images directly into ComfyUI. So here you can import these little images, drag them in, then ComfyUI will build up these workflows for you. But here you also get a description or a display of how the nodes are built up to achieve the result that you see here in these examples. I'm just looking, are these new examples? I don't think I've seen them myself yet. Ah, outpainting, interesting. Unfortunately, this is a small problem with ComfyUI. You don't really get patch nodes. Updates are thrown out and you don't really notice them if you don't follow them. That's why I'm a bit surprised that in the inpainting area there is also outpainting. I've already tried outpainting, so if it doesn't work for me yet, I'll have to try again. But whatever. What I wanted to say is, here you can see how you have to line up the nodes to achieve certain results. And down here, quite hidden, there is a node guide. Work in progress. And if you click on it, you get here. And here you will find a description of the nodes. Here under core nodes, you can see all the sections through which we will click through a bit. In ComfyUI itself, so not here, but here you can open, find the different points and find here at least a little description of what this node should do. For example here, load a diffusion model from diffusers. The input, the output. What it is good for, what you can combine with it, so which nodes. Something like that. I really needed a bit to find this here. It's a bit hidden, but I've told you now, you can find it well now. Conditioning combine again. We'll get to that too. With tips. Well, whatever. So, to add nodes, you can do the following. You right-click and you can add node. And then you see the different sub-items here. What you can also do is double-click and then this window opens. After a double-click, here in the left text area, enter something and the UI will show you all the possibilities where your keyword is available. LoRa, for example. LoRa loader. Checkpoint, you just saw that. There is nothing in it. All nodes that are aVAElable will be displayed. The second drop-down menu aims at the input. If I choose Clip, for example, I see all nodes that use Clip as input. Clip is a data type here in this case. I'll say data type. These are the, for example, Clip text in code. That's the node up here. Again, again. It disappears when you move the mouse pointer away. You see here, Clip is the data input type. The second drop-down here is the data output type. That means if we click here, we get all nodes that have a Clip as output parameter. For example, the Checkpoint loader which has the Clip outbound here. If you take both, Input Clip, Output Clip, you see, for example, both have Clip. SetLastLayer, for example, has Clip as input and Clip as output. Let's delete it again. These are the two ways you can add nodes. Otherwise, when you right-click, you have the option to choose Add Group. This creates a group and such a group can be used for this. For example, if you drag it over these nodes here, then you group these nodes and move all nodes in there with this group. We can add a second one. No, Add Group. Let's sort this a bit. Drag it over these nodes and you can move groups separately from each other. You can also add an Edit Group. You can give it a different title. This is, for example, Title 1. If we right-click here, Edit Group Title, Title 2, and you can even give the whole thing different colors. This helps in the end to get a better overview or to be able to remind you again what the block I made was for, what it was for, etc. With Edit Group Remove you can then also easily and easily remove it. Let's go through the context menu with Add node. Right-click, Add node. The context menus open here and there are categories to find in which the most different nodes are. Here are the samplers, for example. We have one here. Here are various loaders. I've already read LoRa. I'm not through with all of them yet. I haven't used all of them yet, but it's good to know that ComfyUI also offers this option because many tutorials only deal with Automatic 1111 and I've noticed that a lot of what is possible with Automatic 1111 is also possible in ComfyUI. That's why I think it's good to get through here. Where were we? We were in Loaders, Conditioning. Conditioning means here is the area where text prompts and so on can be found. Here, for example, the ClipTextEncodePrompt. That's this one. We'll need that too. ClipSetLastLayer is also very interesting for some models. ConditioningAverage I don't know what it does, but I can click on it. That's To and From Conditioning and in what strength. I don't know yet what comes out. I'd have to try it out. As I said, it could be that ComfyUI updates and suddenly there are completely different nodes. Unfortunately, there are no patch nodes, as I mentioned at the beginning. So nothing where you can really see what's new. Unfortunately, you always have to compare a bit. ConditioningCombine and Concat I haven't found the difference yet. I've been using Combine so far. I don't know yet what the difference is with Concat. I'll have to see if I can get it to work in the debug console. I don't have any custom nodes installed yet, at least not here. Well, one after the other. Not too much. There are many possibilities and we have to get there slowly. I've only tried that with other custom nodes. Here you can choose certain conditionings for certain areas. For example, if you have a picture that is 512 by 512 pixels like here, then you can say with the conditioning that with the x-coordinate 0 and the y-coordinate 0 in a size of 64 by 64 pixels, something special should be rendered. But there was a custom node that still represents that graphically. I found that a little better. And otherwise, Control Nets, as I said, one after the other. Latent, here we are in the VAE area. Decode, Encode, we get through. Inpaint, not really tried yet, or already tried. But I didn't think it worked as well here in the ComfyUI I hope it will be retrofitted. Or I did it wrong. That can of course always be. That's why I'm looking forward to an exciting exchange with you. Badge, also not tried yet. For Badge, I always have the feeling you need a little more computing power. That's why I left my fingers off it. You can manipulate the latent images, rotate, rotate or crop. Post-processing, I've only ever done it directly on the image level. VAE, Decode, Encode, we already had. Empty latent image, that's this one. Upscaling, we'll get to that separately. Also image upscaling, we'll get to that too. I'll make a separate video for upscaling. Post-processing, yes, there are also better nodes for that, where I only use one. Which does a little more post-processing, i.e. contrast, etc. Otherwise, there is already a bit of image sharpening and stuff. Save image, we see here. Preview image is the same as save, only that it only makes a preview, but not saves. Load image, you need for image-to-image, for example, invert, turn it around. Pad image for outpainting, I still have to research in more detail. Masks were my attempts not so successful yet. It bothers me a bit that you can't paint masks directly in the ComfyUI. I think Automatic 1111 is still a bit better. Although I think there are also custom nodes here that make it possible to paint a mask directly in the node. Otherwise, the only way around here is to create an image, download or save the image, open it in an image editing program, paint a mask there and load the image back into the ComfyUI via load image. But that's a bit cumbersome. Advanced There are a few interesting nodes here, we'll get through. Deprecated diffusers loader, interesting. Here are a few more loaders, a few more conditionings. We already had conditionings here. In the advanced area there are more. I found it interesting that suddenly text encoders for Stable Diffusion XL popped up. I had a Stable Diffusion XL workflow with normal loaders. I have to see what the difference is here. I don't know yet. Model Merging I find that a very interesting point. Here you can merge different models together, i.e. mix them and then get the results accordingly. Brings quite amazing results. I will probably also deal with it in a separate video. The area for testing shouldn't really interest us that much. Whereby here there is the VAE encode and decode shared. This is very good for larger images. However, I have upscaling workflows that I use that don't use this. I do this with a control net and an upscaler model. I get very good results with it. I would also have to look at it separately here. In any case, in the utils we have very interesting things. A node, you can write something in there. You can make dots here if you need it. Oops, wrong here. Reroute is also very interesting. Reroute is just a looping variant for certain nodes. But it helps amazingly well to get an overview of larger node constructions. For example, if I now say we want to load image. Beautiful picture. Example.jpg. You can just put that in here. And if I now have nodes in the background , maybe we won't save. I don't want to mess up the folder. Although I don't let it run. But for example preview image then you can connect this here. However, we can now create as many inputs as we want from the type image and drag it in here. Of course, it also works directly from here. That is also clear. However, this reroute function has pretty good and practical application functions that you can then appreciate when you come by. By the way, select a node, remove, press delete and the nodes disappear again. And there is the primitive. Primitive is also very good. Primitive is very nice. You can already see connect widget to input. For example, I could say here how do I do that now? I'll just make a copy of our sampler. We'll be right back rebuild the construct as it is here again. So you can see how it connects. But for now this sampler. And now I'll show you something else. You see all these text fields down here. This is such an input field here. This is the width in this node, the height in this node, batch size, but also the seed, control after generate, no matter what. You can right-click on this node. You can, for example, say we want the seed not in the node but we want it as an input. We can do the same here. Convert seed to input. Now we have the advantage if we now connect this primitive node with the seed, we have a seed here. Now we can say randomize here. Then a new seed is always generated here. And the advantage is that we can now control both samplers with the same seed. That means if we want to take a closer look at a picture or want to see how different models with this picture and deal with these conditionings, we just say fixed. The seed is fixed. And we can operate different samplers with the same seed without the samplers generating the seeds themselves. And that works for everything here. We could now also say we want the steps as an input. Steps to input. Steps to input. We create a new primitive. Let's say this is now steps. And with this we can feed both samplers with the same number of steps. By the way, I just noticed that you can set it up and down with the arrows here. You can click on it and drag it to the right or left to increase or decrease values. Or you click in and can specify values yourself. Yes, a very nice thing actually. Let's clean up here quickly. We don't need all of that. I right-click here and say I want to put the seed back into the widget and I want to put the steps back into the widget. And then we have restored the original state. You can also right-click on the node and enter your own name here. Own description. I also have to think of my English speaking viewers. You can miss all the other colors. You can resize it. Ah, resize doesn't seem to work. But you can make it collapse, so make it small, make it big again with collapse. You can pin it, the colors, you can also change the edges. It's actually more play. Round. And some custom node collections also give the whole thing other options. But for now, here you can select again properties panel, so what you right-click, you can display again via properties panel. And node name. KSampler. Okay, I don't know what it does. Well, I would say we're going to rebuild this model so you can see the workflow. We delete everything. We have this light blue border here. Do you know why? It always triggers me a bit, because my node constructs always overlap over it. And then I have something overlapping over edges and then it triggers me. So we can see it makes the workflow empty. And now let's get started. The first thing we need is a loader for checkpoints. Load checkpoint. So we have it here now. We only have our last video downloaded stable diffusion 1.5 model in here. More will come. Then we need the text prompts under conditioning. We need a prompt once. We remember for positive entries as well as for negative entries. Here I did ctrl-c, ctrl-v to copy it. Okay. These nodes we see need a clip as input. Our load checkpoint has a clip as output. So let's just pull the nodes over here. Connected. What we need now is the sampler. Sampling KSampler. We also have a KSampler advanced. It offers a few other possibilities. We don't need them for this run. Here you can say for example I want to render 20 steps in total. It's supposed to start at step 0 and it's supposed to end at step 10. I can show you what that does. We also have to return the leftover noise. I'm going to push it down here so it's out of our way. Then I'll show you the KSampler advanced. We'll continue with our work here. Conditioning. We said up here it's going to be positive and down here it's going to be negative. Let's pull that on the corresponding nodes. The sampler needs a model. That means we can pull the model over from here. The only thing we're missing now is a latent image. Let's do this search. Latent image. Empty latent image. That sounds good. Here we have our size again. We'll leave it at 512 by 512. Although we can also say in height we want to have 630. By the way, it always automatically adapts. 630 doesn't fit. The next fitting point is 632. Fits for me. Okay. If you click on a node, you'll see the outgoing connections to other nodes. If I click on the text, there's a connection over here. If I click on the sampler, there's a connection to all four. What we get in the end is a latent. We want to have an image here. That's why we need a decode under the area latent. We want the image from the latent space into a real image again. By the way, a VAE is also a small neural network which handles built-in and decoding. There are different VAEs, i.e. neural networks, which are then trained for certain image coding. From Stable Diffusion or Stability AI, there's one that I'll show you. It came out later and gives a little better image generation. What I also use is for animes or so. There are also specially trained models. I have two that I actually use and I'm quite satisfied with them. Our VAE decode now wants samples. That's a bit unfavorable, I think, because we have latent as output and samples as input. You can actually take a quick look if there are samples as input here. No, there isn't. But there is latent as input and here we also have the VAE decode. Interesting. I think the guys from ComfyUI need to upgrade a bit, but at least we can see that the colors match. What the VAE decode node also needs is of course a VAE itself. And we can pull that over from the checkpoint and connect it. That means the VAE decode node uses the VAE from the checkpoint. There is also a VAE loader. We haven't installed any yet, so we can't choose anything here. But if we had already installed VAEs that shouldn't come from the checkpoint, but for example we want to use the Stable Diffusion 1.5 model with a VAE that was trained for anime, we could load it here and pull the node over here and give the decoder another VAE. That means he would use this sampler with this model to generate a build in latent space, but would then use our trained VAE to decode the build and then generate an image at the end. But we don't want that now. We haven't installed any VAEs yet, so we pull this node over here. And last but not least, we want to save our image. We do that under image, save image and here we have our save image node, connect image with images. It's not quite consistent yet. If you think about it it's not quite consistent yet, but already much better than at the beginning. I can tell you that. And after we've done all this, we can actually go to I'm also a bit of a order fanatic. Sorry, we'll probably have to get used to it over time. We can definitely go to generate this. And what would be a good prompt? Let's try it with a house at the beach. So that's the positive prompt. Negative prompts you don't necessarily need with Stable Diffusion 1.5, but they do help to exclude certain things. From 2.1 negative prompts are more or less mandatory. But I always go and use negative prompts for 1.5 variants. And the example from the last time had text watermark. There should be no text generated. There should be no watermark on the picture. And I think we can try something with it. I just had to think again whether there might be a bad picture coming out, but I can cut the video at the end. Stable Diffusion 1.5 had, I think, not yet a Not Safe for Work filter. That came with 2.1. Well, let's start and see if ComfyUI brings us errors. Before I do that, if you make a check on extra options, you can still tell how many pictures should be generated. You can do that with the slider here, through input or with the mouse wheel down. And you can look at the queue, which you generate here with Queue Prompt. Which job is currently running and how many jobs are still in the queue. That's very practical if such a picture generation takes 2 minutes or longer. Then you see, for example, picture generation takes 2 minutes. I still have 5 jobs in there, so in 10 minutes my pictures are generated. The model is loaded. The model is loaded longer. There the prompts went through. Our picture is generated and we have created the picture. What is that? That's a house at the beach. That's correct. I'm just looking at the image size. Yes, it's not quite portrait yet. Let's put a few more things on it. A few pixels in height chase another generation through. What I noticed is, if nodes don't change, ConfiguID doesn't load either. It started directly with the sampler because nothing changed up here. The checkpoint stayed the same, the prompts stayed the same, the latent image stayed the same. Only from this point in the processing chain does something change and a new picture is generated. That's why ComfyUI also enters here. A house at the beach. Yes, that's daring, but it meets the description. We still have our advanced sampler down here. What I wanted to show you here. We had already set here, we want to render 20 steps. That's the same as up here. But we set that it should stop from step 10. To run these two samplers at the same time or one after the other, but in one run, we simply connect the corresponding nodes. Positive with positive. Negative with negative. We also need a latent image here. We do ctrl-c, ctrl-v for a VAE decode. The samples in here. Now I can show you what the reroute is good for. You could say add node utils reroute. Take the input from the VAE up there, pack it in here and then you can distribute the VAEs a little more clearly here. Let's push it over a bit. Then you can see here not that both come from the back, but one slides through here in the background, but here on both sides come the VAE nodes. We'll do another save image. Now we have two samplers here that have the same inputs, but not the same output, because this sampler here stops from step 10. I'll do prompt. So we got new images. You see what happened down here. He stopped at the image generation from step 10 and that ensures that you have the possibility to put this image back in another sampler, which is then further processed, but possibly with another model. You can already see the possibilities are quite large. I used this, for example, to generate a base build and then later said, the origin was generate me a person. I only rendered this person a little bit and then I went through further samplers and said okay, this person now has a European origin or an Indian origin, African origin, Asian origin. And so I had four to five samplers who all worked with the same base image, but the last fine-tuning in a different way have finished. And so you had the same picture, but with people of different ethnicities. That was a test that I once did and found pretty cool. What we now already see here. He should stop at step 15 and start again. Now we can see a little bit better if we look at the half-finished picture. Or three-quarter finished picture in this case. See that it is different than this picture. And here we can now, for example, I'll just make a little space here. So we push these nodes over here a bit. And now, for example, there would be an application case where you could say he should convert the seed into an input. Where is the seed, seed, seed, new seed? It's called differently here, it's called new seed and here it's called seed. I hope that works. Because now we can say here utils primitive and we say once a seed and here also a seed. Yes, both are data type integer, he has now recognized that. And we say here once fixed. And now both samplers are fed with the same seed. That means we should now at the end get the same picture twice. Yes, you see, rendered once finished. And once three quarters rendered. That's such an advantage that this primitive brings with it. Good. If you are now satisfied and finished with his workflow, I'll show you that too. You can press save. You can enter a name up here. How should we call that? I'll call it stupid video 2. Say OK. Then, depending on the browser settings, I have set it so that my browser should tell me or ask where I want to save the thing. I always do it like this. I make a folder in the ComfyUI folder. I don't know why I always have to press refresh. Presets. A little slow. I don't know why. And save video 2.json as a preset. If you click on load then you can load this json again and the node is created. We do clear. Yes, I want to delete the workflow. I do load. I say video 2.json. If that happens, if it doesn't work, it's actually nice that it happens here. Video 5. Once in the browser, refresh and load it again. Interesting. It's a little slow here. You can load it again. I think I have to restart my computer. It's taking something bad from me that it's so slow in the background. But it works. Normally faster. Good. I think we've learned a lot again today. And in the next video I have to think about what I'll show you then. I don't know yet. But with the basics you should be able to do a few more steps here. To connect a few nodes. To try a little yourself. Just share your successes or failures with me. Then we can talk about it. See you in the next video. Until then. Bye.
Info
Channel: A Latent Place
Views: 1,316
Rating: undefined out of 5
Keywords: ComfyUI, Stable Diffusion, AI, Artificial Intelligence, KI, Künstliche Intelligenz, Image Generation, Bildgenerierung
Id: Y9WoGfYtNNY
Channel Id: undefined
Length: 35min 54sec (2154 seconds)
Published: Fri Jul 21 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.