Inpaint Anything: Advanced Object Manipulation with Stable Diffusion & Automatic 1111

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone welcome back to Alchemy of zero phase I'm Eric and this is the second video in the inpaint to erase things video series actually this is going to be a little more advanced um I'm going to show you how to use in paint anything to do a couple different a few different things okay it is an extension that you'll need to install okay it's pretty easy uh I do believe it is offered uh in the available repository if not it is uh the link to the uh GitHub locations right here okay just do a search for in paint anything okay I'll leave the link for it in the description as well okay when you get it installed you'll get a tab over the top says in paint anything now when you first use this it will have to download a few models these are small models it shouldn't take too long to download uh they've added a few since first video I did on this I'm not familiar with all these we're just going to be sticking with the first one here unless I see a need to change okay um and at this point you're just going to be adding an image in oh look there's our cute little puppy we were working with before okay so if you remember in our previous video I was showing you how to use the in painting method a couple of different meth methods to erase various objects in the image okay these small little toys this thing up here so with the in paint anything this is actually going to accelerate what you do as long as you know how to use it to either erase things or even change things okay so once you import the image you've got your models installed uh you're just going to click the Run segment anything what this is going to do is run it through a small AI That's going to identify all the separate objects in the image and it's going to assign a color to each of those objects as you can see okay it's using a wide range of uh Shades and other things to identify any identifiably separate object okay um different models this is kind of where this comes in so these different models will segment differently like if I come down here fast Sam we'll select that you can kind of see how this one's set up oh that one came up the same let's see if we can set I know some of these are a little different give this one a second yeah see it's it's doing this the identification a little bit differently but again like I said I'm sticking with the first one I'm going to show you how this works I remember when I first started using in paint anything I got a little confused about how to uh mask things out the things that I wanted to change uh it got a little confusing for me cuz I was like okay I got this little dot right here that I'm moving around you know and I can increase it but am I supposed to like mask out an entire thing you know that I want to get rid of like that and no you don't um they made this ridiculously simple uh let's shrink this back down so we got a little Dot and all you have to do is is just tag the things that you want to modify okay that's why it's masked out and put this black back line kind of around everything is to help isolate each of these different objects that you want to manipulate if your mask is still a little too big shrink it down a little bit and just put a little dot in that one object Okay so we've got all of our these little toys on the floor marked that we want to get rid of okay now the next step is you click create mask okay by default this box here is checks as ignore black area I don't know if I want to go into how how I how to describe this it's basically you got a black panel behind this and it's creating a colored shape to uh mask out each of these objects or even the the characteristics of an object okay so and there were some issues in the first versions of in paint anything where if you you uh masked a black area it created this mask that outlined everything it was really annoying so they integrated this so it ignores those black areas okay so now we're going to create mask we click create mask and what it does it comes down here and oh you know I'm going to redo this cuz that was from the previous time I was doing this so we're going to hit create mask and as you can see it creates these it kind of makes everything dark and then it highlights these objects okay exactly where the mask was up here you just you're just tagging it saying Hey I want this area this area and this area whatever to be masks so it does that now as we move forward you're going to run into some issues and I'm going to show you real quick what I mean by this uh when you let's say we want to get rid of these objects oh great we've got a mask so uh let's come up here to cleaner and this is the one that will erase objects and they have different models or different techniques on this too but we're going to stick with llama run cleaner okay we're going to run that and see what it comes up with and it doesn't do a very good job you can see it kind of mangled it a little bit so the reason for this is just like what I talked about in my previous video when it comes to giving the AI context of what you want to do so what they've done is they've they used to just have only the button expand mask region okay and you'd have to click that and what it does it expands this little Mass region you have to click it again and click it again to get it to incorporate enough area to give the AI context of what it is around that object but now they've incre included a slider bar you can slide up let's say we want to add I'm guessing this is like 10 iterations so we're going to expand that so it would do it like 10 times see now we got these nice big Mast areas around those objects and those seem big enough we can try that and see let's go ahead and hit run cleaner and it's going to go ahead and erase those objects now that didn't do too bad of a job you can see a little bit of weirdness going on in there and again that's because the Mast areas are not quite big enough I would actually just do expand M area one more time even by 10 uh just like in my previous video you see how it's kind of incorporating part of the ball here and and the part of the ball here that's okay um again the AI knows how to adjust and accommodate for that so we're going to hit run cleaner one more time should get a much better result perfect that's awesome see how it it Incorporated the ball Blended the areas it's like they never existed at least in these images they didn't okay now a couple other things we can do with this um I want want to send this object so it's interesting they actually give you two different I don't know if this is a glitch in mind there's another inpaint anything area down here where you can do the same thing we're doing up here so I'm not entirely sure what's going on there I don't know if maybe I had this installed twice at one point I don't know but what we're going to do is I'm going to get this image I'm going to put it up here Boop like that okay all I did there is I dragged and dropped it I love automatic 1111 for that makes it super easy to move things around okay we're going to run segment anything again and you'll see those objects disappear here once it gets that mask done and they're gone okay let's say we want to uh change the color of some of these balls let's say we want we want a red ball we got two orange ones we got a blue one purple one got a pink one a green one okay they're all different colors except for these two okay I want this one in the back to be let's say let's say we want to make a red okay um what I'm going to do is I'm going to mask the areas that Define that ball okay and you can do either one click in each of these uh but if you maintain just in that area you just basically mask out those little colored areas that Define that ball okay run the create mask and we should only get that as a masked area just like that perfect we're going going to expand that mask just a little bit okay there we go okay now what we have is we want to change it so we're not going to be using cleaner here okay we actually want to do in painting and at this point we want to utilize a positive prompt we're going to do Red Rubber Ball um I don't think we really need for what we're doing uh a negative prompt okay now they give you a list of of models that are compatible with this that you can use to do the positive prompting or the changing the in painting uh I think for this uh rev animated I think it's going to be great rev anime is actually a wonderful model I love it and we select that one let's go ahead and run the in painting let's see if we get what we're looking for okay so we did get the red ball it is interesting that it it's kind of highlighting this outer edge here a little bit so this iterations thing I'm a little unfamiliar with I'm going to give that a test I want to see what that does I don't know if it's like iterating like giving me two different versions of it I'll bet you that's what it is let's try that and sure enough yeah it rendered two different images ah there we go that's a much better ball I like that one okay I mean it's pretty smooth I mean it doesn't have a lot of detail like some of these others have lines on that's okay U some of them don't so it's great um we did get a little bit of red reflection on the floor there which is good hid behind this toy right here whatever this toy is I might just get rid of that one all right so those are the simple aspects of this I mean you can remove objects which is great just like I said just got to make sure you give it enough MK area to um to actually give the AI context okay and it looks like I believe they've integrated uh the ability to create your own masks let's see trim mask by sketch add mask by sketch there we go I forgot about these so um when I was working with this before sometimes when you expand the mask too much or it would uh mask out all those little black lines I actually had to go through and uh clear out those by doing trim mask by sketch so you can actually customize the masking on it uh to give it what you want again it's just like any other uh painting uh integration you can erase the current mask uh let's say we want to do this and add mask on that um this would be interesting and I want to just uh run in painting on that again I want to see what it does okay yeah I'm a little weird we got demon dog going on here here anyway so yeah because it's you know I got a Red Rubber Ball tried to create eyes just red rubber balls uh anyway I'm getting a little off subject here okay so as you can see we have the ability to manipulate all sorts of different objects in here and this makes it so much easier than than trying to inpaint manually using the inpaint uh method over here under the image to image tab now don't get me wrong this has its place but with the improvements that they've made yeah looks like I have two tabs up here but it's putting it all under one tab um with the Improv improvements that they've made you can do a lot of really cool things with this I mean let's say we want to instead of a puppy here um let's say we want to change this into a cat Okay so let's mask out that let's mask out all this again I'm just using a line okay I'm just using a line to do this and then we're going to create the mask while we're doing that let's go ahead and change this over to cube kitten all right so we are going to expand the mask as well I want to give it some context so let's do expand mask so we got enough mask around the object that n I'm going to do it one more time I want to give the AI the ability to really create something there so now we're going to come over here we got cute kitten in there and I think that's it let's go ahead and run in painting and there we go we got ourselves a kitten now um you can change your model here to try to get different results or just do different itations obviously to get a different kitten but you can see that it integrated it really well okay um you're probably by now getting a really good impression on how powerful this actually is this is an amazing Tool uh to be able to modify and change things uh let's try one of our more comp in the previous video I tried doing a more complex uh eraser so let's dive into that so what we're going to do we're going to erase the existing mask and what we did in the other video is we got rid of these objects up here okay we're going to see how good the cleaner is with this let's go ahead and mask out what we want here so we're just going to draw a line all the way down to there all the way over here make sure we hit all these colored areas okay let's check that mask let's make sure that it shows what we want to mask out okay and it looks like we need to hit that that maybe something up here what else maybe over here a tiny bit okay let's hit that mask one more time and I think that's fine what we're going to do is um we're going to expand it just a little bit there we go I think that's good so what we're going to do is up here to in painting oh no let's see if we can do the cleaner this is going to be interesting you know I think what I should have done honestly uh we don't want to get rid of the wall all we want to get rid of are these things here so let's just try that and see if see if that is what's going to do it for us here let's try that create that mask again we're shooting for anything but the wall all right we're still getting the wall which means one of our masks is touching the wall so let's reduce our MK down Mark that that that we're just clicking dots this time except for that one we'll do that dot dot let's draw through that [Music] one that one okay let's create that askk there we go okay so we got a couple more things here I think they said you could do s for full screen there we go so let's see if we can zero in on some of these areas here um we are going to reduce that mass down as small as we can get it because we want to Mark the black areas here which are really hard to see get those they're probably not black you know they're just a different color okay now I want to say it was shift R where's the instructions when you need it there is s there we go so we got those let's check that mass see if we got it I think we did so we're going to expand that mass just a little bit looks like we got a couple missing but you know what I'm not going to mess with those um in fact let's expand those this may mess things up so now we got everything included we're going to use the cleaner let's run the cleaner not bad it's okay again when you're working in bigger areas like this it can be a littleit a little more difficult let's try ldm see what it does give a second some of these may take a little that one definitely took considerably longer it was a good few minutes for it to finish up what it was doing and did about the same amount of uh job on and left some outlines so I'm not sure I like the ldm Llama works really fast does a pretty good job um again when working with larger areas like this you're going to get some artifacting so you may want to start little by little and even instead of using the mask area up here what you do is you just manually mask everything I may have to reset the whole interface on this one oh no let's let's get rid of that let's trim the mask rid of that now let's just go like this we're just going to get rid of that first might be quicker to do it this way um because then you're just working with that particular mask so and it you know part of the the problem no we're not we're just using the cleaners we're not using a positive prompt or anything but you get the idea so you can go through and erase specific objects modify certain objects this is a powerful tool um under the in Pion you can use positive and negative prompts you do have access to more of the advanced functionality like the number of steps and the guidance scale the seed and everything so um definitely play around with this uh this is going to give you um a lot more capability and be able to execute a lot of those things the you're spending a lot of time using inpainting for uh you're going to be able to get them done a lot quicker using the in paint anything tool so uh tell me what you think like And subscribe uh we are really enjoying a lot of users that uh get come onto our Discord Channel as well give us uh some feedback and we'll talk to youall later
Info
Channel: AIchemy with Xerophayze
Views: 1,486
Rating: undefined out of 5
Keywords: Inpaint Anything, Inpainting, Stable Diffusion, Automatic 1111, Image Manipulation, Advanced Editing, Image Retouching, Creative Techniques, Digital Art, Photoshop, AI Models, Editing Tools, Photography Tips, Visual Effects, Object Removal, Image Enhancement, Photo Editing, Creative Process, Xerophayze, Arcane Shadows, Inpainting Extension, Image Restoration, Advanced Inpainting
Id: SMhsjnOWSMk
Channel Id: undefined
Length: 19min 28sec (1168 seconds)
Published: Sun Nov 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.