How To Fix Hands In Fooocus (SDXL Stable Diffusion)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I will go over one of the more frustrating things about stable diffusion and that is dealing with bad hands while there is no perfect method to deal with them I have put together some ways that I use and some popular suggestions that have had different degrees of success and with that let's get started since hands can be difficult to repair the first obvious solution is to avoid them as much as possible prompting for hands and Pockets or using in paint to hide them all together you could also have your subjects wearing gloves since it's less noticeable when they don't look perfect but if you need hands in your image then there are a few things we can try there are suggestions that have been around for a long time adding hands or fingers to the negative prompt and even adding some weight to them when it comes to sdxl images after doing several batch runs of the same prompt and seeds then comparing them with and without negative hand prompts at various weights I never found a significant Improvement to any of my Generations this might just be my experience so feel Fe you to try it out for yourself this suggestion mostly comes from users of SD 1.5 models I will say that using this in forge on SD 1.5 checkpoints I did notice better Generations more often than not I wouldn't say they were usable but having hands in the negative prompt did seem to give me more images with less extra fingers and hands so really using this gave me images that were just easier to fix I also tested some sdxl handls with a few different settings and again I couldn't say I saw a big improvement with any of them but most of my tests were using realistic checkpoints so it may work better with other models and styles really what it comes down to is trying to get the hands that are close enough that repairing them won't be too difficult so let's try some simple examples first looking at this I would say this is a pretty easy fix the fingers and hand look good besides the extra finger and the messed up Nails even the best hands always seem to have messed up nails so I will mask the extra finger doesn't need to be perfect and even with no text prompt this can work the leave it on default in paint for this and it really gives us a pretty good result once we find one we like we can drag it down clear the mask zoom in and mask the hand and then switch to improve detail setting and I will put in detailed female hand you could also add young or old into the prompt sometimes that helps shouldn't be hard to get a good generation from this hand since it wasn't too far off and that looks pretty good find the best one and drag that one down we can MK the other hand and do the same but one thing that might be difficult is when doing the hands separate they might not match exactly so you can get both hands pretty good separately and then try to run them at the same time it can help to get the same shade and tone of the hands and even the nail polish if it has any so to me that looks pretty good and you can go from there to out painting and whatever else you like depending on the complexity of the hands it might be best to deal with the hands after you upscale the image as upscaling might even deform the hands a little bit usually in the nails you could try masking the tips of the fingers but I have better luck when I just rerun the entire hand okay let's move on to a little more difficult with this one we see a large hand and a somewhat thick arm at first we can try to improve detail and see if we can get lucky enough for it to shrink it down some and again I'll add detailed female hand and add small and thin and even if we don't get a good hand if it's a bit smaller we can pull that down and keep going and I'm also going to tighten up the mask and some of these are still a little big but the hand position is pressing down so that would make your hand spread out a little so it makes sense now if you like the result of the in paint but it looks a little out of place maybe too detailed compared to the rest or the color and shading is a little off we can go into the debug menu here and turn the inpaint respective field up some this will decrease the pixel resolution of the area you are in painting at the same time it will see more of the image and be able to blend a little better the higher the number the more overall image it sees but also the less pixels available in The Mask it's a trade-off and you can raise and lower it till you find the right look it's not a guarantee and sometimes you will get even worse results but with a little work you can get it if you aren't getting the results you like with the improved detail then you can try regenerating the hand entirely with the default in paint this will be like starting over but sometimes it's necessary okay now a little bit more difficult picture with a hand on top of a hand the still isn't terrible as the overall shape is there and we just need to adjust it so first let's try to remove the bottom finger and I will use the default setting for this and then pull down the best image then I will try to shrink or just completely remove the thumb masking the area and I'm just going to put in t-shirt and try to get it to mask out the [Music] thumb again it doesn't need to be perfect we just want a normal overall shape the th doesn't look bad the only big hurdle is the larger finger here we could mask it and keep running to get a thinner finger but the results will be random so let's just try the whole hand and run an improved detail generation and if we get an improved hand we will pull it down and then run it again and honestly I can I can live with these it's really all about getting a good form and keep improving if it's a bad form to start with then it will just get worse now say you have a hand that you need a specific complex shape and it just isn't happening maybe a simple P sign or V sign if you're having difficulty and it's just not happening then this is where we start to delve into the scary realm of third party apps and yes I'm talking about Photoshop I know I know but you don't need to be an expert or even know how to draw for this and we can use a free online version that works just like Photoshop called photo and we can drag our photo right into photo then what we want is to find a similar hand online and a simple Google image search can help so I can Google image search for female hand pie sign then find one preferably with white background and no watermarks and you can either save the image or just drag it right into photo on top of the other photo then on the left side we want to click and hold the wand tool and Pick Quick selection then click on the hand and you should see it outlined click any missing parts now we want to go to edit and copy and then edit and paste right into the window and it should make another layer and we can now right click and delete the first layer with the background now we have this floating hand you'll see that the hand is actually reversed so with the hand layer selected let's go to edit transform and then flip horizontal now we want to resize this and place it so either go to edit transform and click scale or use a shortcut which on Windows is contrl alt and T and try to get this as close to the size as you can and then place it where it looks about right then over here we can click the eye to put the mask invisible and then click the background layer now because we want to erase the hand underneath for this image with a solid color as a background it would be pretty easy but for complex backgrounds you can use the content to wear fill make sure you on the background layer and then use the rectangle tool and draw a box around the area then go to edit fill and in the fill pull down select content to wear fill then okay if it looks good click the eye icon to unhide your hand layer and while this looks pretty rough you can end it here and blend the rest in focus but let's make it a little better I'm going to pick the erase tool and turn the opacity and the flow down at least under 50% then I'll click this little down arrow and change my brush size I mostly want to get rid of the solid Edge the last thing is I want to adjust the brightness since the hand is very bright compared to everything else so go to image adjust brightness contrast and I'm going to turn the brightness down a bit it's not going to match exactly but I want the Shadow levels closer to the others in the image even this might be Overkill as focus is going to blend this all in but helping it along can't hurt and that's it doesn't look great but it doesn't need to go to a file export as PNG and then rename it and then save now back to focus and load the new image into the inpaint window then Mass the hand and even the arm a bit so it will blend together make sure it's on improved detail and then run it a few times and hopefully you'll get a decent image if it's still changing too much we can turn the D noise down a little and if it's not blending enough we can turn up the in paint respect to field a little just remember with this setting you will start losing resolution on the masked area if you start losing too much detail then turn it down and basically we keep pulling down a decent image and keep going till it feels like it's Blended enough if it's morphing too much turn the respective feel back down and keep the D noise under five also if you get something you like but the hand is just too detailed compared to the rest of the image rather than trying to keep running it you can drag and drop the image back into photo and use the blur tool just a little to fade it out more in line with the image and while I know once you bring in Photoshop or any image editor many people won't want to go any further but for me it can save more time than just generating images forever and crossing my fingers for a good outcome another way which might seem like Overkill is to generate a pyan image and then edit the hands this can be done by putting an image into the image prompt selecting py canny then going to the debug menu and on the control tab select debug processors then generate and you will get a white outline of your image and you can rightclick and copy or save the image or as before you can drag and drop it into photo p and then edit out what you want separating the fingers and whatnot you can click the tiny double arrow down here to switch between black and white then select the brush tool change the size if you needed then erase the part you want to redraw then switch back to White and change the brush size to about two and try to draw in the hands they don't need to be perfect just to be four separate fingers remember to use control Z to undo any errors switch back and forth between black and white to make your changes the other reason for showing this is you can add in Des designs or even write out text and get very creative results when done go to file exports PNG name it whatever and save then back into Focus load the image into the image prompt use a high weight and stop at with this especially if you want the designs to come through and you can either use pyan or cpds with similar results make sure to turn off debug pre-processors before generating images again describe your new image and see what you get repairing hands this way might be a bit much but it can work and with the ability to create designs with the py cany outline it can open up other possibilities with this we can also try other things like starting with only a hand outline which you can do by editing the pyan pre-processor image again and just blacking out everything but the hands then load that image into the image prompt with the same settings and see what you get ironically I get better results setting it to cpds when using the pyan outline with only hands but using this can get you some interesting and weird results and actually starting with just a hand in the position you want and going from there isn't the worst idea you can really get some Dynamic poses that would be near impossible to prompt for and there really is no skill involved other than a little copy and paste and some erasing but that's all I have for you guys today I hope you learned something new and I will see you all in the next one
Info
Channel: Jump Into AI
Views: 10,281
Rating: undefined out of 5
Keywords: stable diffusion, install stable diffusion tutorial, ai art, fooocus ai, fooocus ai tutorial, SDXL Fix Hands, fix hands stable diffusion, fix hands fooocus, hands sdxl, hands stable diffusion, fixing hands fooocus, how to fix hands stable diffusion
Id: oImEcOqoNrE
Channel Id: undefined
Length: 13min 2sec (782 seconds)
Published: Thu Mar 28 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.