How To Do "Hires Fix" In ComfyUI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
high-rise fix a feature within the automatic 1111 web UI application allows you to enhance smaller images to a higher resolution without losing the composition of an image here's how you can do this within comfy UI using the upscale latent and upscale model nodes okay so to get started I went ahead and set up this workflow here within comfy UI so I have my checkpoint along with my prompts the size of the image and the sampler along with the vae decoder so this will all go ahead and produce an image if we go ahead and run it through here everything should work fine no problem all right so now we have a nice living room so now if we want to go ahead and enhance this image and pass it through the latent space which is a way that we can basically upscale the image I'm going to go ahead and just move both of these nodes a little bit lower and then I'm going to go ahead and put in the latent upscale node here and then I'm going to go ahead and connect this to the samples connector and put in 1024 by 1024 okay so instead of going from 512 we're going to go ahead and double this and then I'm going to go ahead and put it in a k sampler so I'm going double click here go ahead and put K sampler and then connect this latent uh output to the latent image input here now you can always copy and paste this as well too but just for this example I'm just going to go ahead and set up a new node and then reconnect everything uh together here so we're doing the model to the original checkpoint model uh the positive prompt and negative prompt and then we had that lat in image so this effectively just went ahead and create an an image to image model so it's going to take in this latent image and then we're going to go ahead and pass it through the sampler and then we're going to go ahead and decode it so I'm going to go ahead and put Bae decode and then we'll go ahead and do that and then connect this to the original VA AE of the model if it has one baked in otherwise we would go ahead and load a separate vae and then connect it to this end point here and then we're going to go ahead and put in the save image and then we'll go ahead and output that here and then run this prompt so before this ends I just want to touch on this D noise so this is basically doing image to image it's going to rely on the same prompt but it's going to go ahead and completely make a whole new image here which we can see um and it doesn't really carry over any of the characteristics so what you're going to want to go ahead and do is set this D noise to 05 so it will pass this image or whichever image is generated we're using a random seed value here and then it will take on many of those characteristics when going through this image to image process while it's upscaling within the latent space basically we're going to use this as a reference and then we're going to make something a little bit larger so now if we take a look at both of these images we'll see that they're similar in a lot of ways however there are some added details to this now you can go ahead and adjust this to noise if you want to uh add less noise I will carry over more of this original image over to this upscaled image here so that's upscaling within the latent space okay so now switching gear to upscaling an image with a model so if you have your own upscaler you like to use and you want to keep everything in this original image that we generated but just make it larger you'll go ahead and do these steps so I'm going to put in here upscale model loader and then I'm going to put in image uh upscale with model so that's telling us that we're going to use a model to go ahead and upscale this image and we're going to use the same vae decode so this will take an image as an input so therefore it's not taking a latent space image that we saw earlier so like the image to image process and then we're going to go ahead and pass it through here and then we're going to put in the image uh scale and go ahead and pass that to here and say how large we want to make this image so if you don't do this it's going to make a very large image so this allows you to control it uh to whatever Dimensions you'd want so since we're taking a square image in I would recommend uh having a square image as the output so I'm going to go ahead and do save image here and do image so we're going to go ahead and run it through this process and so here's our image and so I expect to see something exactly like this but larger which is what we can see here and so perfect if I was to go ahead and take a look at the outputs we can can see that this larger image is 1.4 Megs and the earlier one was only 304 KOB so it used that up scalar perfectly so that's it with using the high-rise fix feature if you will within comfy UI or using a latent upscaler or a separate upscaler model in order to make your images a little bit larger and a little bit more crisp if you found this video helpful uh please consider hitting that thumbs up and subscribing and of course if you have any questions please drop a line in the comment section below and I'll try my best to help you out thanks so much for watching I'll see you in the next one take care
Info
Channel: Prompting Pixels
Views: 7,121
Rating: undefined out of 5
Keywords: stable diffusion
Id: TLCVNuT3oHo
Channel Id: undefined
Length: 5min 44sec (344 seconds)
Published: Wed Jan 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.