Remove ANY Background with Stable Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey there everybody and welcome back to another stable diffusion tutorial where in this one I'm going to show you how to remove the background from images because we keep generating images and there's no way to separate foreground from background without doing some fancy depth map stuff so to do this we are going to install an extension there's a link in the description just copy this and we are going to install it and then use it so once you've copied the URL go to extensions install from URL and then paste it click install I've already done this and then you are going to want to apply and restart your UI so we've installed the extension and we're restarting the UI so that it is applied into our automatic 11 11. now all we have to do is generate an image and remove the background so let's say and you can use any model for this I'm using realistic Vision you can use standard you know stable diffusion 1.5 so I'm going to say a bald man smiling that is going to be my prompt and we are going to remove the background of whatever this gives us okay in this case it's pretty simple it's a great background but we still want to remove it so once you have your image go to send to extras this is where the remove background lives you can see in extras we have removed background and we want to resize by one I don't want to do any resizing so I'm keeping it at one and then for the remove background you have a couple options you can play around in general if you have a human maybe use human seg which I think stands for human segmentation if you have a different subject you can use a different one and you can play around with these but I'm going to click generate and now you can see it's completely removed the background so we can actually go into the files here and download this as a PNG or you could just right click save image as PNG let's try generating another one maybe with a more complicated background let's say forest in the background because it keeps giving us Gray images so I just want to make sure that it works with more complicated things so here we go we have a man smiling he's bald great and there's a forest in the background sent to extras as again I'm going to use human segmentation I'm going to click generate and look at that it's separated for other kinds of generations I found that a U2 net works pretty well depending on your thing but you know that that that's the thing so hopefully this was helpful I'll see you in the next video and if you found uh this video helpful and you like what I do there's a link to patreon in the description where you can support what I do directly and keep these tutorials coming thanks for watching
Info
Channel: CGMatter
Views: 37,399
Rating: undefined out of 5
Keywords: stable diffusion, remove, background
Id: Ki_ZcF_u23I
Channel Id: undefined
Length: 2min 40sec (160 seconds)
Published: Thu Mar 16 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.