ComfyUI Inpaint Anything workflow #comfyui #controlnet #ipadapter #workflow

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi today we will see how to change very small parts of the image and still get good results in terms of details and the combination of the new pixels in the existing image we still use the Imp painting Principle as we saw in the previous videos only this workflow is adapted to the ability to change very small parts of the image and still get good details let's understand the problem first the smaller the resolution the fewer pixels we have to work with and the result is often unsatisfactory it is even more problematic if we make a change of a small area in the image that already comes with a very low resolution the solution is quite simple you can take the part of the image that you want to change enlarge it so that we have more pixels and after making the change reduce this part back to the original size and place it in exactly the same place in this way we allowed the model to work with more pixels and the chance of getting a better result increases significantly the point of finding the specific position of the cut in the image can be a somewhat annoying process and take a lot of valuable time and then we have to enlarge this part in such a way that we can later reduce it exactly to the original size and then we have to do the same with the mask in short it is a process that can be very frustratingly long and uncomfortable and that's exactly what I tried to do in this workflow to make the whole cumbersome and frustrating part automatic which gives you the possibility to draw with a mass the specific position where you want the change on top of the original image here there are all kinds of nodes with the help of which I cut the original image according to the mask that we drew I enlarge only this part to a resolution that fits the sdxl model there is also the option to blur the mask something that should be played with a little depending on the size of the original image and the size of the area that you want to change I hope that soon it will be clearer here we see a preview of of the cut and a preview of The Mask which we send to latent space for in painting case sampler is very basic and adapted to the model there is also differential diffusion here IP adapter if you want to use image as a reference down here you can find a control net with depth anything which can help the model understand a bit the space of the source image also the control net in certain situations can be set to bypass it all depends on the case of course from here we come to the last part part of the workflow the connection of everything together with the original image here too the final result depends on many variables sometimes it will work for us on the first try and sometimes we'll want to change something small or add some of the new pixels to the mask that was created automatically with the grounding Dino node and that can be done here just choose open in mask editor and draw the parts you want to add and sometimes we will want to remove certain parts of the Mask in order to reveal in these are is the pixels from the original image and we can do that in this node that I have colored in Red so that it is a little clearer to contain the changes we made in The Mask you have to press q and then you can also see the result in the preview window important to note that you are working with the fixed seeds so that you can make the changes without starting the process over and over again there is a save node here that I put on mute to save the pictures you have to activate it data that changes depending on the size of the original image and the size of the masks The Mask crop padding affects how many margins there are around the area we drew wide margins allow a better connection to the surrounding pixels on the other hand two wide margins will reduce the resolution of the area we want to change the mask blur can help with a better combination to the original image but you need to see that it does not create gray areas in The Mask in mask composite you should pay attention the automatic mask is created with the help of the anything sometimes you have to play with the threshold and sometimes you want to add your own keywords for that there is also a text node that is not connected at the moment and if you want to use it just connect it to grounding Dino and in some situations either the segment anything doesn't work as it should or you want to paste the whole result there is a mask switch here one defines to use the mask created with the grounding Gino and the changes we added and two defines to use the full mask that is to paste all all the changes we created and perhaps one last thing in the part of the prompt note that there are two input texts here one for the object you want to create and the other optionally for the context of the object sometimes the addition of the environment or the context can greatly help the model to understand what you mean at the request of some of the viewers in the next lessons we will return to dealing with the basics a little more so I really ask that you write in the comments of the video which topics are most interesting to you so that we can focus on them so as usual I hope you learned and we will meet in the next lessons you are of course welcome to subscribe to the channel ask questions and like if you like them and most importantly have fun bye
Info
Channel: PixelEasel
Views: 7,172
Rating: undefined out of 5
Keywords:
Id: _LuPU5woth0
Channel Id: undefined
Length: 5min 16sec (316 seconds)
Published: Sun Apr 28 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.