Changing Images Backgrounds with Stable Diffusion and Automatic1111

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
changing backgrounds has never been so easy and exciting especially if you don't have Photoshop skills like I don't have so we'll cover how to turn image like this into this we will be using stable diffusion and we'll cover how to do it within painting and I will also cover a very awesome feature that you will love and in the end we'll cover how to change small details in these backgrounds let's jump into automatic 11 11. the first thing to do is to select a stable diffusion checkpoint I will go with rev animator and for these techniques I'd suggest you to select an in-painting version now go to the image to image Tab and here select the in pane tab select the image and drag it here I'll be using this from Deadpool tree so the next part is the most important one we need to paint the mask of what we want to change or this Versa and what I recommend is to paint the one that is easier you can start by painting big areas in my case I will paint the ground the Deadpool and Wolverine this area is what I want to keep so I will mask what I want to keep but you can mask what you want to change in this case the background once you have the entire mask it's time to write our prompt and for this case we'll use some small prompt of multiple explosions we want to turn this picture more interesting then you can select a generic negative prompt and in the parameters you can select crop and resize if you are using an image with different dimensions from the output one I will go with 768 by 512 landscape regarding the mask mode make sure that you select the right one for this case I want to in point what is not mask and choose the sampling method that you like the most the remaining parameters can stay as default now let's generate a new background well pretty cool explosions this seems way more interesting than the original picture so let's generate five more image to see if you get more cool explosions remember that you can always add more details to the image and the prompt each time and here are the results now we have material for a real action movie now it's time to move to another way to change the background by using in paint anything and pay attention because this tool is awesome if you don't have this extension you can go to the links in the description and install it from the URL make sure that you also install the segment anything extension which is another fantastic extension that we'll be using so you need both extensions coming back to the endpoint editing tab select a model here I'll be using this one but if you already use this extension let us know in the comments what model you prefer then if you don't have this model press in download model in my case I already have it now drag and drop the image that you want and pay attention what I'm about to show you is awesome this is where the magic of this extension happens here in the padding area you don't really need to make much so we are sticking with the default values but now pressing the Run segment editing button and wait and voila with the segment editing model you are able to segment any object from an image and this is really useful for several use cases we will use this to match the areas that we don't want to change RV's version all you need to do is this what you are seeing you just need to Mark each colored segment to create a mask of the segment watch this when you press in the create mask button it will process a mask over the areas that you selected but careful there is one thing that you should have in mind you should not wrongly select or misclick in areas that shouldn't be masked watch what will happen here it will mask the entire black segment to save you time from this error you redo your last selection and use a smaller pencil to select small segments right now you can probably see the pencil but here it is aligned All Right Moving On here's another tip for you keep marking areas but press on create math to keep checking if everything is fine this way you won't have any problem and you won't lost time in the process alright now that we have our mask complete let me know in the comments what mask process do you like the most in paint versus in paint anything here we have a couple of functions from this extension that are really cool but for now we will only use the mask only tab pressing that Tab and then pressing get mask and send it to image to image in point now let's write another prompt for this use case I will go with cyberpunk New York City street neon lines and night sky in the parameters we don't need to change much but we'll keep crop and resize as well as in paint knot mask and regarding the resize let's switch to the values because now we have a portrait image now let's generate image with a new background well awesome image now we have that pool and Wolverine walking down in a cyberpunk New York City but we have a problem here we have these strange hair that is not supposed to be here we are going back to the in paint editing tab in here you grab the mask and then you need to expand the mask region so press in the expand mask region but be careful you don't want to do this too much now we send the mask to the image to image in paint again and generate new image well as you can see it really improved our images and mitigated the problem now picture this scenario you have an image that you really like but it have a defect that is ruining the picture send the picture to inpaint and paint the areas that you want to clean or remove like I'm doing here then you can just resize what you need to select in paint mask to change what you've just masked now you generate again and the image should be better well in this case we need to make more changes the tip is to keep interacting until you get what you really want it is necessary here to give more context of what it is needed to change so I just need to increase the mask to the buildings area in the background as you can see this area got really better so have in mind to keep interacting with this process until you get a perfect image so if you want to watch more videos about stable diffusion take a look at this release Here otherwise thank you for watching peace bye
Info
Channel: Rocketing Data Science
Views: 13,739
Rating: undefined out of 5
Keywords: stable diffusion, stable diffusion tutorial, ai art, change background, replace background, edit background, automatic1111, fix image background, automatic1111 tutorial, how to change images, how to change background, generate background with ai, ai background, remove background, edit photo background, deadpool, deadpool 3, how to edit photos with stable diffusion, how to edit pictures with automatic1111, stable diffusion beginner tutorial
Id: E7Gq8PhkDlY
Channel Id: undefined
Length: 8min 29sec (509 seconds)
Published: Sat Aug 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.