ComfyUI: Mehr Details mit Noise Injection | Stable Diffusion | Deutsch | Englische Untertitel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

If you have used latent upscale, advanced ksamplers. then you have already used noise injection without realizing it. both make use of it.

The vid explains the process of adding noise fairly well although it is in german for those of you who hate subtitles.

The idea behind noise injection is that at its base level SD is designed to add and remove noise. to you and me, the noise it generates looks not much different from photoshops gaussian blur filter, it then rolls back the noise generated over multiple steps to essentially 'smart sharpen' the image into recognizable features. this is how SD functions normally and as a result the process is generally invisible us.

because of this behaviour we can 'game the system' by adding noise of our own, you can increase the level of detail of a resulting image, its best to use the kind of noise that SD understands for this so using latent upscale and advanced ksamplers is one of the best ways of doing it, because its noise the model can process well. but these often lead to large scale changes and require higher denoise levels because it adds a large ammount of large noise in latent space in these processes.

A good way of seeing this is to use a latent upscale and decode the output before sending it to a sampler, you will see a distorted noisy image, this is noise injected in the process to add detail. this is also why denoising of over 0.5 is often required with latent scaling.

The method used in the vid is making use of image space noise instead of latent space, which means there is often some tuning in required, interestingly, the vid uses just one of the many different kinds of noise generation which is available through custom nodes in comfy UI.

There are things like perlin noise, gaussian noise, power noise, film grain, static and so on. Vextra and WAS suite both have some great nodes for this, another one called Plasma noise or something like that has a bunch of more noise variations you might find useful for this.

The main issues with it are that image space noise may keep or add detail but it may also change the image color if the blending method is not tuned correctly.

to add some background on the process for those of you interested.

-edited because im not that much of an ass, sigh. social awkwardness fail.

heres an example of a process I often use. adding two types of noise and a gradient to a greyscale image.

https://preview.redd.it/obg1z1nh6ptb1.png?width=1125&format=png&auto=webp&s=5f1bfc48e873bbb7c3548511bc7662b0c6bb6fea

👍︎︎ 2 👤︎︎ u/Ferniclestix 📅︎︎ Oct 12 2023 🗫︎ replies
👍︎︎ 1 👤︎︎ u/mayoni5e 📅︎︎ Oct 12 2023 🗫︎ replies

Very cool. I've been playing with noise injection in my workflows for a lil while now.

However it's always cool to see how other people approach it. Your workflow here is interesting and has given me a few ideas!

And sharing is always appreciated! 👍

👍︎︎ 1 👤︎︎ u/mdmachine 📅︎︎ Oct 11 2023 🗫︎ replies

The add noise method does wonders adding detail. Any tips on how to include a lora into the process to get subject resemblance in the final product? Or maybe trained checkpoint is the best approach? Can’t obviously add lora to each sampler with full strength.

👍︎︎ 1 👤︎︎ u/Born-Caterpillar-814 📅︎︎ Oct 14 2023 🗫︎ replies
Captions
Hello and welcome to this video in which, as always, I want to exchange life time for knowledge. I had an idea or rather a thought about what would happen if I did a certain thing. And I want to show you that in this video. The outcome is definitely that we can control the details in a picture quite strongly without the help of LoRAs or the like. And I found that extremely interesting. And I called the whole thing Noise Injection. I haven't seen it before, read it, heard it. That was my own idea somehow. Which of course shouldn't mean that the others didn't come up with the idea either. Probably even. But I don't know if it really means Noise Injection in the jargon or not. But technically it actually describes quite well what we're going to do now. And since the wishes often go there that we build the workflow live in the video or I live in the video here with you together. Let's do that for the case now. That will be fun. I'll tell you that. And during the workflow I'll explain, of course, as always, what the thought behind it was, what happened there, etc. Well, let's get started. First of all, we need a loader, as always. We'll set it up later. We can already say down here. I would like to have a little portrait pictures at the point. And what we can do here in front is we can store the positive and in the negative we just write in what we want to have. Of course, you always have to adjust that a bit per motif. We now take a negative for all motifs that we test here. But it's also about the details that are created in this video and not the pure picture itself. Then it will all be clear to you. Okay, I'd like to have a concat up here. Then we take the Tiny Terra Nodes Concat. Pack them into the positive, because I would like to have the opportunity to hang two positives in here again. And we take a Tiny Terra Nodes Text Node here. We copy it once and hang it down here. No, that was wrong. Once up here, once down here. And that's how we concatenated both positives. That is, they are together. Well, I can take one of my prepared prompts. Let's take this one here. Let's put it in here. And as a stylistic prompt, let's take this one. It's nothing special. Cyberpunk Woman, Cyberpunk City, Neon Street, Lighting, Reflections, Leather Jacket, Short Torn Trousers. And as a stylistic description. Masterpiece, Absurd, Rest, Intricate, 8K, High Detail, Cinematic Scenes, Cinematic, Lighting. We still have our negative here. Next, as always, we need a sampler. But here comes the difference in the game. We take the Tiny Terra Nodes, not the normal Pipe K Sampler, but the Pipe K Sampler Advanced. We already know it from the Same But Different video. It has a strength. I'll put the sampler in here. So it has a strength. And here we can say at which step it should start and at which step it should end. So I'll show you that right now. Stable Diffusion generates a rustle of colorful points. And these points are refined further and further until our desired motif comes out at the end. And we can take a look at that now. I enter a maximum of 20 steps. But tell him at this point that he should stop at step 8. And if we say here now Return with Left Over Noise. Set our model up here. I'll take the Absolute Reality and the Stable Diffusion VAE. The rest can stay that way. We've already done that. Now he has to load the model. And I made a mistake. Of course, I also have to switch to Preview. So. And that's the noise. Or the noise that arises when you want to create a picture. And that was also based on the idea I had. And I'll show you that in a moment. But we're going to keep building here for now. We can now hang a second sampler behind it. Also an advanced sampler. So. And in this advanced sampler we say he should start at step 7. And that's the way it is. Then we have to see what comes out of it. I don't know exactly how internally the TinyTerra Nodes handle it here. Whether he then says when I reach step 8 I stop. So at the end of step 7. Or whether he still takes part in step 8. You always have to look at that a bit. But if we look at it here now. Then set the result. Let it run again. Then we see here that the picture is rendered to the end. And that's what I mean. I don't know how it is handled internally. We can also try to go up to step 8. Whether the picture gets better. No, it's getting worse. It's a bit strange. It's a bit strange how this behaves. But that's basically no problem. For what we have in mind. We do Return with Left Over Noise Disable. And let it run again. And now we get a decent picture. In the size out. The face is not beautiful yet. But that takes place in the upscaling process. Well, behind here we can then directly throw in an upscaling. We take the normal Hi-Res Fix Scale at the point. Throw the picture in there. Throw the VAE in there. Say here at the point which upscaler we want to use. This is the LSDR Plus. It is trimmed to real photography. We could also take the ArtStation 1000. That's enough for the demo here. For upscaling I would like to have the long time. And that at 1440 pixels. So the long time would be the height here. If we had landscape pictures now, the long time would be the width. But we won't change that in this video. Then we throw a normal sampler behind it. So not the Advance, but a normal sampler. Pull in our Pipe here. Pull in our Latent here. Say the denoise we only want 0.5. And take our sampler. The one we want. We can also say preview here. And with that we have built a normal chain. With the difference that we don't have one sampler up here. Who calculates the base image. But we have two samplers who calculate the pure base image. And the pure base image at this point is basically this here. So this intermediate step. What we're going to do right now. We will divide this path here once. We need a second advance sampler at this point. We take this one here. Then we put it here. We take the Pipe from up here. Put them down. And say at this point. In principle, we want the Latent from here. Now we have nothing but what we have up there. But we can copy our upscaling process back here. So the VAE in here. The image in here. Now we have two paths. Which are basically the same. So that we really get an equality at this point. I would still suggest. We pull that a little further away. And take the Seed from these two samplers. As input. Where is he? Where is he? The Seed is. What's his name here? It's not just called Seed, it's called Noise Seed. Okay. Noise Seed. Now I'm a little blind. Down there he is. And here also Noise Seed. We add a Primitive. It's in Utils. Primitive. Hang them up here once. Then he knows it's from the Seed type. Can clamp down here. And we pull that a little wider. Then we see that. But now we have. The two second samplers. With the same Seed fired. That is, we should now on these paths here. Get the same picture. And. Now we come to Noise Injection. At the point. We just saw. That. This picture. If we say. With Left Over Noise. Then that's just this. This colorful, bright. Rubber bears rumble. What then comes. And the second sampler. Refine that more. And if we just look now. For noise. Then we find here. Some options. We have here. For example. Image Power Noise. There we can. In principle. Look at us. What the stuff does. Just very quickly. I would do that too. Just pull down here. Then you can. Up here. Disable the button once. With Control M. Disable. And then we just look at us. The things. This is the Image Power Noise. We also have the. Image Perlin Noise. This is more so a bit. Cloud. What comes out of it. We have. The Image Voronoi Noise Filter. He somehow makes a few clicks. Here. This is what the whole thing looks like. So with this. With all these noise nodes. We can also. Create a noise. You can play around with it. This is a possibility. You can clap on it. But. There is also one. Node. Which is called. Image to noise. And I would recommend that. Let's pull up here. And then. But as I said. Down here. The three different variants. You can try it out. You can also play around with it. And that also has interesting results. For example. If you're a little rough. On the way. Or here. But that's the Perlin Noise. There are also very interesting effects. But we're taking the Image to noise node now. And what it does is. Moment. Now I have to sort myself again. Sort here. We'll do that again. We'll take that up again. We can now throw in an image down here. And. Pull it a little to the right. So that we have space here. So. So we can take the image from up here. If we now at this point. Our long-running sampler. Switch off. And we generate an image. Then the whole thing looks like this. Now we have with this node. Also produces a noise. Which is colored. To the original image. And up here you can still. Try a little bit. Play around. That doesn't make much difference. I'll go now. With 32. In the other. 32. In the number of colors. And in the Gaussian Mix. That's actually just how the whole thing. Is mixed through. Let's go in with 16. But you can play around with it. Okay. Now we need a second trick. And that's the one. There is one. If you're looking for Blend. There is a Latent Blend. And it comes natively with. ComfyUI with. If you're looking for it. It's here. Moment. That was before testing. Here is the. No, that was the wrong one. Before testing. There. Up there. Latent Blend. This is it. And. With that you can. Latents. Mix. So what we're going to do here now. Will be. I'll just do it again. So that it looks less confusing. We now have our. Our generated noise picture. And now we can of course say here. We want to encode that once. We take the picture. Encode that. We take our VAE from somewhere up here. Which is passed through the pipe. And say now at the point. We don't want the Latent. From. From our first picture up here. Directly in the background. We don't want to throw the sampler down here. But we take that. And throw it in here. Let's see if I can get that a little nicer. I think I was a little bit. Too hectic when pulling over. That's how it works. And. The second Latent. So what our noise contains here. We pull in there. And we pull the whole thing. Now as optional Latent. Once. Over here. So now we can go down here again. A little bit. A little push together. Everything. Good. And that's basically the noise. Injection. Which I meant. I delete the notes down here again. Away. Irritate me. That's what I meant. Because now we're doing exactly this. Noise Injection. We get up here. Ah. Not finished rendered picture. And throw on this finished rendered picture. Again this noise here. And. Let it be done. Calculate from the sampler. And. I would say. So that we have a little something. Nice to look at. Back here. I'm hanging here again. Quickly a face. Detailer. At the end. That's standard. Upscaling. Technology. We'll hang it up here. Once. So. Make it small. We take the sam model. No. No reroute. Clicked. Sam loader. So. We've already had everything in the. Face detailing videos. And now we're building. A. How should I say. Yes. Such a small. Preview. And safe area. Let's do it down here. Let's do a preview image. We definitely pull that. Bigger. Copy that to us. So. And we also need a safe image. Or I need that. For the YouTube thumbnails. Let's take the same size. But I'm just saving now. The. End. Guilty. Pictures. So. Now we have to take a quick look. How we can put that together. Up here. I would like the. Picture that gives us the original. Sample line. Down here. I would like to compare. The picture that gives us the second. Sample after the noise. Injection. And. Back here. Here. The first safe. I would have liked that. From up here. After the upscaling. Everything. And. Here I would have liked. The safe. After the face detailer. So. And in principle we can do that now. Let it run once. I'll let it go. Start as it is. Let's see if nothing crashes. There. Something crashes. See there. See there. See there. What crashes here? Image. Oh, sorry. Right. This is the image. What. Leads down here. So. We look again. Yes. Now it seems to be running. So. Now we have here. Namely. Our semi-finished picture. Which was rendered here at the end. We go up here now. First of all. The upscaling process. Ah. I made another mistake. But that's not so bad. I would like to have the same. Sampler. So. Exactly. The picture has now been upscaled. Now it goes. Our second path. Into the. Upscaling process. And now let's see. Whether we have everything. Well linked. And here you can see it very well. This is our original picture. Without noise injection. And this is the picture. With noise injection. And we can already see here. That we have much more here. Details in the picture. Get out. As in the original picture. And if you look at the whole thing. Upscaled again with everything. Then at the end. Then. I think you can already see. A clear difference. That the level of detail here. Has come out much stronger. A little negative effect. Of the whole thing is. That the picture is also a little bit. Becomes coarser. And a little bit. Contrast and so on. That's why I would recommend you. If you do that. Go to the end of your chain. Back here. And. I think they are called. Image filter adjustments. Exactly. They come from the. Was Node Suite. Hang them again. Behind. And then. Because we can say here. We want a little. Have less brightness. For a little more. Contrast. And a little more. Saturation. And not too much. But because of that. It's all a bit better. Or. The same. Then a little. The loss again. Which we get here. That. That we put this new one on top. I'll let you start again. Here. We now have here again. Our semi-finished picture. Once through the first. Sampler through. Are now in upscaling. You can also look at us down here. This is our semi-finished picture. Now the upscaling should come here. Yes. And now let's see. What the noise injection does with it. Where is he hanging right now? Oh, he's already upscaling. Has not refreshed the picture here. Oh now. Wait a minute. Where did I hang that? Did I make a mistake? No, right? Oh, he just refreshed the note later. Well, why not? Okay. So and here. Now you can see very well. This is our original picture. This is the picture with noise injection. Much more details again. Also in the background. The clothing has become much more detailed. The lady we have a little more. Worked up. With. Face detailing. And. We are now a little bit. Actually quite well. Got away again. From this loss in contrast. And in the brightness. If you are at the point. The details now want to reduce. Then you can do that up here. In the Latent Blend Node. Just turn the. Blend Factor up or down. Depending on what you are here. As one or two made. Or taken. I think if we take that from up here. And turn it up. Then he blurs less of the noise. So if you turn it up now. Then the details would sink. I noticed that it makes sense. If you are in the area. Anime pictures are on the way. Because they are then a little bit. Become coarser. There are also very good results. Out no question. But they become a little coarser. And that's why it probably makes sense. The Latent Blend Factor a little bit. Turn up or down. If you change samples one and two. Then down of course. Okay, shall we try another motif. Or we take the same motif. But a different one. Model. And indeed we take here. At the point. I take the Mistune Amethyst. The Mistune Amethyst is actually a pretty. Flat cartoon model. We can probably see that here now. So. So it's pretty straightforward. Works. But also pretty good. I hope. So it works pretty well. But now we are here. In the live recording. And. Of course, there is always a bit of luck. So we'll take a look. Down here, the upscaling has already gone through. It's a nice comic drawing. You can't say otherwise. Now he refreshes this note. Of course only at the end here. It's a bit stupid. But we should be here soon. At the high-scaled picture. There it comes. And here, too, you can see. That much more. Details have been added. The whole buildings are better worked out. The towers in the background were. Detailed again. And that with a model. What is actually trained on such comic pages. I think that's a pretty cool effect. We can do the whole thing, of course. Make with SDXL models. Or whatever we want. That makes no difference. I would say we change the motif once. So we can see something else. For example. Now copy everything. We'll take female cyborg astronaut. Walking in a space station. Over the shoulder shot. So I don't have to change now. I'll take the Absolute Reality again. Let it run through. And then I'll cut. There we have our result. Up here we see the little pictures again. The intermediate steps. Here, too, you can see very well. That with the new one. You can see them a little bit in here. Much more details have been added. But. Down here it is also. Much more detailed and better. The background is more worked out. The details on the clothing are much better. It makes a pretty big difference. Actually at the expense of. Almost zero performance. I think that's pretty cool actually. So let's take a look at an SDXL model again. For this I take a little higher. Promptings. Let's say 1024x768. We load the Juggernaut. And take the SDXL VAE. Of course he has to load first. That is clear. But I'll go down here again. And we wait for the result. There it is. We look at the end result. Once without noise injection. Pretty cool. We are in the SDXL area. But with noise injection. Much more details have been added. Everything a little better worked out. The rest is prompting. At this point again. But that. That makes for a lot more details. As I think. As a last example we take now again. Or maybe not last. I'll let it run through anyway. We can also take the DreamShaper again. Where is it? DreamShaperXL. We now take an astronaut flying into space. Did I write that right? Let's say very briefly. Like filing in space. So. And there they are. And. Here we can clearly see again. That the detail richness has increased. Especially here in the background. In the area of ​​the galaxies and so. As I said, if it's too much for you. Turn here at the point. The Latin Blends something down. And then it works. Also with less noise injection. So the last. We'll just stay with SDXL. There could be a few strange things. I didn't put in a lot of effort with the prompt. We have two cowboys having a gunfight in the Wild West. Now shoot out. We'll just stay with the DreamShaper. Let that run through. Here we have a semi-finished picture. But that looks pretty good. Shootout and so. The models always had a bit of a problem. But you can actually see here. How well the detail richness increases. Then at the point. Let's go through the Upsampling first. It takes a little longer with SDXL. Because we already have larger basic dimensions. Of course not back here. Because it's scaled down again. But the initial calculation. It takes a little longer. I'll get a sneak peek at our. Our noise injected picture. Throw. Let's see what the upscaling and the face detailer do at the end. Upscaling new face detailer should go fast. There are two faces in there. Let's take a look at the upscaled picture. Then you have to say. We don't have a face detailer in there now. That would have made the whole thing a little more. But it's about the details in the picture. And not about the faces themselves. But that's it. The outcome. With noise injection again. And I have to say. It's always the little details. That fall pretty much into the weight. Like back here, for example. We don't have any mountains. Here we have such a mountain silhouette. Got in the background. The dust has become a little less. We see more of the background. There's a table in the back. There are also a few utensils hanging here. Like a cowboy hat and I don't know. Empty bottles or something. While there was only an empty. Empty wall. The boots are better. Worked out at the point. He doesn't have his leg in the back anymore. But here. You can already get something out of it. Yes. Then let's summarize. So the important thing at the point is. We have to separate the Samplings here at the point. And then. Just a little bit of noise. In this intermediate step. Inject. Then blend the two results. Depending on the strength. As desired. Then let the picture be rendered. And then in a normal upscaling process. With what you want to have. I recommend back here again. The filter adjustments. To balance out a bit of contrast and so on. And then you get. Very good pictures back. Did I forget something? I'm just thinking about it for a moment. But I don't think so. If you have anime pictures. Probably a little less blending. But you will see that when you are in the area. Otherwise. I can't think of anything. It's pretty simple. But also quite effective. Workflow I load you up. I save now immediately after the recording. And then I wish you a lot of fun. Rebuild or. Analyze the workflow. Or just try it out. Have fun with your pictures. And we'll see you in the next video. Until then, take care. Bye.
Info
Channel: A Latent Place
Views: 2,918
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, Img2Img, Image to Image, Model to Model, Model2Model, Model Merge, Noise, Noise Injection
Id: Jy1wef3r44w
Channel Id: undefined
Length: 29min 49sec (1789 seconds)
Published: Sat Sep 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.