Face Consistency and Swapping with ComfyUI and Stable Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in this video we're going to be taking a look at the really powerful new features inside of comfy UI the reactor or the fast face swap this is amazing technology and uh I've played around with it for a while and it's a bit difficult to get going but it's really worth uh taking a look at the software allows us to change a person's face using very very powerful models and it has a wonderful really wonderful workflow that you can uh get used to now before we get into this one of the things I have to mention is that the I recently did a video on how to install stable diffusion with comfy UI in s 7 minutes this video contains some information which I will have to amend so if you follow this video you may have a little bit of things that you need to change and I'll come to that particularly about installing Python and how we work with python inside of this new situation inside of this new scenario now the software itself the technology is amazing and I'm really really fighting to I'm fighting like Muhammad Ali to try to stop becoming addicted to this stuff but I do have a couple of really important things to tell you we'll start off with the learning generative AI with sdxl stable diffusion and comfort UI this course has been going strong and if you want to join this course is for beginners I'll have a major discount in the description the course is one of several and you can if you finish this course go on to study some of the more advanced features inside of comfy UI now speaking of comfy UI I had to install comfy UI again for this particular project and that was because I had a lot of error messages when I was trying to get it to work you can do that with comy UI you can have many many different installations on the same PC because we can have a standalone installation of comy UI you don't necessarily always have to work with exactly the same one it's exactly what I found that I needed to do I needed to install a completely new version and that new version actually ended up working with a newer version of python so one of the things I mentioned in a previous video is that you should install Python 3.10.7 and that was an attempt to try to keep things really really synchronized and compatible between different versions of stable diffusion stable diffusion in comy UI stable diffusion in automatic 1111 and so on and so on what I found with this software was that I really needed to have python 3.11 installed so I uninstalled 3.10.7 and I installed the latest version of 3.11 another really useful thing is Visual Studio this seems to be a really important thing to get started and uh you might want to download download this before downloading the other stuff it's it's up to you but the thing that I found really useful was having Visual Studio build tools 20 2022 and you get this with down downloading the visual studio the community version so this one and that one both of those installed and if you have them already make sure that they're updated now the reactor page has got instructions on installation but to get started if you're new to comy UI uh this is going to be a really really difficult project to to work with if you are new but uh you can come to the code page you can click on the copy button and inside of comfy UI we navigate down to the comy UI folder custom nodes and then we rightclick and choose open git bash here and if you followed my installation video you should know how to actually set this up to get the software installed we come to this window type in git clone and then I'm going to paste the address that we just copied hit return and it should start uh installing this it doesn't doesn't take too long at all now sometimes I have to say when you're using this particular software you may find it conflicts with the version of python one of one of the other versions of python and in that situation you can do something different which is to right click and we don't have it here so you can come up here just type into the address there CMD and this brings up this window and here is where you type in git clone and then paste the address now for this project I actually found I preferred working with this terminal here now after a while it will install properly but you can also install and use the comy UI manager so we'll maybe take a quick look at how to use that a bit later on now once everything is installed keep an eye on the on the command window whilst everything is installing you'll probably get some error messages but once everything has installed you might want to restart Comey UI a couple of times come to the reactor window and then double click on the install.bat that will begin another phase of installation and that will probably come up with a couple of errors as well just make a note of what errors you get now if you do get errors the installation page for conf you I reactor node is your friend it has a lot of useful tips we've got tips on stuff that you might be need to be aware of about not safe for work stuff we've got troubleshooting tips as well and these I found very helpful this is where I first really came across the idea that I needed to be on 3.11 the other thing to really really emphasize is the usage so the disclaimer here is very important it's really really important important that you read the stuff about the ethics here they've got a lot of concerns about the ethical use of face whopping technology there's also some very e important stuff here legal stuff about the pre-trained models some of these models are automatically downloaded and some of these do not have a commercial license so they are open source but if you want to use them commercially you may need to develop your own models for this type of work so they are non-commercial you're going to use this for research and obviously with ethical concerns the the licensing is going to be a bit tougher we had Fairly tough licensing when sdxl first came out I think we had a we had a non-commercial license for that as well so be careful how you use it make sure you read everything now once you've got it installed you should be able to come here and uh either add a node and we're just working with the basic setup here the basic default setup uh stable diffus 1.5 and I think we go to image post processors we should have reactor fast face swap that gives us this little window here this little window and with this window we can do amazing stuff we can bring in a source image and uh we can load an image so this is an image I've used before and we can drag out and an input image and we can say okay let's produce an output image let's have a preview and when we hit run this section here will run all on its own and produce a combination of these two let's try that and see what happens okay it's looking a little bit rough so I'm going to change the restore model now whilst we're doing this it's a good idea maybe that I look at the manager and give you some idea how to use the manager if you've not used it before we need to go to install custom nodes and inside of install custom nodes you will see it something like this and you're going to have to search for the things that you want I think we could just go ahead and search for react and it will give us the thing that we need to install it will have an install button there just install that and restart and we can also go and let's cancel let's close out here we can also go and install models now I'm going to clear the search and we can put in so this is a little bit better we've got the ins swaer which is the one of the models from Insight face uh this one has been installed already we have a face restore code for forer that one has been installed and you just click on before they're installed let's say what you would do uh let's choose installed all and what we can do is just basically click on the install button find the but find the the particular model that we need so it's going to be one of the face restore uh in swapper is the one that we're using and you may find that you need to work with the the the location the exact location of where they should be stored um sometimes you might need to go and check online to see exactly where the file that you've selected uh needs to be put inside of the comy UI folder but with this one I found that it actually installed before I actually installed it here it was installed during the process when I was initially install ining the software now for this particular edit we can choose the code former and let's Q prompt and it will just process this so that the image will look a little bit neater so what we've now got is a combination of this woman and this woman in this image here so that was a fairly straightforward use of the software and what I've done is instead of actually bringing in two new images I've actually decided one of the images is going to come from stable diffusion itself so we create a stable diffusion and then we link that particular image to the to to the menu here you can see here that the image output goes to the save image here as usual and then we've connected this guy here so that it's connecting to the input image here so the input image is now coming from stable diffusion it's going to be this image and then we take this guy here the image that we opened up in the same way we opened up these guys and then we opened up an image and that image is the one that we're using to actually manipulate this image here to produce this image and you can see some of the results that I got before that's one of the images so here we're using a prompt which is beautiful Swedish adolescent face smiling and you'll notice with this image here it's taking this beautiful girl with the bright eyes and it's giving her the the face of the older woman we can go back a bit I put in a child again we've got really bright eyes for the stable diffusion and it's given us this older looking woman by combining it with his face it's really amazing how it does this now with this one the results were pretty amazing we had these three African girls and I asked it to combine the the image here with this image here here and you can actually see this girl's face reflected especially with this girl you can see the the features are exactly the same as her features even though the head head is turned so I had a lot of fun with this and most of the time what I found was that the image that was being produced here was quite a lot better than the image that was coming out of stable diffusion [Music]
Info
Channel: Pixovert
Views: 6,135
Rating: undefined out of 5
Keywords:
Id: r4DV3AyFL1I
Channel Id: undefined
Length: 12min 42sec (762 seconds)
Published: Fri Nov 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.