ComfyUI simple Inpainting image to image #comfyui #stablediffusion #inpainting

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi today we will see how we make changes in certain areas of the image without affecting other areas and we will do this using masks in comfy UI this this process is called in painting and let's see how we work with it as a start we need to create a picture that will be our basis we can bring another picture but we are in comfy so we can just create the picture here a photo of a beautiful girl wearing a red shirt I created four different variations for us let's connect this for a moment to a preview image and of course this workflow and the in paint workflow will be in the description of the video this is a result that I quite like so let's move on and let's create the workflow of the in paint together I can continue working from here but I want that you'll have the option to upload any image and won't be dependent on creating new images so we've moved the image here now we need to convert the image back to the latent space so we need to encode I connect the vae and now we have a latent that we can work with actually our ability to work only on the area of the mouth and make it smile is by using a mask to get the mask I press the right Mouse button add node goes to the latent menu and in in paint I choose set latent noise mask this is the node that allows me to create a mask to my latent area now I have my latent that I can connect to the case sampler let's just copy this case sampler with all the connections contrl C to copy control shift and V to paste with all the connections and connect the latent we created and we want to take the vae decode with the preview image paste it and connect to everything so that's our workflow all we have left is maybe to change the seed connect new prompt for the change we want to get now we can simply press the right button on the image and select open in mask editor as soon as you click on this option a window pop up here you have a brush that can be bigger or smaller and simply draw where we want the mask or in other words the area of the change if you accidentally made a click and you want to delete click the right Mouse button and draw while you hold the right button it deletes the mask here we have to connect the mask to the mask and of course what we want to get I write smile and I forgot to connect two things the vae here and the clip here now I'll click on Q again as you can see we got smiling girl if this is not the best smile or that I would like to have different result I have several ways to play with it first of all I can change the seed and expect a slightly better result and secondly what I can do is to play with the deno in fact Deno means how close the image will be to the source image if I do such a small amount of denoise you will see that there is almost no change and high denoise gives us a very high change in relation to the original image the values here are between 0er and 1 so pay attention to this and here you see that we got our girl smiling another thing to keep in mind here is that sometimes our mask is not accurate enough so let's change the mask a little bit and see if there any change you can see that here we already get all kinds of small parts that do not necessarily fit it is worth paying attention to all these small parts to adjust the work as much as possible as I said this is a very basic mask in comfy there are more complex masks that give you better control but we will get to that in other videos let's let's make another change let's say we want to turn it into a blonde so we type blond hair and now it'll open the mask editor again let's edit the smiley picture so it will be also smiling and blonde and now on this picture we will to draw the hair or the area I want to change the hair in this case now it is very important to be precise with the mask it's a bit hard in hair and things like that but let's do it in a relative short way click save to node and Q and you can see that I now have the girl with a smile and also with blonde hair and let's now change the color of the eyes we need to edit it here and on this image we'll use the mask editor and draw the eyes it's relatively easy because the eyes are round like the brush so just need to find the right size and click I also clean the top that won't be affected by the change of the color and let's click on the Queue so this is our way to take an image and turn it into another image while we are keeping the characteristics of the character or of the things that we do not want to change in the original image so I hope you learned and that we'll meet in the next lessons you're more than welcome to ask questions comment and like and most importantly have fun bye
Info
Channel: PixelEasel
Views: 2,613
Rating: undefined out of 5
Keywords:
Id: vY4QwnR4R2M
Channel Id: undefined
Length: 5min 22sec (322 seconds)
Published: Tue Feb 13 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.