A method of Out Painting In ComfyUI

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
right here's uh another comfy video post just recently someone made a uh post on Reddit showing how they when they wanted to to out painting they made a a mosaic of of of the colors that they wanted in it and put that in the padding area which I thought was rather a good idea so they were doing the work in Photoshop but I I thought to myself well I can do the whole lot in CI so that's resulted in this rather um extensive workflow that isn't much less complicated than it looks it's essentially the workflow is uh an image processing workflow and the uh the generation and kampler workflow is uh very standard so we start with our initial image and one thing I will say about all out painting is uh that it's h of a l easier if you have the the original image you made and and you can recover the original prompt and the original luras and everything like that if you've just got the image and none of that then it gets much harder but you you can still do it but it it it's much harder so that's what we start with and the first thing we do we start exactly the same as where you with any other in painting you pad the image for the area which is this here you can see that that's the mask and that is very standard so going 256 pixels wider and uh the um the joint is feathered you see here it's feathered for 50 pixels you can mess about with that figure it it it it makes a little bit of difference so what we're going to do wi this in is take a little thin strip out of here you see my cursor working up down and you do that with an image crop and this is the result a little thin strip you see a little thin strip down there I I'm I chose this image cuz it's like a worst case and and I want some more trees over here I don't want more domes and stuff so I want to make more trees than sky so we take this little thin Slither and then we reize it to the width of this white piece here 256 see how the numbers repeat 256 so we're enlarging this stretching out horizontally to 256 pixels and then we're pixelating it so that's breaking it up into into little squares or big squares and this is another thing you can adjust to to see how to get a better image so if you make the make the square sizes bigger then the result will be more of a change among General the smaller than your you're giving you're giving putting more detail in I I've settled on 16 but it worked perfectly well at 10 and at 24 30 then and this is got an important bit I flip the image so that um the pixels against the new Edge are are a little bit more like I think that might be important in some it's probably not important in this particular circumstance then we have another operation here which is quite separate so we start here and and you see that this is the this you can see the the resultant piece that we're going to drop in we're going to drop it in on the right hand side of the image this is the extension in in its nent form minutes so to make this more changeable more easy to change the pixelation has helped but I want to put some noise over the top of it as well to help the process along so I use a noise generator it's called random noise I I leave absolutely everything as the node appears I don't want to change any of these at all you can do it just increases the number of Reds and colors I want an an average I want an average lot of noise with all with a full mix of colors and I want that slither to be the same size as the Slither here so it's the same size same proportion as this so I wanted to perfectly lay over that and that's the resultant slab of lovely noise look at it all different colors then I mix that on top of this pixelated image over here so it goes into a simple image blend node very simple and I want and this is another thing you can change if you want a lot of change then you have half if you want less change then this is 75 so it's only 25% noise and then that goes into a color correct as you see here because I need to be able to adjust the contrast and the brightness I don't want to change anything else so here is our noised and pixelized image here so we go zoom in on that you can see it's pixelated and it's noised as well and I've adjusted it brightness wise I I adjust it just just with these two uh until it looks about right essentially until the tones look about right and then this image here once it's corrected goes into another composite which isn't masked it can be masked but it's not masked doesn't need to be masked and this mixes this image with the noise which results in this and this composite mask drops the a bit of no new noisy stuff which you can see closely here into position and that is the whole whole of the thing really that see that my original image was 1536 so that there 1536 appears there and and so forth so so what we've done essentially is take a Slither out of our original image make it wider pixelate it put noise over the top and drop it into the space where we want our in painting okay and then that image is piped straight across into an ordinary VA encode you don't need one for in painting or out painting or anything that but the one trick you're doing is you don't want to change the rest of your image so you're using a mask from your pad image for out painting you're using that mask as a set latent noise mask which means that it's only going to noise for the image to it's doing image to image essentially it's only going to do image to image on this area here plus the plus the uh the extension of the mask the soft Edge Plus the 50 pixel soft Edge so that the pixel 50 pixel soft Edge goes down this line here so many in paintings there's all sorts of hugely complicated workflows to to um to do the join uh but this you don't need them with this so you're you're getting rid of probably 2K some God knows what else anyway and certainly it's a lot quicker so this that is all there is to it there's no more to it at all and then because because it's just straight image to image rather than uh in painting so you're not in painting you can set the D noise to whatever you want the higher the D noise the more the change if you want more change you can also increase the amount of this noise here so you got two ways what I like about this method is it's very controllable for example when I first dropped when I did my first Generations here uh the sky was a little bit darker on the right hand side but I can increase the brightness here a single digit at a time until I get a perfect match you think I'm boasting well we going have a look over here and there's nothing unusual in this at all Doo say at 70 I it works perfectly well at 60 I wanted a little bit of a more imagination so I put it up to 70 everything else you must keep your seed fixed and ideally the same seed that made the original image but you you can change the seed I I do this seed has changed actually cuz I I went looking for a better joint and here's our joint join can you see the joint well I can't see one maybe you can maybe it's along here it's up here somewhere it's actually very hard to find but you see how it's added the changes it's done them very nicely and it's just trees for of beit a tree in the sky there I really don't mind that that tree in the sky is um comes from these little dark bits that are in there if I made it a little bit brighter those trees would probably go but I I quite like the trees there put a bit of a castle in the background which I I don't mind that too much seems to be the same as those two castles obviously a very popular style of Elvish castle that there that's doing the RS anyway so as you see the uh the join is pretty much completely seamless uh This Cloud ends on the the light down there but it even puts a bit of it even extends this tree across to the other side the the other um interesting uh possibility with doing this as well is that I could easily take a strip from the center here widen the image drop this section to the left that section to the right and I could add a large chunk in the middle if I wanted to or or even a new section of building in the middle here you would have to make a a few more Composites and uh masks but it it should work perfectly fine uh you so you should be able to uh extend any of these areas at all to make the image as wide as you wanted and I say even you you could even take a section right out of the middle here and and widen that you know there's there's it only needs a little bit more uh messing around uh with the uh dropping with the uh image composit with the composite masked nodes so you can you can compose any numbers of bits into here is what I'm getting at uh and it'll it'll work fine you could do several and and then generate them all at the same time which uh which might save time though it might be a bit fiddly to set up I I probably wouldn't bother okay I hope that is useful I I I imagined everyone did in painting this way and when I look I don't do in paint out painting sorry uh and when I looked at how other people did it I found I was doing it a completely different way to any other people but the uh the person who thought up the uh idea of um breaking this into blocks it it was a great idea um and I I've forgotten his name but um and and it does make quite a lot of difference because I can you can really simplify this area uh or have it complicated as you want okay so I hope that's uh informative and I will put the workflow in the words underneath the video okay thank you very much
Info
Channel: Rob Adams
Views: 2,937
Rating: undefined out of 5
Keywords:
Id: mCeNBLkJ6RI
Channel Id: undefined
Length: 10min 57sec (657 seconds)
Published: Thu Feb 01 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.