AI Removing Backgrounds in Stable Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there in this video we're going to remove backgrounds on a AI generated image and we're going to use it stable diffusion with automatic 1111 installations and we're going use a special extension for this so let's go first install our extensions and we're going inside the extension tab we're going click on available next click load from after this I'm going to just uncheck install it because this extension already installed on my computer next I'm going to type remove background it's okay just type for Lis Ram B and you can see right here the extension up here in your case if you don't install it it should says install click on this and this will install our extension after this I highly recommend to restart a server itself because it will use some dlll which need to R register with your application after you restarted it should showing in your extension installed as available and enable as well you can go and verify if you're going inside the extras and you scroll down below and you can see now remove background should be available for you so let's go ahead and see how it will work first we're going to text to image and let's type some prompt so I'm going to use it Warrior woman golden white armor portrait and negative NSFW new deform ugly crop we're going to use it sampler method let's DPM to cars and we're going to about 35 sampling step as well because I want to do portrait I'm going um change from 512 to 768 so it will be about 2x3 so next we'll leave it CFG same and we leave all as default let's go ahead and click generate okay so right here we have it our image created next we want to remove it this is located in extra to send to the extras we just go down below and click on icon that says Send image in generation parameter to exra tab let's go ahead click on this and here we should have our single image available so let's go see what parameters we have it we leave it everything as default I just want to go down to to remove background and select U2 net we'll leave it everything by default and let's click generate and right here you can see our image without background this actually did a very good job we also can verify this by using Alpha mask and this is useful because we can use it Alpha mask in our animations so let's go ahead down where is a remove background it will just click and says return mask checked let's go next and click generate when it's completed you can see right here we have our mask working and it's actually done very good so in this case we can use this mask and other elements with our um project like for example animations to do the animations in multiple you want take image split next we can go inside the batch processing from directory and specify input and output but we'll do this if you want to render series of the images for example for your animations or other things um I'll show you how to do this with our extras and it's just we're going to use a batch from directory the reason why you want to do this for example if we have animations and we create our character sometimes background may be um not what you're looking or you want overlay so in this case we can separate characters from background so let's see just on a normal what we're going to do I have it right here in the directory already done the frames that already created and output we'll just go ahead and select our different directory for this let's go ahead copy paste so we have our frames and output we'll just skip it this to zero to one all of the stuff all what we need to do is just go ahead enable and we want return mask is Ena so this is will be our original frames and our output should create it just a mask let's go ahead click generate and notice at this time we don't really worried about any model we using or anything because all what it does is need to recognize our object and create creating for us output frames and we'll monitor our output directory you can see right here it's creating those frames with the alpha mask for us so it's kind of very nice it does now depend on how many images you have it and honestly I have it quite bit here frames so it may take a little bit time to create again it is easiest way to create a mask so I did interrupt a little bit early but you can see right here we have it all this mask already done for us that's actually work very well next to use this you want to go inside the image to image and inside image to image we have it options below where we have it in painting and batch so in painting uploud this area you will use it if you need to do a single images for for example you can go ahead and put it a mask in one and you can put it the image in second this way is change fill up your fill up what you want to render in background and everything and it will work with a batch will be very similar so let's go click on a batch and you notice right here you have your input directory and this is where the images is reside in our case it will be this one so let's go next we want to output and we have it render and of course if we need it have it our mask we can go ahead and put it mask directory right here so this is how you want to do it the you may need to have a little test or you needed inverse your mask so what's happening if we're going to in paint paint and you notice right here in paint a mask by default so it's meaning this person will be changed so I will just go ahead and type something just a color so we can preview okay we'll just leave it everything as default uh maybe change back to ours 30 I think everything just by default so I just want show you what areas we'll paint in this case and you can see right here is see kind of reddish the mask inside so you want to be in paint not mask then the model that we using should be fine and background kind of reddish well let's try to read red so I'll put it on a background now also I think I need to actually put it properly with because it's a white screen for this but you can see how it's work and effecting in this case case so the same if you do with um the other ones with a batch you may need invert your mask but it's okay just start processing and you'll notice if you need to do this way some additional properties I want to show you if you want fine tune The Mask it's applied if you're going inside and click Alpha meeting right here you will have it threshold for the foreground and the background and you can change them by decreasing threshold for the foreground and increasing for the background to cut a little bit more off as well as a road side it is on the side how much fist you want to add in some cases I found that this V variables does not necessarily work as precise as wanted and I don't know if they will be update in the future but General even with a basic preset as it still perform very well well I hope you found this video useful give some additional information and a way to process your images and videos with a compositing and impressing background thank you for watching and have a great day
Info
Channel: Vladimir Chopine [GeekatPlay]
Views: 1,726
Rating: undefined out of 5
Keywords: Geekatplay Studio, Vladimir Chopine, Digital art, How to, Learning Photoshop, 3d tutorials, Digital compositing, How to do in Photoshop, How to do compositing, How to do in 3d, AI art, MidJourney, Stable Diffusion, Dreambooth, Dall-e, Free resources, Free learning, Digital art for begginers, Free tutorials, artificial intelligence, Digital Photography, ai mask
Id: EDEJORctZ7k
Channel Id: undefined
Length: 9min 14sec (554 seconds)
Published: Tue Dec 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.