Transcript for:
Stable Diffusion Techniques for Image Enhancement

[Music] hi guys welcome back to the digital Bunch today we're back with another AI video for you and this time we're going to be doing some more stuff in stable diffusion showing you how to do people in motion blur editing water and editing different elements of your image so that you can create the best quality with the minimum time and effort let us walk you through a few tips that we find really useful in our production and let us know what you think in the comments below the first step that we're going to share with you is going to use this image as an example and we'll show you how you can use stable diffusion to enhance it this image was done in 3ds Max and render in Corona we're going to try and improve the look of the water and the waves and make this beach here look more realistic this is particularly useful when it takes longer to achieve a specific effect in 3D or in Photoshop or if if you're not really sure how to do it and you need to move more quickly nobody wants to spend a whole day refining the beach waves and you can definitely fix it using stable diffusion so what you want to do is select the part that you want to improve and type in your prompt for this we'll use super realistic beach waves from the top and we'll select the model for this task um we can use Photon for this specific example of course you can also check out the original stable diffusion model for this and it can actually work really well because it's trained on a lot of diverse data to download different models you can check out also this website here so here's what we get as a result you can see that this in general looks more realistic and really didn't require a lot of effort we have the waves the shore looks more natural and you can tell that the sand is wet when it's closer to the water so this mod model really seems to understand what a beach would look like from a top view you can experiment with the results and check what works better using different iterations you can also experiment with the noise strength and see what that gives you now let's move on to improving the waves generated by this motorboat here we'll first select the whole area that we want to improve and by now you know the just we'll type in the prompt um in our case it could be something like wave tail from the moving yacht and let's add big waves to the negative prom just because we don't want it to be like over the top well well you know like it's fine I guess I mean like for the amount of effort this took it's honestly impressive and like much better than what we'd achieve in like 3D and also you know bear in mind that this is something that we can tweak in Photoshop and um adjust certain things I think it's definitely much faster than been looking for images to use for photo bashing we got an effect with more depth and we have some Shadow here especially if we compare it to the results that we have achieved in 3D above so it is definitely an improvement so you probably have already seen our video in which we show you how to improve a 3D model that is rendered in your image and enhance it using AI but this time we're going to look at a very specific cas in which the person is actually in movement and so we need to apply a motion blur effect to it now motion blur can be tricky because we do want it to look realistic and um if you do it manually using Photoshop or if you even render it um with a motion blur effect it's not really the same effect that you would get um if you took a photo of it so it doesn't really look realistic now ai has got a very extensive base of of images that have the motion blur effect applied and we believe that it actually makes it look more realistic so stay tuned and take a look at this new trick another tip we're going to share today is how to apply motion blur on rendered 3D people there are of course multiple ways that you could do this but today we're going to show you how stable diffusion can do a relatively quick and good job especially that there are some issues with doing this manually in Photoshop a common issue that can happen with Photoshop is that you blur evenly the entire person this does not look realistic and in reality the parts of the body that are really moving faster should be blurred more so the legs and the arms will for sure be more smudged than the back and the head this is actually a great example of how not to do motion blur in Photoshop on top of this in this specific example the smudges Go in different directions whereas actual motion blur should go in the direction the object is moving so yeah please don't do this okay so here we're going to need to write our prompt in this case we'll write super realistic Arabic lady walking in motion blur and we select the person we want to improve we adjust all the parameters and we select the model in our case realistic Vision will work the best with people and we hit generate and here's what we generated some of the parts are pretty good we have a typical AI hallucination where there's an extra limb here nothing too drastic you can of course regenerate this or improve certain parts of it you can also use a bit of Photoshop to achieve the effects you're looking for we can generate this again and every time we'll get a slightly different result it's worth experimenting with um for a while and looking at the differences that you get and just checking what feels right for you if you'd like to experiment further you can change the D noising strength we'll move it up to 0.35 we'll generate this and see what happens basically every time you increase the denoising strength the generated image is further from the original references that we're giving to stable diffusion if you enter 0.1 it won't change the image enough and if you add one you will get the weirdest hallucinations that will make it completely useless okay so this is a closer result to what we were expecting this 0.3 value worked much better and gave the model more freedom to tweak things according to the prompt so it was definitely worth giving it a try um you can see that this part here is not really blurred but the parts that could be moving are still blurred so this is a much more realistic effect and AI is trained on photos so it understands which body parts are usually blurred which ones are not and it will apply those learnings here the reason why we keep saying that stable diffusion will not replace artists is because it actually needs a base from which it can generate an image if you give it nothing it will just kind of hallucinate something but it's not going to be really in line with what you want to achieve as a result and so creating something as a sketch in 3D or using any other technique that you're familiar with is actually going to help you um to build that base and you can then use AI to enhance it not to let it create something from scratch this is not all you can do in stable diffusion what we sometimes use it for is to swap out a back plate or a landscape in the background because we just don't want to spend too much time modeling the buildings in the background and rendering that or maybe sometimes it's just timec consuming to find the perfect back plate using um stock imagery um AI really helps us to generate something that is exactly how we wanted based on like a really rough sketch that we give it we'll show you an example and we'll try to add an extra pool into this image so this is just a general illustration of this feature of stable diffusion and we're not trying to create a masterpiece here this is just literally to give you some ideas that you can apply in your work by using the inpaint sketch feature you can draw a rough outline of the pool in the right color add some shadow where you need them like remember that stable diffusion is really going to rely on the shape that you draw here um so the settings look pretty fine we type in the prompt in our case we want to generate super realistic water in the pool and we're doing really like a half ass job here to show you how effortlessly you can do this um and even with like a poor first result you can improve this by doing next iterations so you can just pick the best version of the four images that are generated and proceed with this to the next step now we're going to move into the in paint tab we're going to be improving the AI generated version here you can select your pool again and add a new prompt this time we can ask for the pool to have small waves to make it more um realistic and at this point I think it's worth moving um it to photoshop to crop the image and be able to squeeze a little bit more quality from it at this stage we can also add some basic Reflections maybe something that looks like waves uh maybe even an outline of the pool just to see how stable diffusion would interpret this and we can now show you what we could achieve with a few more iterations or improving some details in generating new versions and you can obviously see how half fast of a job this is right but it's really just to show you that in an emergency situation like when you just want to literally sketch something on your image you can do that and just rely on AI and prompts to kind of figure out and and like kind of fill in those gaps for you so you can see that with the minimum effort that we actually put into this um stable diffusion stuck to the shape of the pool pretty well and it didn't change it uh just made it feel and look as realistic as it could within the constraints that it got these are obviously things that you can do in 3D or in Photoshop by yourself but they usually take way more time and what we're here to do is to show you how you can leverage AI to get your work done faster and more efficiently so this is an extra tip for you if you'd like to relatively quickly prepare a back plate for your image and you know finding the right background for in the right lighting and the right perspective um sometimes can be timec consuming so um let's say we'd like to see a cityscape far away in the background we can paste like any City into this image just to kind of give it like a rough sketch of what we'd like to see and today's stable diffusion will help us make it look more realistic so we want to work in really broad Strokes at this stage so we'll add some aerial perspective Ive add a reflection to Show Stable diffusion that we want the light to come from this side um in a really like you know sketchy way we will type in our prompt describing what we'd like stable diffusion to create and here you go this is one of the variants that stable diffusion generated is definitely looking more realistic um than our super super rough sketch you can check out the the other variants and you can see that in some cases the model didn't even really catch the direction of the light or in some cases you know it did a bigger or a smaller city um but you know it's all a matter of like experimenting with this um we also added the fog in the prompt and to see kind of what that gives us and um this one is kind of cool but again it's all about experimenting with the tool and learning how to just like communicate with the model to to see kind of what you can push it to do this brings us to the end of our tutorial for today we really hope that you're going to be able to apply this in your day-to-day work and we look forward to hearing from you in the comments section it really gives us a lot of Joy when we see you guys improving your skills every day so please let us know what you think about it and see you next time