ComfyUI Fundamentals - Upscaling 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right Welcome To tutorial number six um this is what I'm going to talk about upscaling and because upscaling works the same way in any model it doesn't matter if you're using sdxl 1.5 or whatever I'm just going to use a very basic setup here and most upscaling is done using image the image line so the blue ones uh you can do a late and upscale but it's more of a doing a late and upscale successfully as more of an art form than a best practice like it can help you and and if you know how to use it well it can be great but it's generally it's not going to give you the best results if you just want to get the image bigger so upscaling is is usually accessed um from your main kind of set of comfy UI samples and it's got a couple of good ones it's got upscale image buyer and it's got upscale image by default and it should also have an upscale image using model so you can use any of these three to get different effects and upscale model is the one that a lot of people use at the end of a process and they do this because it uses a model like Forex whatever that whatever or 2x whatever whatever and it will upscale it based off whatever this model wants it to be and it'll bring out a really big image so I'll bring out a really big image and um it's kind of it's a very simple process um so it doesn't take a lot of a lot of system resources to do this upscale like it's quite quick and it makes very large images which it might depends on what model it is but this is a 4X model but if I zoom in you can see it doesn't look quite right when you get right in on the model if you zoom in on the uh this model it it tends it looks actually looks a little bit better a little bit more makes more sense but when you look at the faces and stuff in here it's as you can see there's some issues with it and so it's not the best kind of thing to be using early in the process because of the fact that it goes up to 4X um generally you want to save this one for using right after everything else and one of the other nodes will be upscaling by image and this one you use pixel Heights and widths so you can just you can connect this node through these width and height values and other nodes in order to do maths and just upscale like by times two or whatever if you want to one of the good ones to use that stuff for would be um diffuse math nodes but while it is very useful for that process it's also very useful for this particular option here which allows you to actually crop in from an image if you make the image smaller than it was coming in and you say crop Center it will crop inwards from the edges of your image so it's a good way of getting rid of any distortions around the edges of your frame okay now because we're trying to do a quick tutorial here instead of a long 20 minute ramble um I'm gonna I'm gonna stuff with just these these particular nodes I'm not going to go way into it with latents and custom upscale nodes yet I might do them later but um anyway suffice to say that these are the two basic ones that you want to be familiarizing yourself with there's another one which is the upscale Buy which is a very quick way of just going upscale by this amount however I suggest if you are going to use this to stick to whole numbers uh preferably two four eight and so on because uh you will get um non-standard sizes which may not work well with some of your future pipeline um now that probably doesn't make any sense to you but um if you're using a tiled node somewhere further down the line to do stuff um having images of certain sizes can mess up that process so it's something to be aware of that you need to be careful with what your resolutions are rather than just willy-nilly putting it at Point whatever and hoping it just works out all right so what I'm going to do now is I'm going to show you let's get rid of that we don't need that for the moment so we'll just do this one now upscale by image because it can just um let me just put that on fixed because it can just do the maths and times it by two it's quick and so on right now if you look in on this times four one you'll see it starts to look strange when you get right up in and look at it close and if you're looking on this one it's more pixelated is what this image becomes as you upscale them in size and you don't necessarily want these pixels because this these are pixels that are made out of like 20 or 30 pixels and these aren't just regular pixels I'll show you uh where are we uh open image so if we zoom in using the browser to things hang on and we really zoom in you can kind of see these if these edges aren't sharp they're fuzzy because they're made up of multiple pixels even though they're one they're supposedly a pixel so the reason this is occurring is because upscale process just multiplies pixels essentially whereas in this process when you zoom right in you'll see it's got sharp non-pixelated edges and that's because this process uses a model and just goes like it it reinterprets the information being sent to it using the model and um so you'd be thinking well which one do I use both of them seem to cause artifacts on my image well the interesting thing is we can actually combine the both of these we can't combine this one the um because upscale image by um unfortunately cannot go down you cannot go sub one it will throw errors so instead we're going to use the upscale image and give it an actual pixel value now thankfully we know what our pixel values are which is 512. we know this is going to upscale that by times four and so if we use this and we connect it instead to here this is receiving a times 4 resolution image and then bring it down to 512 but we we still want to upscale we don't want to go back to the original thing so we go 248 2048 not 248. actually we'll go we'll go 1024 why not four probably be a bit better yeah and if we one second I'll just fix this zoom in so you can see text oh yeah this is the trick with this um this Zoom value on the window that we've got here um you could if you zoom out with this and then zoom in with the scroll up you can make this text appear when you're zoomed out further to do with the way I renders stuff all right now it is going to upscale five four over here using the model and then it's going to down scale it to 1024. and I'll show you what that looks like compared to the previous one okay so it's made this image now which doesn't look great and then it's going okay let's bring that down again so you can see it's upscaled but there's not massive pixels there's a lot smaller pixels now than in the previous one that we had and essentially it's a good way of um as you can see in this one these are giant pixels made out of like 20 pixels where is this one let me zoom in on it it's much smaller pixels with less distortions um so this is probably the best way of doing an actual upscale process you upscale by model and then you down scale using a second upscale this is what I'd use for every time I try to upscale anything this is what I use so I would suggest anyone do the same thing basically and so yeah that's that's the basic unit of upscaling and I suggest anyone makes use of um even up to further up in their workflows um you can of course change this to much higher values you can use different models in here it's entirely up to you how you use this little kind of setup but um yeah that's how I do upscaling anyway oh and um if you're going to do upscaling it's a good idea to do like a sampler upscale sampler upscale sampler like do it in stages so instead of going up to 8K or something as soon as possible instead you step it up through the resolution so that you get less artifacts in the image right um next tutorial is probably going to be on Laura's I was going to do this one on Laura's but um unfortunately there's been some issues with getting Laura's to function properly on sdxl so anyway thank you for watching and uh hopefully you found it useful
Info
Channel: Ferniclestix
Views: 2,230
Rating: undefined out of 5
Keywords:
Id: reimr3jZ8lI
Channel Id: undefined
Length: 11min 48sec (708 seconds)
Published: Wed Aug 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.