Stable Diffusion for Flawless Portraits

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there so in this video we're going to create a perfect portrait pasted on previous photo and right here you can see we have our water what we're going to use but before we jump to adjust sizes let's see what we're going to use it first as a model and this is RPG verse 4 and if we look on the specification there are best size resolution and a CFG was trained for this specific model it was 512 the width and 768 so what I want to do I want right here going and put those numbers because this is giving us the best result that we can have it when we work with this model so we'll have it 512 and our with a 768 so 768 we also can preview and you can see 768 just cut on the sizes around this area because of that we want switched to the crop and resize because we want cut some of those areas on the sides also depend on the CFG scale and other things and based on the size as well the noise we'll maybe going the noise try to go as highest as possible this is meaning it's our CMG scale or actually our sampling step based on this should be somewhere about 35 and CFG scale we can get up to 9. I don't recommend go higher most models screen anywhere between five to nine so it's more safe areas I will say seven and between seven and nine it and nine it's a will work hundred percent on almost all models okay now we're going ahead and fill up all our information and let's go ahead and click generate and as we look it kind of pause same way looking but not all away so what's happening if I want to say let's go with the noise one percent it's all created noise and we'll click generate most likely I can see what will happen ahead it's total different so it does not resemble our image at all what we created so what we're going what we're going to do it is play with some settings to be sure we resemble as close as possible with this but increase creativity to the max okay first we're going to use the control net and we're going to use a two control NAD models at that time if you need it you can go inside the settings go to the control net and right here where is that how many models you want to set at least three for now usually most people use a two two is enough I like three because give me sometimes a little bit more options it's up to you but set at least two at least for this video said at least two of them when you're done click apply and reload so after you need to load again and this time you should have it at least two tabs for control model the one first what we're going to do it is set properly pause and let's see what's happening with the pauses okay first I'll show you some example right here for example we have a pose and if we're going to select let's enable preprocessor let's go with the open pose that's what we want to do and we'll just go ahead and click on preview result you'll notice how the hands going right here and its main reason because this is not correct size it's why very important for us to use The annotation resolution equal to our image so for example if I have this annotation resolution 720 let's try preview again and this time you can see right here you see how the arms showing correctly this is just one of the better example to show in this annotation resolution should closer going to the image you're going to use okay so in our case we're using this image and I'm looking for 512 within this case so it's what we're going to do 512 and let's go click preview on The annotation resolution be sure that our pause is all readable and this is actually set very good I like how it's going on this case we can remove from this point and we'll just leave it like this let's go to Kenny set of open pose because with the open pose open pose right here this is our preprocessor this is our processor so if at this time we go ahead and click generate you'll notice we'll have it a model set with properly pause however we do lose some of digitalizations from outfit that you maybe want to pass some parameters it still look very nice and a pose is close enough however we can do even better than that for this we'll go to another control model and we're going using the canning for this so let's go enable we'll go copy paste our image so we can preview and remember same like we did before it was 510 this is what we want to do here put it 510 however 512 probably will work we'll just leave it as up or not canvas sorry on a guidance right here let's go there should pop up our guidance right there and we'll just leave it 512 here on our resolution as well and we'll go and click to preview so overall right here what I'm looking at this line how much details if not enough details you can always go ahead and reduce like low resolution see how much more details we added if you need it but I think we'll pop up same we can you can use it with a higher details and higher should add more and even include my own signature that I put it on my photos but it is maybe a little bit too much so we'll just bring back let's preview again and again this one is actually a very good resolution in this case so let's go ahead remove our preview and we'll go a canning scanning Kenny here the next thing is because we're using two models we went a little bit adjust on the weight so this one will go weight about 0.7 and when I canning for the details well maybe because they're 0.5 okay let's go ahead generate and look again and here we have it even better detailizations now but here's other things very interesting so what is the happening it's taken noise it's created noise and put it over but it would take the noise of this image it will take image convert to the noise and based from this noise we can get it very very close to original so for this what we're going to do is using script and we're going to use The Script image to image alternative test so let's enable this test also notice I'm using Euler and some RPG I think it's required to use it R2 karmas however if we going to use it image the image it is actually asked to use the Euler because we said you'll run the top and here we'll just uncheck this and check that box sampling step we uncheck because we're going to use it our 35 we can switch if we need it you can also use it for coded decoded same amount of steps we need matching and if you want you can always check this box then it will be matched with your sampling steps on top actually the bottom will override top one okay and right here we override noise to the one let's uncheck this because we already control it by one here and let's go ahead try to generate when we will do this you'll notice it will take first our image add noise to this image so it's going to the base by using on our ruler noise denoising system and now denoising back from this to our original image so you'll notice how the face positions everything will be extremely close to what we haven't before to even point of the hair how we're going and this is what nice about creating if you have it exactly the same point you like hair like always details you can take and create image very very close to your original image and one thing you can also verify if you click second time generate we should have it very close and similar to what we have just with a little details adjustments so we can take our image and almost constrain to the point and by the way these techniques we're using here and how it is with the RN noise generation overlay okay so at this point it's look very nice but if you notice the faces is different what if I take somebody else portraits I'll apply everything same but I want preserve the expression and face and everything so for this we actually need to go use it in painting and I do like to do this in steps so it's helped me to identify one things fix it and keep on going so when I satisfy how everything going I can go inside in painting copy paste what I have it and now I'm going to just mask over the face that I want to preserve okay when I down right here I want to go and says in painting not mask so it's in painting everything except with masking and you can try feel or a latent noise either one and pixel padding I will say 100 pixel sometimes go a little bit too low you can again this is experimental depending on the size of the image you created and other stuff but everything else you know is right here it will stay same so when we're done let's go ahead and click generate notice as generating our face apply the noise but not that much so it is preserve some of the utilizations as we're doing and when it's creating back you'll notice we have our model created and most important we preserve phase for our model okay so let's go compare here's before you can see a face and it's the same one embedded very well and this is because we used within painting just replace the specific elements that we think you can also play a little bit around with the blur because if we apply a little bit more blur like maybe 10 pixels it will bend a little bit right here around more aggressively this is again this is more experimental based on the size and resolution you can always go a little bit more crazy and higher qual bigger Edge on this and let's just preview C and I'll show you what is meaning by when we're going closer to these edges okay and you can see we have it a little bit better blending but right there because it's a we have a blur you may have some artifacts a little bit but generally it's actually blending very well so we have it same face same pause but we change all environment quite a bit on this one and here we can compare our original photos that we put it in and we change all environment out feed but we still have it same shape of the figure same pose same phase um as there it just almost like special compositing we did it and much easier creative way of course everything can be changed depending on your prompt but in this case you should experiment overall what we've done we used image to image we adjust the denoising string with the two control models one is the open pose and another ones is a Canon for more details and we're also using The Script image to image alternative test to take our original image and based on this all of this provide very accurate but at the same time very creative reference for our new image you can actually create very interesting animations even based with that and you can create these animations by going in a batch and at this point processing as an image badge and creating um set of this so let me show you some examples okay so and right here you can see the render and you can see the original one notice that we have some flickering applied and it it is problem with the specific techniques if you're interested on a flickery free uh creating I have another video with totally flicker free creating with AI stable diffusion and I'll post that link to this video below but here's a proximately you can do kind of fun stuff with this thank you for watching this video if you like it please subscribe give us thumbs up share this video help um this channel grow and I appreciate all your support thanks have a great
Info
Channel: Vladimir Chopine [GeekatPlay]
Views: 231,009
Rating: undefined out of 5
Keywords: Geekatplay Studio, Vladimir Chopine, Digital art, How to, Learning Photoshop, 3d tutorials, Digital compositing, How to do in Photoshop, How to do compositing, How to do in 3d, AI art, MidJourney, Stable Diffusion, Dreambooth, Dall-e, Free resources, Free learning, Digital art for begginers, Free tutorials, artificial intelligence, Digital Photography, Photography
Id: 9v4lBexN_Mg
Channel Id: undefined
Length: 13min 23sec (803 seconds)
Published: Mon Mar 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.