[ soy.lab ] KOHYA HIRES.FIX 사용해서 고해상도를 자유롭게 사용하자! #A1111 #comfyUI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello, I'm Choi Donhyeon of STABLE DIFFUSION KOREA SOYLAB. Nice to meet you. Recently, a new extension called Kohya hires.fix was released, and I would like to introduce you to the news that you can make good results by using related content. This time, I'm going to explain both the A1111 platform and the CompyUI platform, so please enjoy it. The story begins here. In A1111, a developer named Kohya created a new hires.fix. And the content called Deep Shrink was uploaded to Reddit. To find out more about it, I looked up the content related to it on Twitter X, and there was this content. I don't know much about this, so I translated it. Basically, when we say hires.fix, the image with low resolution is upscaled in this way. Keeping the existing circle as much as possible. But the content shared by this Kohya developer is completely different from this. So if you look at the results, it's expressed like this. As you well know, in STABLE DIFFUSION, if you just hang a high-resolution image without a hires.fix, you can see the results melting like this. But... If you use Kohya hires.fix, you can see the correct results without melting like this in the same state. That was the main content. If you click this link here, you can see this Git. You can clone the Git address here and install it in the A1111 extension. It's very simple. But before you use this Kohya hires.fix, I'm going to explain an important part. You need to know why this works and use it to handle the results better. So the important thing we need to know is... It's called U-Net. We need to know what U-Net is. Of course, you don't have to know this very deeply. The basic flow is like this. The basics of this model are learned based on 512*512. Now we have to deliver requests based on 512*512. We need to deliver it based on 512*512. The related parts are limited, so the U-Net can interpret it. It's a structure that the AI can interpret and create the results. If you go beyond this, If you go beyond this, He can't get a hold of himself. He's like, I don't know. It's kind of like this. So if you give a request like this, The result is going to be an error like this. Now that we're just creating it, You're going to see these kinds of results. Or... I'm fine. This is my taste. If you say so, Please contact me separately. We've seen these melting-shaped results every time. That's why it's very unusual. It's going to come out. It's just that the prompt that went in here is a high angle. It's just that there was only one prompt. Literally, It's a situation where a building and a person become one. But this is what we're looking at right now this video. If you use the Kohya hires.fix in the video, In this way, This result. In the same prompt state, Like this. You can make a good result. That's the most important part. It's like this. We're a little more... The power of the part related to the stable diffusion. You can use it more correctly. I think it would be good to understand. So I'm going to explain this a little more briefly. This is the structure. I'm supposed to deliver this 1024*1024 size. He's wandering. First of all, I'm going to reduce this. This information. I'm going to reduce it downscale. He's looking at it now. I can do it. I can do it. Oh, okay. Okay. I know. I got it. I made it like this. I'm going to make it into a result. It's different in size. So this size is different. In the form of raising it in a static way. I'm going to trick him. This guy. I'm going to trick him. If he gets a little bigger, I don't know. It could be like this. I'm going to grow this in a static way. To the final result. I'm going to make it. Literally, Think of it as a child. If you think, It's the easiest thing to understand. I'll give you the smallest one first. In a static way. Make the child cry. I'm going to make it. So just us. If we increase the size of the image, In the same prompt state, In this form, You can see the result of melting. It's broken. Those parts. If you use the Kohya hires.fix, This is the right result. I can make it. That's what it is. But there are people who make this expression. I already tried to use this. I used it. It came out like this. How did this happen? I'm sure there are people who say, I'll make this in real life. I'll explain what parts to change. Yes, now let's make it. When you produce it in this state. Here's the result. I'm going to increase the resolution here. We will. If you put it up like this, you'll see the result of the melting like this. Now, if you use the Kohya hires.fix in this state, this part needs to be solved. This part needs to be solved, but you get to see this result. Yes, so what we need to change in this state is that we'll turn off the Smooth Scaling part here. Now, if you press Create, you can get the picture we wanted. It's really simple. But the important thing is that this Kohya hires.fix doesn't automatically upscale the size here. It's just a simple process. If you just turn it on here and do it with 512*768, you'll just get a picture of 512*768. Because it comes out like this, we're expanding the resolution to get the picture we want. You can do it like this, and then you'll get a normal picture again. Like this. All right. Now, the important thing is that I told you that you have to turn this part off. Other than that, this Down Sample. It's related to the upsampling scale and the upsampling scale here. For that part, if the image resolution gets bigger or something, you can adjust the number of upscaling parts and match the results. It's not as difficult as you think. That's all. So if I point it out one more time, to avoid making these weird results, you can turn off the Smooth Scaling here and create the results. So if you compare the results, If you look at the picture that was in this size, it's broken when it's on like this. If we expand it to the full scale with this off, With this content almost maintained, you can create a high-resolution image. It's fun. All right. And finally, I'll show you one more thing. I'll show you that this works in CompyUI. In fact, in this CompyUI, this Kohya hires.fix is very popular, so there were some people who made custom script development and uploaded it. Surprisingly, it doesn't have to be like that anymore. If you click on the link here, you can check it out. This is it. When I introduced the content related to the stable video diffusion that I posted a while ago, I showed you this blog page. Actually, there was more here. What I mean is, if you look here, There was something called more. If you look down a little bit, there's something like this. Kohya Deep Shrink has been updated. So, if you apply the patch model add down scale here, it will be applied. But the problem is Basically, Kohya is active on the A1111 side, so it's ported to that side. In the process of bringing it, it's not a concept of hires.fix, but a concept of deep shrink. I think there were some people who missed the connection. Anyway, I'll show you how to use this now. I'm going to show you this setting. The connection will be connected like this. Now, I'll make a result of this. Yes, I called it like this. If you look now, in the middle, Kohya Deep Shrink is called like this. The method of calling is simple. Here. You can call the patch model add down scale here. Now, I'm ready. Connection is... I'll just make a little bit of this. You can connect it between the model and the model like this. You can press Create in this state. Then you can see these stable results. It's fun, isn't it? Oh, but this is different from A1111. I'm sure there's someone who says that. Now, I'll explain that briefly. Basically, in the case of CompyUI, I use random noise based on CPU. In the case of A1111, the basic is made of GPU. So, it's been created as a GPU. I'll turn it off. If you create it while turning it off, You can see that similar results come out. Like this. Now, the important thing is that we use it like this. Even if you create it by increasing the resolution, You can create a high-resolution result without a separate hires.fix or upscale. I think the most important part is that you can create a high-resolution result. Now, here's the result for that. You can make results like this. Likewise, if you turn off or apply the Deep Shrink related parts here, You can see the difference in these results. The related content is the same in CompyUI. If I show you this one more time, I can't block it anymore, so I'll turn off the bypass like this. If you look here, you can turn off the bypass. In this state, If the Kohya hires.fix doesn't work, I'll show you what the results are. You can see that the results are melting like this. Of course, if I lower this one to 512*768, You can see these results. Likewise, if I turn off the Kohya here and lower it to 512*768, You can see similar results. It's fun, isn't it? So, in this way, I've checked CompyUI's Kohya hires.fix. And later, One of the things I can show you in more detail is this. Now, regardless of this Kohya and this Deep Shrink, There was a difference in the results between CompyUI and A1111. It's possible to make the same result in that part. If we can organize that part a little more, I'll share it again in the next video. Please look forward to it. And one more thing. This A1111 extension, With the developer of the bmab, Portu Sim, Let's analyze and study the part related to Kohya hires.fix. I can share it with you now. I'd like to say thank you to the developer, Portu Sim. After that, We'll prepare and share the part related to bmab that the developer made. That's all I've prepared for today. It's fun next time, too. I'll come back with good content. Thank you.
Info
Channel: soy_lab
Views: 8,927
Rating: undefined out of 5
Keywords: #stablediffusion, #aiart, #Kohya, #hiresfix, #youtube, #soylab, #stablediffusionkorea, #A1111, #COMFYUI
Id: DMKjaYSvahI
Channel Id: undefined
Length: 11min 49sec (709 seconds)
Published: Sun Dec 03 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.