Stable Diffusion - BAD AI Hands and Ways to Fix Them - Fooocus

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello, Rodney here with Kleebz Tech.  Today, at the request of many subscribers,   I'm going to go over some tips on  dealing with bad AI hands in Fooocus,   stable diffusion, AI in general. Don't forget  to check out my other videos on Fooocus as well. The first big tip to generating great  hands is actually a negative prompt   that I've discovered. Just put "Uncle  Jack Kelly" into the negative prompt,   and you're going to get hand results  like this. Okay, I wish that was true,   but I do wonder if these AIs have watched too  much "Always Sunny," and it has poisoned the well. One of the reasons why AI has  a little bit of difficulty with   hands is partially because hands have high  detail density, and they usually take up a   very small part of the image. When the AI  generator has fewer pixels to work with,   it makes it more difficult for it to really  show what the hands are supposed to do. It's the same idea with their training data.  Most of these images, especially for SDXL,   were trained on 1024 x 1024 images.  So, the further back you look at   actual images of real pictures of that  resolution, you'll see a lot of times   the hands and things like that are hard.  They don't look right in those either,   a lot of times because it has a hard time  showing that detail with only a few pixels. So,   I think that's one of the big reasons why we get  a lot of bad hands because that's what it sees. Now, one of the biggest things that I suggest  when it comes to hands is to avoid them when   possible. If there are no hands to fix,  then you have made things much easier. Now,   you might be tempted to put in your prompt "hands  behind back" or something similar, but doing so   will actually most likely lead to more chances  of the hands since it'll see the words "hands"   in the prompt as well as "back." So, it'll most  likely show the person's back and their hands. There is another solution that works somewhat  well, and that is when it comes to hiding the   hands. For example, in this one, I have  generated four images of a woman standing   on a sidewalk. As we can see here, every  single one of them has her hands visible. Now,   we can go ahead and fix the hands if they don't  come out right. That's one of our options. The   other option is actually, and I have issues  with the negative prompt a lot of times;   it doesn't work that well, and even in this  case, it's not going to work every time. But,   I have found if you use a combination of  different things in here, a lot of times   that can help with the images. You're still  going to get a lot that it doesn't work well,   but as we're going to see here, I've gone  ahead and, using the same seed, I'm going   to generate four more images. Now, I've added  into this negative prompt "hands, hands on hip,   hands on hip holding," all different ones that  have to do with keeping the hands visible. I'll go   ahead and generate this now and see if that helps  hide the hands because that's the first case.   If you don't need the hands in the image, the  best way is going to be to just hide the hands. Well, as we can see here, we now have our  results, and compared to the other ones,   we have our first two; we can see the hands are  in the pocket. The second two still got our hands,   so it's not perfect, but using the same seed,  this shows that you can try, and you can get more   creative also with your regular prompt. Depending  on what you put in there, but do remember, if you   put the word "hands" in your regular prompt, even  if you tell it you want them behind the back,   it sees the word "hands," and it's more likely  going to show hands. It's the same concept if you   want a full body shot. You could just mention the  shoes of a person, and it's going to show that. But if you do have hands and want to achieve  the best results, it's also crucial to limit   their interaction with other objects  and other hands whenever possible. The   complexity of the hands' action directly impacts  the difficulty of creating convincing hands. So,   grasping objects, such as holding a coffee cup  or a sword, or having fingers clasp together,   or things like that, will be more challenging  for the AI to work with. So, avoid those as well. If you have just a regular hand that  doesn't have any complex interaction,   it's a lot easier to fix those than it is to fix  something that's not. Now, as far as fixing hands,   if you have hands you need to fix, that is  actually where I find that Fooocus does a very   good job with the inpainting. Now, there's no  perfect solution. You're still going to have to   work at it, try on error, and keep trying. There  are some tools to help with it. It's going to be   a lot harder to do some of these with very complex  interactions, so you have to really work at those. Let's go ahead with this one. I'm going to just  grab this first image here. I'm going to actually   bring it down to the inpainting window. I see  a lot of people are tempted immediately to go   down and do the "improve detail" and put in  a detailed hand, then they'll mask it off,   and then they'll go ahead and they're going to  hit generate. There's a problem with that, though.   That doesn't actually fix hands. It'll improve  hands, but if the hand is really messed up, it   actually will just improve the messed up hand in  the sense of it'll still be messed up, but it'll   be more clear that it's messed up. So, really with  this, the "improve detail," you already need the   hand to have a proper basic structure for the  most part for it to fix and improve it. So,   extra fingers or not enough fingers or anything  like that, it's not going to fix those. As we can see here, when we're looking at  it, it's improving the detail of the hand,   but it's still messed up. So, don't start off  with the "improve detail" because, in all honesty,   if the hand isn't already structured correctly  and just needs to be touched up and improved,   you're not going to get the results out of  that, and you're just going to keep on over   and over again trying to fix something  that can't be fixed. The method here,   what you want to do first here, is we're going  to skip that. We're going to go down here. We're   going to change it to the regular inpainting,  make sure I have the hand masked off how I want.  I always give it a little extra room. That way,  it has a bit more wiggle room on improving what   it can do with the hand. Now, all I'm going to  do here is just that. I'm not going to work on   both hands. I find it's better just to do one at a  time. Okay, so I'm actually going to stop it here   because one of these is partially... And this  is the thing I'll do a lot of times: I'll find   one of them is actually mostly good. So, this one  I've dragged because, looking at it, the thumb is   correct. What I'll do here is I'll clear out what  I had before masked, and I'll zoom in. Let's uh,   so most of this is actually correct, the actual  bottom part of the hand. So what I'll do at this   point is I'm going to go ahead and mask that, and  at the same time, I'm going to mask this one. I   might as well have it trying to fix that hand as  well. If it gets fixed, then we can go from there. So let's go ahead, and now that I've gotten  that part done, I'm still sticking with the   regular in-paint or out-paint because those,  I still don't feel confident enough that the   improved detail will fix that. Okay, so I'm going  to actually now stop that because I've actually   found that that image is pretty good. So, at  this point, I'll clear off this again. Now,   let's look at that closer, just to get an idea.  So that one, it's pretty decent. At this point,   I'm going to use the improved detail. This one  still needs work, so I would continue on that one,   but let's, uh, for this to demonstrate,  I'm going to now improve the detail on   that other hand that we first did. So  now, I can go in here, improve detail,   I'll put "detailed hand," and now I'm going  to go ahead and generate and run that again. I'm going to go ahead and stop that. So, for  our purposes, I think we can show that that   hand looks much better than it did before.  Now, you may have to do a few of these to   get things to blend in better. Some of these  blended in better than others, know so it does   take a little bit of trial and error, but  that's really what you want to do first. So, after I got that to that point,  if I was happy with one of these,   then I would go ahead at this point, continue,  and go back to the standard in-paint, out-paint,   and continue to generate now to fix that  hand. Okay, so I'm going to actually stop   that now because one of these actually looks  pretty good. See, the problem is with this   one is getting the hands at the side. I find  very difficult for the AI when it has a side   angle. So that can be a big challenge sometimes  when getting good results. So, this one here,   it actually turned the hand, and it had an  easier time of generating that hand. Yeah,   that one would probably be workable, but  I'm going to actually use this one here. So, we have, let's look at that one now.  This one here, where it's pretty close,   I'm actually going to try the improved detail  first, uh, see, and see if that can do enough   with it before I go through the process of trying  to inpaint certain areas of that hand. Because   when I find when you're doing small areas, it can  be a little bit harder for the AI to actually do   as good of a job. Okay, and as we can see  here, this one's actually making it worse,   so I'm going to stop this one because I actually  think this was probably one of the best results. So, let me pull that one up. Okay, so on  the original image, we have on the left,   and on the right, we have the finished image.  Now, I picked an extremely difficult one,   and I would probably have to go through and  touch this up a little bit in something like   Photoshop or something like that because, with  the rain, it did make it a little bit easier   to see where I inpainted it a bit. So, that's  something to keep aware of, but overall, I'd say   these came out pretty good compared to what they  originally look like to what the final looks like. So, I would normally, at that point, depending on  what I'm going to do with this, I would export,   you know, save it, bring it into Photoshop, and  just, you know, tweak those a little bit more to   get the results that I wanted. So, but that gives  you an idea of the process I go through. First is   to use the regular in-painting and out-painting  until you get a decently structured hand. It   may not be exactly perfect, but it has the right  number of fingers, it doesn't have a weird shape,   they're not distorted or anything like  that. Then, you can go and switch it over   to the improved detail, put in a "detailed  hand," and have it finish up from there. Now, like I said, it depends on a lot of different  factors. I picked a really difficult subject   because, with the rain and everything, that  made it a little bit harder for it to actually   correct that. But hopefully, that gives you some  tips on how you can do the hands. Like I said,   there's no perfect solution, so this is just  another example of one I did earlier. And as   you can see, the one on the left had some  messed up hands, and then the one on the   right is after I've gone ahead and improved the  hands. And as we can see, if we really zoom in,   this one did a pretty good job with the  in-painting. You can't really easily tell. Now,   it's trying to add the drops of water, so the rain  definitely makes it a little more challenging,   which is why I went with it. It didn't blend  this in perfectly, so I would probably go   back to Photoshop or something like that just to  touch it up. Sadly, there's no perfect solution   yet to AI hands, and until the models are  trained on higher quality images, I don't   think there'll be an easy solution. Hopefully,  this helps you fix those bad AI hands, and if you   found the video helpful, please do hit the like  button. Thanks for watching, and have a great day
Info
Channel: Kleebz Tech
Views: 3,015
Rating: undefined out of 5
Keywords: stable diffusion tutorial, stable diffusion, stable diffusion secrets, controlnet stable diffusion, digital art, stable diffusion tips and tricks, fooocus tutorial, inpainting stable diffusion, stable diffusion install, foocus, bad hands, ai hands, bad ai hands, fix ai hands, fooocus fix bad hands, stable diffusion bad hands, stable diffusion fix bad hands, stable diffusion avoid hands, deformed ai hands, deformed hands, fix hands stable diffusion, stable diffusion hands
Id: m64Sr3w4ojE
Channel Id: undefined
Length: 13min 23sec (803 seconds)
Published: Fri Feb 23 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.