Create Consistent Character Face/Body/Clothes From Multiple Angles

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we will talk a little about character consistency and some unique ways of achieving that using character grids and models and a few more advanced tips that you may not know and with that let's get started character consistency is one of the challenges of stable diffusion still for the most part it is still impossible to get complete consistency in every image but there are a few tricks we can do to get some reasonable outcomes for certain instances if you want the Least Complicated way and only care about having a consistent face in mult I pictures you can easily load an image into image prompt select face swap and start generating images with this face in whatever scen clothing and action that you like and you can get endless image scenarios with that specific face in it I've made videos on face swap using both image prompt and inpaint if you want to go that route those links are in the description for this I want to go a different direction and show you a trick using grids to get different angles of faces and body IES while keeping every detail as close to the same as possible I was planning on this being a different video initially as I was experimenting with an animation method that has been around a while involving automatic 1111 and E synth made Popular by a user known as Tokyo jab the method involves combining a grid of key frame images taken from a video styling them with stable diffusion and using e synth to take those key frames and Stitch them on top of the original video getting short but very interesting animations I intended to bring this into Focus for those who want to try it out but have no interest in automatic 1111 however getting similar results in Focus felt like a lot more effort than it should be and I decided to shove the project for now on the bright side the picture grid became something I found useful when trying to get different angles of the exact same face body and clothing while it is limited I figured there would be some of you out there who will find a use for this one thing that was somewhat necessary for the original failed project was a resolution of 1536 by 1536 we obviously don't have that but we can add it in you can add any resolution you want even 19 20 x 1080 the catches sdxl models are not trained on these resolutions so you will get unusable and morphed images more often it is possible to get good ones but the idea is it can be easier to just use the normal lower resolutions and then upscale the images you want later but the option is there if you want so let me show you how to do it first let's go into our file explorer and find the focus root folder from here we want to go into Focus then modules and before anything we want to make a backup of the config py file you can simply copy and paste it into the same folder and it should create a copy automatically now let's right click on the config file then open with and choose notepad scroll down till you see these values here we can add or replace resolutions we can copy from this comma here to the last single quote Mark and paste then just change the numbers to what resolution you want here I want 1536 by 1536 make sure the asterisk symbol is in the middle also make sure if this is the last set of numbers that there is no comma at the end you can also increase the batch number here if 32 isn't enough I don't know how high it can go but I've doubled it to 64 with no issues okay once we are done click save and close if you haven't already close focus and restart it you should now be able to see these changes in the advanced settings tab now again using this resolution on its own isn't advised as you can see it gives morphed results plus this is a much larger size so it will use more of your vram but we can load up a phas grid I created and use this resolution to equally change each face into another character and have them in a slightly higher resolution this also works just fine on the 1024x 1024 resolution if the higher one is too much on your GPU and then I will go to input image image prompt make sure to click Advanced then load my grid select pyan put the stop at all the way up and keep the weight pretty high to start I will begin with a simple prompt I will always add white background since I don't want something random going on behind any faces and with this we get a character grid of a very similar face in every image now with the weight high it's going to be similar to our original face unfortunately turning this down too much and we quickly get problems there is no set number but below 0.8 and it can all start morphing the grids together if we get more specific with our prompt we can get a bit more of an original face and what you're seeing is nine faces and all the same person that is the benefit of the grid ideally you would want different angles in each of the grids now it won't be that exact every time but it helps to start being more specific in the prompt about the person and even the clothes now obviously every grid will have the same face but each new generation on a new seed will be a new collection of faces and won't be exactly the same between each new grid it can help once you get the set of faces you like to drag down the image and turn off random seed then continue generating with changes in your prompt to get closer to whatever your final goal is also using the uh realistic Vision as a refiner here works well if you prefer the way that looks I personally like the outputs that it generates with the refiner okay now we can try a different grid where I have multiple face angles this one might have trouble as they are just floating heads and some sometimes it doesn't know what to do below the neck plus when using the refiner it always seems to take over the control net just a bit it has more freedom but it might get inconsistent results uh you can try any style you want here if going for something other than realism remember to uncheck the default Styles and maybe even remove the realistic refiner if you are using that we can try getting a Pixar inspired style character from this and that isn't bad we could always keep going and fine tuning of course with the realistic Vision refiner back on we can try for a photo real face and see how that looks and if it's not changing enough we can start turning down the weight setting slowly and try again when you get one you like you can drag it down and while keeping the weights high on py cany try to change the expression remember to have the random seed turned off for this we can try a happy face face not bad okay and we can try to get a mad face another tip I always forget to mention is using the text prompt weights here we are trying to get a mad face and we can add a few more descriptive words but we can also add weight to these words highlighting a word and then hold control and tap the up Arrow key it creates this text box with a number you can increase doing so gives more weight to this word so it makes it more important in the prompt this helps if a certain word or phrase isn't coming through I'm pretty sure going higher than two does nothing and really 1.0 to 1.5 is a good range moving on the grid method also works with the entire body using a side by-side setup I will load up this one I made from a website called Anatomy 360. info and going to the free reference section I will skip showing the model page itself since it is an anatomy site and many of the models are are nude so be warned I downloaded this model set and then resized it to fit 1344 by 768 and we can start again with a simple prompt I will also make sure to have random seed on for this with this many characters it might take a few Generations before all of them are the same and without any major defects I will also make sure to have the refiner back for this as it works really well if you are going for realism the detail just comes through better you can try to get different clothes if the shape is considerably different than the original you might need to lower the weights more but I would suggest small increments too low and the poses will start losing their shape entirely you may also notice that even with everything perfect the faces look terrible this is where you get an image you like and we have to do some inpainting go to inpaint and drag the image down or load whichever you want now two things first we will have to mask and run each face separately trying to mask all at once and it will give terrible results and second we could just mask and run the improved detail and hope we get a similar face or we can use the developer debug setting to use face swap and use our own chosen face to put on each one of these for this I will use face swap let's go and check the debug box then control Tab and check the mixing image prompt and in paint box then to image prompt and load the face we want select face swap turn the stop at all the way up and leave the weight setting at default back to in paint make sure you are on the Pro detail setting and shift Mouse wheel to zoom control mouse wheel to resize the brush and mask the first face and then generate and it's not looking like the image because I forgot to remove the refiner so I will remove that make sure you do the same let's try again now our fa is being added correctly much better once done take the better image and drag it down and move on to the next face run it again get a good image drag it down and so on continue that till you have your faces done you can also add some Expressions while detailing if you want a happy or angry look and of course you have to do one by one also but you can change each face to whatever you like it may not be the most efficient method but this is as close to getting an exact character from different angles as I've been able to do sadly putting this in the very subtle and trying to change all the Expressions that way doesn't work and give same terrible results as trying to inpaint the faces all at once uh I don't know if it really helps but I also like to add a cpds control net with the full body models and have the stop at all the way up while keeping the weight really low like 0.1 what I'm going for is trying to keep the pose but I want enough freedom to get all kinds of body types clothes and styles one last tip and also a very useful one if you aren't aware of them are the wild cards if you go to your focus folder then go down and find this folder called wild cards then go into it here you will see some text files inside these text files are lists of words and phrases that relate to the name of the text file these are your wild cards basically you put in a command using the name of one of these files in your text prompt and it will choose at random one of the words inside the text file to use in its place for example I have a text prompt here using the nationality and color wild cards in order to use it you simply put two underscores before and after the word and it becomes a wild card now generating The Prompt I will get a random nationality and random color in those spots obviously it will only choose words included in the text file and you can easily create your own custom wild cards just create a text file and name it add a list of words you want and then use the proper command in the text prompt and there you go to know what words were actually picked you can go into the history log and see the text prompt here the nationality became Panamanian and first color became yellow the animals chose bear and the last color chose teal and that is all I have for you guys today I hope you found this helpful and maybe gave you some new ideas I'll see you in the next one
Info
Channel: Jump Into AI
Views: 29,884
Rating: undefined out of 5
Keywords: stable diffusion, stable diffusion tutorial, fooocus, focus tutorial, fooocus tutorial, fooocus consistent character, stable diffusion ai, stable diffusion controlnet, ai image generator, free stable diffusion, image generation ai, character consistency stable diffusion, consistent character, consistent character foooocus, focus ai generator
Id: zWLknfrhfW4
Channel Id: undefined
Length: 12min 39sec (759 seconds)
Published: Fri Jan 26 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.