How To Inpaint Anything in Stable Diffusion WebUI - Just 3 clicks!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
generative AI art some people love it some people haven't yet learned to love its wonders but for those of you who have embraced the power of AI we sometimes think wouldn't it be great if you could just click on a thing and a picture to change it like I want to change these curtains to to all be read but I have to do a mask and it's all feeling all fiddly and awkward and all a little bit too much like traditional art I'm an Explorer in latent space if only there was a way I could just segment anything oh wait there is yes it's called segment anything and its power is now also available directly inside the automatic 1111 web interface for stable diffusion with segment anything all you have to do is pick your segment and just like Robert is your father's brother you've got your mask cracking for this to work you'll need to have two extensions the first one being control net and the second one being in paint anything both of these can be installed via the extensions tab on the automatic 1111 web interface I've already done a video on control net and chances are that you have it installed already too just make sure it's up to date and you've downloaded at least the in-painting model this is an awesome model and towards the end of this video I'll also show you a cool trick you can do using the in-painting model for out painting instead just like on the screen there for the in paint anything extension the model download can be done directly from the impaint anything tab so that's even easier than with control net so just a recap on that exact step-by-step installation process for this in paint anything extension you'll need to install the in paint anything from the available tab go to the installed Tab and click apply and restart and finally go to the in paint anything Tab and download a model there are a number of different models to choose from as you can see there you've got base large or huge large is the default HQ versions are also available I like big models and I most definitely cannot lie so I mostly use hqvit H myself though sometimes you do need to switch models to get the actual segment you want all right now you've got everything installed it is time to segment the basic three-step process using the defaults is very quick and easy all you have to do is provide your image click run segment anything select the segments you want click create mask select your text prompts and finally click run control net in paint this way of doing it is quick and works well when you want to change fairly similar things keeping the overall style of the image so that your inpaint isn't that obvious for example say I had an image of a painting then anything I in paint in that will be in the same style as that painting if I just run through those three steps now so step number one is to select an image I'm going to use that painting and then I need to run segment anything on the segmented area I just have to click on something so there I'm going to select a hair and then click create mask as the cursor is a little black dot it can be quite hard to see in some of the black areas but hey there's also an invert mask option there as well should you wish to have everything apart from that which you have selected I'm on the control net inpaint tab here over on the left for the positive prompt I'm going to have some curly Ginger hair and I'm also going to throw a little bit of a negative prompt in there as well and so the final thing then is just to run the control let's in paint a voila there she is she now has curly Ginger hair if you like you could now replace that input image with the one you just generated pick a different segment create a new mask and then change a different area on the image do be aware however that if your input image and output image have changed size in between there you will need to run segment anything again digging a bit deeper you'll find there are plenty of things that you can play with hopefully something there will meet your requirements we've got some Advanced options there and also some control net options too for example the preprocessor has a couple of different options the default one is absolutely fine in paint only but you could also do in paint and in paint only plus llama in paint is fairly decent and just changes the entire image it doesn't actually use the mask you created so I tend to ignore that one entirely in paint only is fairly new that came with control at 1.1 and in paint only plus llama is almost exactly the same but the result can be a little bit cleaner you've also got the various standard control net options there such as the mode and reference only control net as well if you want that also nicely compacted into that interface for some of the other tabs there we've got in painting this is basic in painting essentially the old way and it doesn't use your normal model it only uses the models listed there which are in diffusers format so you'll probably have to download if you use anything in that tab I tend to just ignore it personally the next tab is the cleaner because sometimes you just need to take things to the cleaner this allows you to sort of blank out areas of an image if you use that same Angel and I select her wings instead to make a mask there and then run the cleaner on it as you can see we now have some fairly blank Wings it sort of flattened it out and got rid of all the feather detail mask only is the final tab in here and that allows you to get an alpha of the image or you could get the mask as well the mask is very handy because then you can scroll down and send to image to image impaint and Carry On and do all the things that you normally would so here you can select mask content original pick whatever sampling method and add whatever control Nets you like as you normally would like I mentioned at the Start Control net in painting isn't just for in painting as it's absolutely greater out painting too for example here I'm using the usual out painting Mark II script there I've got out painting Mark II one two eight twelve mask just do all the directions and it comes out a little bit like that which is okay it's just not very harmonious however if we use control Nets new inpaint Global harmonious mode then well we get something quite quite different to Let's enable that I've got impainting the preprocessor there is impaint global harmonious and we're using the same out painting Mark II script just the defaults there for the weight and step but I have selected the control mode control net is more important now when we run that through instead we get a completely different image which I think you'll agree is indeed far more harmonious no that's a harmonica all right we're just gonna have to ignore that move on to the next video
Info
Channel: Nerdy Rodent
Views: 44,659
Rating: undefined out of 5
Keywords: nerdy rodent, ai, ai art, best ai tutorials, stable diffusion, inpaint anything, segment anything, a1111, automatic1111 segment anything, best AI art guides, Inpaint Anything Automatic1111
Id: yDYhIuS8hJ4
Channel Id: undefined
Length: 7min 27sec (447 seconds)
Published: Fri Jun 16 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.