Master Inpainting with Stable Diffusion & Automatic 1111

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back to Alchemy with zero phase this is Eric and we are going to revisit in painting I am getting uh request after request to explore a little bit more how do I do this how do I do that and uh so we're going to go in a little more in depth on how to more effectively inpaint uh we're not going to use in paint anything we're not going to use the replacer this is going to be strictly uh doing the going under the image to image tab using the inpainting function I'm going to show you some uh some in-depth techniques on how to kind of get what you're looking for okay so couple of requests just adding objects into a scene more effectively more reliably uh or uh without changing the uh whole image or other contents of the image adding people to the image adding people behind other people um so we're going to try and touch on some of these now using inpainting is not an exact science as many of you know but there are some things you can do to really help out with this uh to uh get more consistent results and better results okay so uh first thing we're going to do we're just going to generate an image I think I want to do so since a lot of people have been asking about uh adding people to the scene and people behind other people possibly let's go ahead and explore that um I'm going to switch back over to sahastra kotai uh where' he go here okay and then um we we're just going to do something uh simple okay you know I think I've touched on this a little bit before but I think we're going to just change it up a little bit um digital stration of a Mediterranean uh town Square open market lots of people okay uh not going to use a negative prompt got to get rid of the Bae I use that on the other one uh we'll switch back over that here in just a second we are going to do this at 16 by9 and um we're going to switch it to UL uh give it a little bit little bit of a softer look okay let's go ahead and run that through through okay so this is the image we got uh it's a little too I don't know simple let's do this sorry I'm just going to run over here we're going to run it through my prompt generator real quick here give something a little bit better quality okay run it again there we go let's grab that put that in here run that again it's just a little too flat for me I kind of want something yeah there we go this is going to be a lot better so in a previous video I did generate an image similar to this and I was showing how to add people in and so we're going to try doing this uh some of the techniques in this I'll show you what tools or what settings to really mess with to uh get the effects you're looking for okay so we're going to send this over to the inpainting tab and um so let's let's just add some stuff okay so one of the things you're going to want to first let's change our brush size and we do need to switch over to an inpainting model now I have been playing around with um the RPG artist tool inpainting V4 inpainting model um which has been actually wonderful it's been really good doing uh these inpainting so it's the AO zovia RPG artist tools V4 in painting um have this for all they might have an updated one but this was one of their more recent ones and I forgot I even had it so I started using it and it does great at end painting it's awesome so we're going to go Ahad and set a negative prompt and let's see let's go ahead and uh pick something we want to do here um let's add uh let's add somebody over on this side right here looking at these these fruits and veggies so we're going to come up here just going to add a mask here now okay a lot of you I know run into this issue where like oh okay you know we're going to do this and we're going to come down and um we're just going to do only Mast okay and you're going to run into and as you're doing only Mass you want to do a square area Okay so we're going to switch this to one by one this is the uh this drop down I'm using here uh if you haven't watched my other videos this is the aspect ratio helper extension okay great awesome to have um allows you to do a lot of things like lock in your the whatever aspect ratio you want or you can enter in and customize the aspect ratios you want okay since we're using a 1.5 model we're going to drop it down to at most 768 okay this is going to be your inpaint area 768 x 768 it's not designating the entire image we're not going to be in painting the whole image so um to get a new person in there we can do original or fill I'm going to show you both ways we're going to start with original okay now the setting you're going to want to pay attention to is the only Mass padding pixels okay what this does is it designates how many pixels around the inpainting area it's going to pad out and that really that that's what kind of helps the AI determine like what uh the context of the whole image is okay um am I going to be you know what's the style what's the coloring the the the and surrounding area so when you're trying to add stuff sometimes it's better to reduce this down um giving the AI less context and so it's able to be a little more creative with what's going in the image sampling steps you definitely want to have this up to probably about 40 it helps with the blending uh mask blur I you know when I'm in painting I usually do it minimum eight really Blends the edges gets rid of that seam that you're kind of looking at okay sometimes when you're in painting and especially if you don't have a good end painting model you end up with you know the edge around where the end painting area is okay when you increase this mask blur it helps to alleviate that it gets rid of that okay all right so we've reduced the the only MK padding pixels down to 20 which reduces the amount of information the AI has around the whole image itself um the other thing we kind of want to do is increase the denoise strength by doing this is kind of introdu a little allows the AI to be a lot more creative with what it's putting in okay so uh 80 to 90 typically is fine uh we're also going to change this back over UL a okay now the this is the other thing we got to do we got to describe what we're going to be putting in here okay let's go ahead and you don't have to be super complex uh let's say um uh woman in in green dress looking at uh what is it it's almost like a veggie stand I guess uh green vegie vegetable stand okay so that's all we're going to do we're describing what's in here now I'm not saying we're going to get this right the first time but this these are the settings that will help okay we're also going going to we're just going to leave it at one batch I just want to see if it gets it right off the bat okay uh config scale you can mess with I don't think we need to and that's it okay so just as a quick review we're masking out the area we want this person to be in uh mask blur increase a little bit to help uh blend the edges a little bit we're going to do original this time taking the original content of the image and we're going to try and manipulate it reducing the only Mass padding pixels down okay this decreases the amount of the original image the AI has to look at to uh have context of what it's doing and then sampling steps increase which gives the AI uh more steps to really kind of work and and create the image around that and blending it in okay um make sure you have a one by one aspect ratio area you're working with and increase the D noise strength okay let's go ahead and generate that see what we get oh oh oh oh sorry sorry forgot to switch the vae over so the uh RPG artist tool does require unless it says uh vae in the name it doesn't have the vae baked in okay this helps with coloring and especially with in painting so we switch it over to the vae uh 80 840,000 EMA prune okay you should be able to find that out on hugging face um if you don't have it uh a lot of times the people who produce these um uh checkpoints will have links on civit AI uh but you should be able to find that if I'll go out and maybe find it and um provide a link in the description okay let's try that again should get a better result this time there we go okay perfect beautiful see um that was flawless I mean that was great uh that worked really well getting that added in blending in we don't have any edges okay uh I'm okay with the direction she's in um I'm experimenting with some techniques it's you know and I don't know if I'll be able to do this using open pose to see if using in painting we would be able to change the direction of an in paint area that small of the person who's in it unfortunately I have not had too much success with that yet okay now let's go and send this image I like that let's go ah and send this image over to in in painting okay let's take a look at what we're going to do next get rid of the M area so as you can see we got that girl there uh now somebody had asked about adding somebody behind another person okay without changing the original person too much now this does get um a little more difficult and uh so I'm going to see we're going to try some things here let's see if we can't um we're going to zoom in [Music] here change the masks size here so I don't know if if you don't know what I'm just doing what I just did there in zooming in the the canvas okay there I I think this is an extension let's go take a look here I'm pretty sure this is an extension ension that I don't think it comes with let's see yeah the SD canvas editor so that gives you some more functionality when uh with the canvas here uh in the in painting area yeah we kind of lost it there what happened to it let's close that out reintroduce it is I'm not saying it's perfect but it works really well um using you have some shortcut keys and some other stuff that you can use to zoom and grab it move it around uh and do various things with it okay so what I want to do is we have this lady right here and let's say there is a a person on the other side okay um let's say a child I think a child would be perfect so what we're going to do is we're going to just kind of mask this area out along this we're going to Le let the AI have the context of the person the lady there but we're going to add a child right there okay move that back over there so what we want to do now is in the description we're going to go over here um cute little toddler in red dress in curly oops brown hair all right so for this um oh you know what let's also we're going to add in the context standing next to let's do this hiding behind woman in green green dress okay it does help to give the AI a little information about what's going on here okay so we're going to do that and mask blur yeah we're going to reduce this down because we're working with a really small area we're going to go down to four and then come down here we're going to we're going to keep it on original I think the only Mass padding pixels I think at 20 we should be okay we're going to find out how that works sampling steps yeah we're going to leave it at 40 I think everything else oh yeah we got to make sure we switch this back to a one by one when you send the new image from over here to over here it obviously takes the dimensions and modifies the width and height uh so you want to make sure you readjust that when you're doing the in paint only MK area okay I think all the other settings we can leave the same let's go ahead and see what we get with this yeah we are not getting what we want so I think we are going to need to reduce let's reduce the only Mast padding down to let's do it down to 12 try that you'll see the area gets a little bigger there we go oh my goodness okay she's got a green dress let's see what did I specify red dress okay so what we're going to do we're going to emphasize This 1.2 let's do a 1 point2 but here's the thing you have the child now okay we have this child kind of hiding behind you know her mother we'll say and we don't want to mess with that anymore we're not going to try and recreate that all we want to do is change kind of how she looks so we're going to send that image over to um the uh in paint now we're going to leave the mask the same we're not even going to touch the mask now what we can do is come down here we can increase the the only MK padding a little bit here and we are going to leave it on original we're going to increase this again okay and again switch this to uh one by one to 768 and we don't want to modify the what's there too much so we're going to reduce this down to 7 we've emphasized red dress okay and what that's going to allow the AI to do is take what's there already and just remodify it using this new prompt so we'll go ahead and run that oh we're going to have to give it see it's still doing green dress and part of that is because it's doing bleed over from the the uh dress that the mother's wearing okay so we're going to reemphasize this more and yeah we're going to go ahead and increase this point8 might be a little much let's see what it does so we're kind of getting the the Red Top still getting the bleed over there it's really cute though so we could probably run with that if you wanted to you could take this in even smaller and change the mask area see if I remember how to yeah there we go okay so we're gonna um going to grab let's get rid of the mask and what we're going to do is just do this we're going to really get in there and refine find this and hopefully eliminate the the bleed over from the other dress okay see what that does see did I not change something so we got cute little toddler let's get oh oh oh oh oh oh okay yeah we got to get rid of that I forgot so we have green dress in there that's one of the reasons we're having problems got to be careful about what's in your in your prompt yeah we're still getting the green dress okay do we increase that drop this noig scale we want back at seven sorry come back up here padding we're going to reduce the padding down again see this is what I'm saying it's not an exact science okay and we are still getting a green dress what is going on cute little Toler red dress right red dress I'm wondering if we are dealing with the mask blur being too much okay let's try that again there we go that's what we wanted to see beautiful so again not exact science play with the settings settings you got to remember mask blur uh padding pixels the only mask padding pixels okay those are the two big ones that really affect your ability to add characters items whatever to a picture okay now we're going to go through I I love that this turned out great um that that just really adds a lot of character to the image uh it is interesting there's a little more detail to these characters than the others and that's fine maybe that's the focus of the image maybe that's where we want to look okay so let's try adding some other stuff to this just as again kind of practicing here and showing you how to do this we're going to add some objects to this image let's get rid of the original mask and let's add some crates um yeah let's add some crates uh let's see where do we want to put maybe that's not what we want let's add a dog why not let's add a dog let's add a dog right there let's come up here um kind of a dog do we want uh let's say I'm partial to Australian shepherds cute Australian Shepherd puppy running down cobal street and let's try that so we have this here it's a pretty big Mast area Okay um I want to make sure we're getting what we want we're going to increase the mass blow again I want to back up to I think 12 on this one we're going to do original but we're going to leave the only mask padding down 20 okay change this back to 768 x 768 and yeah leave everything else the same let's just try that and see what it does this has been a game changer in being able to figure this out uh this only Mass padding really helps determine whether you're going to be able to add stuff in or not okay when it's all the way up it's got too much context you're just going to get it's just going to render the same whatever is in the scene kind of thing so there's our little Australian Shepherd running down the street did get a little weirdness on the on the you can see on the Cobble it's a little softer but overall it blended it really nice changed this guy's leg back here not a big deal I mean we're dealing with kind of an abstract image here which is not too bad okay that's pretty good I like it we added a little more character so uh one more thing here let's go ahead and add somebody up here looking out the balcony why not so let's get rid of that mask let's come up here and let's just go like this this is going to be interesting because we don't want to change the railing but we got to put somebody behind the railing so you want to leave the context you don't not going to mask out the entire railing okay the AI will understand that there's railing there and it's going to need to connect both sides so in the description we're going to put um young girl standing on balony right wearing white dress leaning on railing so with this it is a small area and I believe the settings we have should be fine uh let's reduce the mask blur down just a tiny bit down to eight we're going to use original okay only Mast we're going to leave the only Mass padding down at 20 okay um sampling sampler all the same change it back again to one the 768 x 768 and leave everything else the same Doo strength up between 089 is great let's just see what that does wo perfect well almost perfect this is i' I've run into this issue before uh I think it's great I think it works um but as you can see it almost looks like her leg is on the other side or you know kind of pushed through the railing railing and this could be fixed in post I mean come in here and Photoshop and just kind of draw a couple little lines down through that and it's right it's great that worked out great even added a little bit of a shadow kind of on the on the door there kept the railing the same so as you can see this is if you if you understand the this this setting here only Mass padding pixels will help achieve just about any kind of inpainting you want okay um and give you allow you to manipulate and change and add the detail you want to your image okay even after you've upscaled it you can add even finer detail uh this could be a photo and you could add stuff into it the principle is the same um reduce the only Mass padding down will help the AI to really achieve getting something in there you when you have it up too high in fact I'll show you uh real quick here we're going to increase the I don't remember what the default is I think it's like 32 and you might get it you might not get it uh again sampling steps really helps too but let's uh let's go ahead and try that at the default 32 see what it does oh not bad it does it it did it there again her legs kind of through the railing we're going to increase the pading again we do have the the no the denoy strength up pretty high which does contribute a lot to this as well yeah see she's kind of on the other side of the railing now if this were down to 75 I think 75 is like default see what that does yeah it's doing pretty good just getting it in there there we go she's kind of leaning on the railing that one's actually really good too so I mean as you can see it's not exact science um I know a lot of people struggle with getting things in there uh but trust me adjusting these settings the only mask padding D noise strength and again the mask blur as well will help you know achieve the really good results also make sure you're using a good in paint model like the AO RPG artist tools V4 in painting I'll leave a link to that too okay I'll grab the links for the vae the uh checkpoint for this and I think that uh I think that should help you guys out a lot in uh being able to understand like how to get objects behind other objects so you're not masking out the entire object that you're putting something behind you just want to get the edge so that it maintains the context of that one but also has enough area over here to add in what you want okay I hope you enjoyed this and make sure you like And subscribe uh hit the notification Bell so you know when other videos come out I'm not super regular on my videos right now and love the feedback I'm glad my videos are helping people uh I try to focus on some of the more nitty-gritty uh esoteric skill sets when it comes to AI image generation manipulation uh you know my videos are not the Super flashiest and my production value is probably crap but I don't really care I like the rawness of it so we'll talk to you all later thanks
Info
Channel: AIchemy with Xerophayze
Views: 4,537
Rating: undefined out of 5
Keywords: Stable Diffusion, Automatic 1111, Inpainting, Advanced Image Manipulation, AI Art Techniques, Digital Art, AI Image Generation, Granular Control, Creative AI, Artistic Innovation, Digital Inpainting, AI Tutorial, Image Editing, AI Technology, Art Manipulation, Tech Art, Image Generation Mastery, AI for Artists, In-depth AI Art, AI Image Customization
Id: CDAcndp53EU
Channel Id: undefined
Length: 27min 49sec (1669 seconds)
Published: Fri Dec 29 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.