Stable Diffusion - FaceSwap and Consistent Character Tips - Part 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Welcome to Kleebz Tech and another video of my  continuing series on Fooocus for Stable Diffusion.   This video is basically a continuation of my  last video on face swap and tips for consistent  characters. If you haven't watched that, I  recommend watching it first. Don't forget,   I have many other videos on Fooocus, from  installation to poses and much more. So, one of the ideas I talked about for  getting a consistent character was having   it create a grid of four different angles of  the same person. The challenge was getting   the actual angles I wanted consistently. Based  on some comments and ideas I was looking into,   I considered using a reference chart to  guide those angles. I looked online and   found some references, but  decided to create my own. As you can see here, I changed  this over to a line art setting,   1024x1024. You could do this on speed, which I  probably should have, but what this does is   generate a human head facing left or  right. Once you get the angles you want,   you can connect all those together. After  generating those angles, I put them together   to create this rough draft to use for my final  one. You don't want to try too many angles because   when you upscale for face swap, if the quality  isn't high enough, you may not get good results. I've created this one now, and here, what I  would do at this point, once I've gotten those   different angles attached and put them all into  one reference sheet I want to use, is click off   input image, go into my image prompt, make sure  you have the advanced box checked at the bottom,   bring in the rough one I created, switch it  over to PyraCanny, leave those as they are,   that's perfectly fine for my purposes here, and  create another one. This will just create a new   chart, using the one down here as a reference  to create a bit better one. They're all more   consistent. I don't think it probably makes much  of a difference; that's just how I was doing it. At this point, let's say we have  the chart we want, which would be   perfectly fine for our purposes. I can go  ahead and cancel this one out down here,   also going to uncheck line art, set these  back to where I had them for what I was doing. Okay, so now I have my reference chart finished,  and I can use that to create the different angles   for that consistent character. Then I can  go ahead, come up with whatever I want to   describe the person, tell it I want a grid of  four images. It's going to use this down here as   a reference. Even though I could get that grid  without using that, as my other video showed,   you couldn't get consistently different set angles  that you wanted. This way, we're guiding it. Now, I'm going to go ahead here and  generate a character to use for the face   swap. I've got everything all set, got this  on PyraCanny, so let's go ahead and generate. I'm going to stop it there because I actually  got good enough results for what I'm going to   show. That gives you an idea of how you can  get those different angles now. If we had   set these stop at a lower angle, these faces  would have turned more towards the camera,   so that's why you want to play around with that  until you get the results that you're looking for.   But that'll give you a pretty good idea of how to  get that consistency for the different angles and,   obviously, which angle you use is up to  you. You probably only need one profile,   left or right, and then a couple of different  ones, and then you can work from there. So now we have our character that we're going  to use, but we want to get the quality higher   at this point. So I'm going to go ahead  and go into the upscale and variation.   I'm going to drop this down in here now. The key  to remember is when we go into the upscale here,   if we do the 1.5 or the 2x, that is going  to change it slightly. It'll vary it subtly,   so if you have exactly the face that you're  looking for, or if you use something else as   a guide for the face swap to get to this  or something like that and you don't want   to change that, you might want to just  do the standard 2x, the fast 2x I mean,   because that just does a standard upscale. I'm  going to go ahead and do the upscale 2x on this. Okay, since my system doesn't like to upscale  and record, I'm going to actually use the images   I created earlier when I was testing this out.  So, what I ended up with was this image here,   which was fully generated and upscaled.  Now, at that point, I split that into four   different images. I just opened it in paint,  cropped each section off, and saved them all as   separate images. So now I have four different  images that I can use when I want to. Yes,   more pictures are useful, and for one reason  alone, is I find a lot of objects. If you have   a hat in the picture and you only use one picture  with that hat, that's going to always have a hat   pretty much. But if you have multiple pictures and  only one has a hat, then it's less likely going to   influence those resulting images, and partially  that depends on the weight and everything else. So at this point, we have our four images  that we have. I'm going to put all these   on face swap for now, but I'm going to actually  demonstrate that there are benefits to more than   one and just having one. It all depends  on what you're shooting for. Basically,   if you're shooting for exactly the angle that  you have, like the straight at the camera,   I'd probably just use the one here and I'd get  rid of these other ones because I have no reason   to have these other images because they're  going to actually potentially negatively,   you know, influence it. And lowering the  weight on them isn't going to help either   because that what that does pretty much is it  influences it not only by just not using those   as much but also you'll find you'll get less of a  resemblance, I found at least, it seems that way. If I go ahead and I'm just going to say,  let's see, a beautiful woman with red hair,   silver blue eyes, oh let's do long. hair. Okay,  so now we'll go ahead and generate. We have this   set for all these set on face swap, and we'll go  ahead and generate on quality. Now, the one thing   I find when we have the multiple angles in here,  I get more variety when I don't do anything else.   When I just put in 'having coffee', if I remove  that and only just have one of these in there,   it'll use that. So, if I were to just have the  straight-on one, almost all of them will come   out with the straight-on look. If I use one of  these other angles, that'll impact it as well.   So that's one thing that I found that really  helps you shape the generation. So, you can   use the prompt. I'll show you, for example, here  we'll do. We're going to get rid of these two. So,   I'm going to do the same thing, but I'm going  to say 'side' and the thing I've left is down   here on the profile view more. It's not exactly a  profile, but it's much closer, and I got to crank   up that weight. I should have done that before,  but we're going to do it quite a bit there. Now,   I'm going to go ahead and generate again on this,  and we're going to actually use the same seeds   for these, and we'll generate. So now we have  shots that are more in tune with that profile,   semi-profile shot. I don't know what you want to  call that. But if we have more of a profile shot,   I didn't actually have one in one of those,  yeah. So that's when you can use your other   slots to bring in, and it doesn't want to do it.  Okay, there we go, and we use Pyracanny. So now we have   our face, and we have our pose that we're looking  for, and we're going to go ahead generate. Okay,   so you get the idea. Now we have the pose we can  utilize. The problem, a lot of times, you're going   to have to work on the eyes. A lot of these things  also, you can adjust the weight. So, I'm not going   to go through that and keep generating, but a lot  of times, increasing or decreasing, keep playing   around with it. So, if we want to have less of an  influence, you know, we could lower this down a   little bit, but you're going to lose some of that  similarity potentially. So as for impainting and   face swap, I find to get mixed results. There's a  lot of factors that come into play. The face, what   you have, I find when you're generating, it works  pretty well, very well. I actually find I can get   very good results. But when you start doing the  in-painting, it's not always the greatest. I'm   not a big fan of... Well, let's start with this.  I'll just demonstrate a couple of things now. There's a couple different ways you can  do this, and really, a lot of times,   one comes out better than the other. So, I  experiment and usually try both to start with,   and then whichever one looks  better, I work from there. We're going to use this image, we're  going to use this one, this face,   as the face swap for this. I will paint over  the area. Now, remember, it's going to have   to blend things in, so you want to be careful  on how you do this. Sometimes you want to be a   little more accurate when it comes to skin  shade because sometimes it will get lines. And then under the advanced, you're going to have  to go into the developer debug mode, and in here,   you want to check off 'mixing image prompt' and  'in paint', so you want to have that checked. Now,   depending on what you're doing, the method that  you do, you would also need to keep in mind when   you—this is what it's normally like when you  do the Imp painting, there's a refiner switch,   and what happens is, if you just do regular  imp painting like that set right now without   changing anything, the last like approximately  30%, it's going to change the image, the face,   so much that it probably isn't going to look like  the same. Sometimes it does and tricked me before,   but, so what I find is, you have to go in into  the developer debug mode and also change the   'force overwrite refiner switch' step, and if you  set that up into about 50, 48, you can go ahead   and generate and get some images. The problem  is, you're not going to get some of the great   ones. You'll get, they'll still work, but, that's  one method of doing it. So you can do it that way. And then the other way is to improve detail, and  then we can go in here, detail, girl face. Now   when you do it this way with the improved detail,  you don't need to change the refiner switch,   but you do need to have still the mixing image  prompt and the Imp paint set. So we'll go ahead   at this point, we have these set to a high  weight, I have the in paint or out paint,   and we have that set to the detailed face,  and we're going to go ahead and generate. Well, I'm just going to generate one on that  for now, just to show how it works. Okay,   so now we have our final product there. It seemed  to have done a better job than the other one. Now,   the other thing you can do at this point,  if we want to, and I'm going to show you   a different method now. This can be done with  or without the in-painting. I actually use it,   sometimes I'll do the in-painting first like this,  and then I'll go into the upscale and variation. Now in here, we have to change this from the Imp  painting or... well, we don't have to change it,   I think you can leave them both on, I don't know.  But mixing image prompt and very upscale now,   and so in here, I'm not, I'm going to put it on  this vary, I'm going to drag this down here. So   that's the one we just did with the in paint,  we could have done it with the original as   well. Hit or miss on which one you can, you can  experiment with all these different methods. This is the face we're going to be using for  the face swap, but now it's going to be under   the very upscale. I'm going to get rid of this  one in the in paint, so there's no confusion.   And so at this point, we can also try to get a  different expression. As somebody had commented,   you can use the variation to try to get one.  So I'm going to go ahead and use a big smile,   and I'm going to actually just increase  some weight because I do know one thing,   usually you need to increase that weight.  I'm going to lower the stop ad on this   to make it a little bit easier,  hopefully, for it can to do that. Okay, so we now have our variation on that  other one, and we can pull that up now. I'm   not a huge fan, I still think it's not great.  I would go in with photo editing app and adjust   the colors slightly, but it did a pretty good  job with the face swap to get that smile. You   do need to reduce the weight a little  bit, so you're going to lose a little   bit of the similarities, but everybody's  faces are different when they're smiling,   angry, different expressions. So,  that's how the Imp painting works. Like I said, that's hit or miss. I've  gotten some really good results out of this,   and then I've got some mediocre results out of  this, and not so great results out of it. But   one of the biggest things you want to remember  is, if you're using this straight-on face in the   face swap and you're generating with that, the  face is going to always want to be pulling and   looking at the camera when you go to generate  anything, no matter what you try to generate. Just keep experimenting, but those are a lot of  the tools that you have at your disposal. The   upscale and variation one, I didn't mention in my  last video because I didn't even think about that,   but that works, that actually works pretty well.  Sometimes, if there's only one person in there,   I will just use that. I won't  bother with the in-painting at all,   I'll just skip the in-painting and go  right to the upscale and variation. If you found this video helpful, please do  consider the like button because it does   help. Don't forget to check out my other videos  on focus, and any questions or even more tips   on getting better results, definitely leave  them in the comments. And have a great day.
Info
Channel: Kleebz Tech AI
Views: 17,515
Rating: undefined out of 5
Keywords: stable diffusion tutorial, stable diffusion, controlnet tutorial, stable diffusion secrets, controlnet stable diffusion, digital art, automatic 1111, stable diffusion tips and tricks, fooocus tutorial, inpainting stable diffusion, stable diffusion install, foocus, run ai local, fooocus consistent character, focus ai tutorial, FaceSwap, Fooocus faceswap, swap faces ai, ai face swap, stable diffusion face swap, face swap tutorial, ai consistent characters, stable diffusion grid
Id: MntZa4qLwn8
Channel Id: undefined
Length: 16min 1sec (961 seconds)
Published: Sat Feb 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.