Kohya ss HOW to Make a Model of a face to use in Easy Diffusion/Stable Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome Stream tabulous So today we're going to create a Laura model of a face and this case we're going to be using my face or I'm going to be using my face and before we do that we need to create um a couple of folders so we'll cut over to that and I will show you um the folders that we're creating and give you an idea of how to create them to have SS generate our model so I've come across and I've created a directory it doesn't matter what you name it and inside that directory you want to create three folders image log model now these will remain empty and when we create our Laura they will be filled up and this one here is the one that we want to create and we want to create a folder inside the image folder and then depending on the name of this it will depend on how many images we put inside of it we the less images we have the higher this number will be the more images we have the lower this number will be but if we have a lot of images in here we never want this to be anything less than 100 so I'll try to explain that the best I can so I have put 11 pictures in here and if you put in your pictures in there I'd recommend just hit rename and then you can call it me or whatever you want to call it and it'll rename them all and it'll put the numbers on the end that will make your life easier so we have 11 pictures in here so what we're going to do is I'll just come back across okay so we have 11 pictures in there so what we have is what we call the training steps this is the best I understand it so the way this folder is going to be named we'll um will be read by the queer SS and depending on what that file's name is we'll tell it how to read the images inside and how many steps to do to train to do the model so we want if I can find it here we go it's calculator so it's 1500 steps and we want to divide that by the number of the images and that gives us 136 so I have 11 images so I'm going to name the folder 136 and then I'm going to call it underscore and then I'm going to call it the name of whatever I want the name of that model inside so in my case I'm going to call it sunny you could call it me or whatever you want now if you had 20 images you'd only have 75 steps we don't want under 100 so you would name that folder if you had 20 images you would name it a hundred and then you'd put underscore sunny or me or whatever you want so if you only had two pictures in there it'd be 750 underscore so that's a simple way of just remembering it is it's 1500 divided the number of images and if you had 10 images in there then the folder's name would be 150 underscore me Sony your name whatever you want okay so that's how that basically works so we'll just go back across and show that so I have the um the 11 pictures which gives me the number of 136 so it's not going to be 136 steps that it's going to go through and do for the images so that's the easiest way to describe that and once you've created that then we can go into queer SS so then we can point it to those folders and we can run it from there nice and easily so we'll come across now and we'll take a look at queer SS and we'll get you started on the way and remember in the description below I'm going to have the link to the Json folder which is the settings which you'll be able to open up point it to press open point it to that Json setting and then just hit load and that will save you the headache of trying to work out how each one of the settings use which is really confusing and the settings that I'm using I have found generate the best results you can play with it and see how you go and if it breaks just don't save over that stuff I'll redownload it and load it up so also don't forget of course to like And subscribe and get the Bell on um I could really do with a lot of likes at the moment really motivates me to do more and yeah a lot of stress at the moment so um I'd love to see some likes that would give me a little bit of encouragement and we'll move across to the um to the queer SS and we'll get you guys under the way on how to make yourself a a model okay so let's go into our queer SS so remember what screen I'm on come over here we're going to find that GUI bat which we modified with the um dash dash in browser and we're going to double click that bring that over there and she's gonna launch now we will while that is launching we're going to come into here I have created a folder somewhere let me find that okay so I've created this folder and um we'll just there's our Courier it is loaded up it does take a while um to open up the first time and um every time we restart the computer that first launch takes a little while um there's only a few things we want to use on here so we've got the Laura which we'll get into and we've got the utilities which is what we want to use but what we want to do here is we want to come across so I've created a folder and inside that folder I've got images log and model and these are empty except for the images folder now we talked about in the beginning of the video of how to get this number here is based on the amount of images that we have inside so we've named the folder that number to represent the images that are inside and then I've just put my name on the end there and I've taken a bunch of photos of myself on various angles you really want to try to get all angles your left side your right side drops your downs and so forth and try to get just as much as you can in there now I find I've used 11 for this one now I do find and this is my personal preference or personal observation is there's my close-up images if you want to do a AI art and have it further back say full portrait then do 11 photos of you as a full portrait standing in various positions with your right head up down left right so forth and the AI seems to go through and pick one that it wants to use based on its scrapings to put together these images Okay so we've put those in there now we want to come down to utilities so when you open it up it'll be on dreambooth and come across to utilities and we want the wa wd-14 captioning and we're going to select our file directory so we'll click that that's already come across to it so there it is there so we'll click that and we'll go select so there's our folder directory and um a prefix so we're going to put our name in there for this part okay that's all we're going to do I'm going to hit caption images now when we do that we won't know anything's actually happening we um if we go to our command line interface that runs in the background that will let us know what's happening so we'll let that run and when it finishes it'll tell us that it's finished so let that go that's going to scrape the images and it's going to create text files for the images and that will be our our prompt data for the AI art generator here we go scraping now with the wrong version of python this doesn't work and that was one of the bugs that I noticed like it was working but it wasn't working the way it should and I'm like what's going on here so I did the um I did the old version of python the 3.10.6 and I did a new git pull and I reset it up because it wouldn't set up onto the old version because it had put files in there based on the newer version of python which basically broke the entire entire of queer SS there's a tongue twisting so fast um so after putting in the um the new Python and deleting the queer SS folder and then using gitpool to recreate that folder and then running the setup again everything went smoothly without a hitch and as we can see um it's working the way it should so it's going through and it's um basically it's using AI itself to read the images and it's going to read those images and try to work me out so a lot of people use I think it's git captioning or blip captioning or something like that and they have to write all that information in themselves I find you don't have to do that if you're using wd14 it will do all that information for you if you've got some good images it will know how to do it so we just let this run so you can see here it's gone through and it's downloaded some stuff that's what this is here it's downloaded a bunch of tools and it's found my 11 images and now it's going to use those tools to create the data and here it is here it's actually finished it so we can copy this we can just go from I'll pull it from I'll stretch that down if I can there we go I'll just take it from there and copy that control C done okay and I'm just going to come into here I'll go back it's going to create a text pad there and call that [Music] I think that's spelled right I have no idea I'm gonna paste that in there that's our prompt data okay then we'll come back across into here and we'll come in here and we'll see these little text things now and it's actually Reddit and it says I'm looking at the viewer so this is the prompt information if you want to type something in to try to get um a similar result to this using the Laura you create this is your prompt data so the important part is Sony solo so when we're using our Laura this is what we're going to be basically using so we can see that there it's picked me up our green eyes correct um upper body that's what it is it's male focusing on the camera that's it glasses good job so gray backgrounds pretty correct that's what that color of the wall is it's a horrible gray that I need to paint facial hair certainly do beard it's odd a lot of people call goatee's beard but then again you know what is a goatee the Stone Age there's so many different varieties of them uh realistic mustache I don't know if I'd call it a mustache facial hair yeah so and it's gone through and it's done that for all of them so um it's scraped it we don't have to type anything in we are good I am happy with that okay foreign so what I've done is I've created a low GTX graphics card setting um so I'll put that up on in the link below so you can download that and then you can just open it up and then you can just load it and that will put in all these settings that we're seeing here which I believe are the best parameters for a low graphics card to actually run and this is important the optimizer I believe this one here is the one that uses the least amount of RAM on a graphics card from what I have heard on the YouTube videos there are articles that you can read neurological dyslexia doesn't really help with that so it just gets muddled my brain gets really muddled up so if we come across to the model this model will be depending on which one you select will be the way it builds your Laura that will affect what you can actually use the Laura with when you're using easy diffusion or stable diffusion so if I'm building it on 1.5 so I'll only be able to use this Laura on models which are based on 1.5 if I want to use this Laura with a 2.1 or a 2 I'll need to create another Laura based on those clicking that okay so we'll leave that so we've told it the directories you'll have to point it to your directories which um we've talked about so you need to put your output name there so you'll give it the name that you want this Laura I want to be called um Sunny so as that we have our parameters in as I said I will put the settings up um I don't understand a lot of this it's to go through and try to talk about it is just going to confuse a lot of people keep your resolution low here um just leave it as this is what I would say and not play with it too much fp16 it's for the lower end of graphics cards even on the 30 60 that I have I have that set up on fp16 so these are saved and we will go through we'll click start training and then we'll wait and hopefully we don't get an error if you get an error it's going to be one of those settings usually if you get a error it means that there is not enough vram to actually um do the model so okay so it's going to download some stuff um it's got to download a whole bunch of files to work properly and that's going to take a while the first time um the next time you run it unless there's an update um you it won't take this long but this is important to know for the first time you run it you're going to be getting these little downloads and again um this one here they're not found I I have found that on the other system as well that I ran that it wasn't found and it didn't seem to make any issues made no difference so I don't know perhaps it's just been removed from the server and not changed in the way this runs I'm not entirely sure um magic of the program like I said it's a command line interfaces a little bit different um maybe some people will understand it for me it's a little bit over my head on the throat so you can see it's downloading models there as well it says down there the py torch model so and some of these aren't small and uh yeah so let's have a look how we go it's just a waiting game okay it's going to try to generate the model that's going to take um three hours to do it so we'll have to come back when it's finished um kind of expected that it would take a while because uh this graphics card is um a lot older now we'll just have to let that run for the two hours and then we'll see where it's at so we'll cut the video and hopefully we don't get any errors this time um it was on a different setting prior and it ran faster but it aired out at the end it had memory issues so hopefully this one doesn't run into those issues so we'll let it run for the two hours and we'll see where it's at that's the I think that's the big thing that you have to be aware of when you're creating one of these models it's uh it's pretty intense it's it's not so cut and dry as it's really quick to generate it's not the AI has to rebuild the images that you're feeding it to create models and work out how to use those models as a AI code for the algorithm so it's time consuming so we'll let that run and we'll see why excuse me we'll see what happens at the end of it and we'll get back to it okay now that was a long process now um we can see over here that it's gone through and it has well it's finished now how do we know that it's finished because if we look down here it says saving checkpoint and this word here the safe tenses safe tenses is the name of the model folder if we come in and we go up to the top here and we come across to the models we'll actually see that name there that's what we've selected and that's what we want it to be called because that's what um compatible and Universal with easy diffusion and stable diffusion so these are all the working parameters that I've saved and I will put them up below um because I was doing the recording with OBS the three hours that I came up with was inaccurate it was because I was using a lot of um resources so once I closed all that off it dropped down to um about an hour and a half still a long time um not quite three hours so I stepped away and I did some stuff for two hours and came back and it's um it's finished so again now we'll know it's completely finished because when we go into where we created our folders we can ignore the log folders it's the model folders that we're interested in we should come in there and we should actually see that file created and there it is there at 144 megabyte so we can now take that and put it into easy diffusion and we can use it so um yeah we'll go across and we'll take a look at that and we'll see if we can um use my face in a model so let's do that okay before we go across and um drop that Laura in we have saved all this so we'll just hit save again so we've got our settings there now to close it you just simply cross that off and you're also going to have to close this because it's still running in the background believe it or not so now it is closed now we can go across and we can move that into where we need to so we'll do that in one moment I'll show you how okay so now our model's created where we created the three folders the image log model we go into the model folder and we can take this file here it should be the largest one created this one's 147 megabyte and this is the sunny safe tensor and that is the Laura that we have created so we're going to copy that so simply right click copy we're going to come across into our easy diffusion folder and we're going to go into models and then we're going to go into Laura and we're just going to paste that in there and now that is in there we'll be able to use that in Easy diffusion or stable diffusion so now we can come back and we can click on start stable diffusion UI and then we can get onto using our Laura to create a image so I will now show you how that's done so we've clicked on start stable diffusion UI and of course the first time it runs it does always do its little upgrade so we'll let that go for a moment and once it launches it will open up in its um in the web browser so we'll give that a moment and then we can create our model so doing a little bit of an update once it loads up we will have to turn on some beta options or beta options so I think mine I've already enabled them so I'll show you where they are once she loads up and you'll be able to enable them in yours as well and that will enable you to be able to use the Laura now I love easy diffusion because the lures are so easy to use you just have to select them and give it the value to actually use where if it's in stable diffusion you need to use kind of like a command line code so you use where you have the brackets and then you'll type in say you know the the the sunny and I think it's like a DOT and then the percentage you put the number in there it's far more confusing so this one works a lot better so give it a moment okay so now it's loaded up uh if we come across the settings here we'll come down by default these two will be off on yours so the beta channel is off on this one anyway so we want to turn those on we want to hit save and yeah unfortunately you the refresh really doesn't work with it you have to close it off close it off and then you'll need to run that command line again and it's done its update this time so this should be a a faster launch to The Graphic user interface although it normally does update um it's you know adds those beta to it so that may take a moment so we don't want this so we're going to get rid of that and I'm just going to load this from a text file so one moment okay so I've added the prompts here for what I want now we want to come down and we want to set it up for how to actually um do the image so I'm going to change the model here quickly I'm going to use epic realism I'm okay with this I'm okay with the sampler um or the Samplers and the EVS will change the way your art actually looks so I might try an EV on this one we'll see what it looks like a guidance scale um you might want to crank that back and this is already on our normally it's on none but if we click that we can collect click on our Laura that we've created that's it there this is the strength it's kind of weird because uh I mean we can come through here and we can go well above 100 doing that the image will be an absolute mess your highest value is one which is a hundred percent and if we go down to point five it's fifty percent that's how much of your model is being used on the image that it's creating so the parts of the face that it creates the higher this value here the more of those features I find I mean you can put it up on one I find the the eighty percent Mark gets a a really nice render uh we've got to watch this guidance scale you can have that too high I will try to run it on eight first and we'll see where it is if you put it on 50. your image will be an absolute mess and nothing like what you want even 30 I find it's an absolute mess as well so you need to find the balance there we're going to give it a lot of steps we're going to keep it on random seeds the first time this runs is usually rather slow um because it's doing the Cuda drivers and talking and we can see it's generating our image there and we'll have a look we'll see what we get for um my face so but that's how you use your um your Laura you've created and you just drop it into easy fusion and it's just as simple as that and um then you just Define the um the prompt up the top there and the uh the more information you've got in the prompt you can change what you actually want for it and we can tell it to generate an older person if we want to or you can only can change those details in there uh we put him you know uh heavy facial hair um they could put aged you can write an age in there if you want and uh yeah the more information that you feed into it um the better the result uh I'm not sure if it is still character limited it used to only accept seven 70 characters and the way the AI works is the order that you actually have on the prompts is what it looks at first and concentrates on so you want your target information to be the first and as you go down you want the stuff that's not concentrated on to be the last so for me the high quality eyes I like the high quality eyes but it's not as important as having it as me as a superhero flying so yeah there we go uh this one's generating a bit of a a younger looking character that's actually the model here is doing a lot of that younger I usually use a a different model to get my um my more aged look on my face but yeah that's how it works go through and I might just change that model over for a second I'm going to use the realistic vision version 5.1 I'm going to leave everything else as it is and then we're going to re-render these and yeah I find the the other model that I was using does have a habit of rendering younger looking people the realistic Vision I find does a better job of getting the um the more aged look and the more details on my Laura so that's something to keep in mind when you're when you're creating your images that each one of the models that you load does affect your Laura so you'll need to play with it and find out which one is the best to work with the Laura that you're actually doing because remember I said when you're making your um your lures that if you're taking pictures of just your rough face those ones are really only going to work really well for close-up images so we see here this is a more close-up image and despite the fact it's really not what I want we can see more of the details for the um the facial and so forth so yeah that's that's it that's how to use your Laura and go through and create um create the image that you're looking for so it's as simple as that some we got some really good results in there and um you know a bit of fine tuning and a bit of playing with uh your your guidance scale and so forth there you'll get better looking images to what you're actually looking for so and it's just a matter of uh playing until you um generate that image that you're looking for uh this one is not really on how to generate the image that is really time consuming there's a lot of little of adjustments then you're going to sit there for a while and play with it to actually work out what you um want to do this is just how to create a lure of your face and get your image into your artwork of what you actually want whether it is a a family friend or a loved one or maybe it's your your favorite TV celebrity and you've gone on to Google images and taken some shots and creating a model of them but remember that if you're taking photos and it's just basically the face they're going to be close-ups and then if you're um taking photos where it is head to toe then that is more full-bodied so you could create a lower like the one I've created and um call it for example uh me close up and then you could create another one with 11 images of head to toe and you could put me full body and the create another one of waste up and put me waste up and then select those lures some people will create the Laura with all of it in the one image I find that does create more confusion to the AI which can cause some issues so I find having separate lauras and then selecting the one and applying it to your artistic preference usually generates a better image so but that's it that's how to create a Laura and how to use it in Easy diffusion and as you can see here we're getting great results and that's what we're after um with the sdxl the stable Fusion extra large models unfortunately this Laura isn't compatible with it you'd have to um load up a sdxl model and I think I mentioned before I I've tried that and it was uh one percent per hour so 100 percent would um see me 100 hours and that's not you know including that if the system slows down and given the fact that they usually take a bit longer to do it so uh that's something to keep in mind the SD excels will create far far better um skin tones and more realistic looking uh people um but I find that these are quite fine and I'll just go through and edit them in something like Photoshop paintshop Pro and add the skin textures to it and get it the way I want so that's it and so there it is that um kuya SS and how to create a Model A Laura of your face and how to use that in Easy diffusion and hopefully you found the video helpful and if you did smash the like button um not getting a lot of likes on the videos um I'd really appreciate to see some likes um it really motivates me to keep going um I know with the um the issues that I have and um you know the autism on my brains all over the place that um I do repeat things uh of course like I said just feel free to fast forward if you need to and skip things but I like to try to show that front end that other people don't so you can see the little hiccups along the way and you know that it's not as straightforward and as quick as what a lot of YouTubers are showing that it is more involved so again if you could um like subscribe get the Bell on especially if you find the video were helpful leave a comment below um and yeah I mean hopefully I see some of your artwork out there and maybe you want to join my Facebook group and post a um a picture that you might have generated creating a a Laura model and using easy diffusion and show us what you come up with and we can discuss that in the Facebook group and help each other out to better our artistic skills I do see this um Laura training to create a face model as something that can be used in photo Restorations because if you get enough pictures of someone's face that they've got then you can recreate images and I think that's a great thing and it can be used to um to do all sorts of things and at the moment yeah it is a little bit artificial looking but with paintshop Pro you can go through and adjust that and clean it up and add those skin textures to it more facial hair and add some age to it and get a better looking image but as I said the sdxls have come a long way uh hopefully maybe something like queer SS improves to where you know um on an old machine like this we can create the Laura's faster so yeah but that's it from Front to end and I really hope this video helped you guys out and of course I will see you in the next stream tabulous video thank you for watching my video and sticking around to the end if you like my videos it really helped me out if you could like And subscribe it helps the YouTube algorithm to push my videos out there to more viewers which in turn helps me and helps everyone so thank you for watching my video and hanging around to the end and I will see you in the next video
Info
Channel: Streamtabulous
Views: 1,911
Rating: undefined out of 5
Keywords: Android, photos, restore, art, Android photos, old photos, photo Restoration, fun, entertainment, Android apps
Id: yB3_pW1Ev0I
Channel Id: undefined
Length: 37min 26sec (2246 seconds)
Published: Thu Sep 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.