AI Render Tutorial - Stable Diffusion Add-on for Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign [Music] hi this is Ben I'm the creator of the AI render add-on for blender and I'm going to show you how to get started using it so first you're going to install it just like any other add-on you can get it from GitHub or hopefully blender Market very soon download a zip go to blender and just like anything else edit preferences add-ons install find that zip file and then enable it and it's installed now the only other piece of setup is to sign up for a dream Studio account dream studio is the official service from the people that made stable diffusion it's not affiliated with this add-on but it's just the easiest way to make it so that you don't have to install stable diffusion on your computer or use a Google collab or any of those complicated setup things it's very quick and easy so click this link to sign up you will go to stability AI create an account it's free you get a number of credits for free and then you can pay for more but you get a quite a bit of credits for free so this really is just a great way to get started using it it's really easy and quick if you get to this page hopefully you will if not navigate to settings actually membership and then API key hopefully it'll take you right here and do copy and now you've got your API key put a blender paste it in here and that's it you are now set up and ready to render with AI render enabled you'll find it under render properties and then a little bit buried down here does not enable Itself by default in a new scene so we'll just click to enable it and the first thing you'll see is that it only works on a few specific image Dimensions so this is actually a limitation of stable diffusion itself and Dolly the way they just the way they train them we are going to do 512 by 512 it's a good starting point you can do different combos of widths and Heights but anything kind of bigger than this really kind of risks timing it out so we'll do that and we can always upscale it if we want to later The Prompt is really the core of where you're going to live the way stable diffusion works is that you describe anything you want it to create so you describe any subject matter flowers on a table or whatever and you know literally anything in the world that you wanted to create and of course uh then you can also add an art style so oil painting right really simple um these presets are ones that I have made and I really hope that with the community we can all make a lot more together these are great starting points and what they are is just an actual piece of text that gets applied to the prompt so you'll see that what I would do if I chose steampunk as the preset it would actually be the prompt would be flowers on a table oil painting steampunk brasswood steel hyper detailed illustration complex Machinery that's actually now the full prompt that we have so I've created a whole bunch of these it's just really fun cool starting points and they'll give you some inspiration the there's so much to prompt engineering uh there's just you can dive really deep on this and I will link a ton of resources on GitHub and blender Market because there's really like this is where a lot of the creativity lies it's not just describing it like this but really giving it a bunch more modifier keywords so yeah dive deep on this and start making some awesome things with better prompts but for now we will leave it like that and actually I will just pull up a quick sample scene here uh this is kind of the best part is that unlike you know a lot of other stable diffusion or Dolly things you're not just sending it the text you're actually sending it an image of your scene too so uh with this little scene that I've made obviously just really crude really quick I think I put some basic shading on here um it is together with a hdri in the background I mean this is like one minute worth of work right just making this so we've got flowers on the table and I chose this preset style and then we're just going to render and AI render will take over it'll automatically apply stable diffusion to every render while it's enabled and you will see a result in just a few seconds this is real time so boom it made a cool it started with this render I mean this scene that we made and it made that out of it which is pretty incredible and obviously just changing anything about our scene so let's go back to the camera here you know we can really make this obviously anything we could do new colors new whatever uh and obviously and you see not just that we could also just describe it differently we could say um I don't know magic flowers on a table let's see if that actually throws anything else in there but uh and obviously just a different preset style too let's maybe let's go with something totally different let's go abstract and see if that ends up cool uh render again just a few seconds again this is why it's 500 by 512 because it takes a few seconds this way and it takes quite a bit longer with something larger but boom I don't know if they're magic but that's a great starting point and then you can just keep rendering new versions of that um with different styles and different uh well you know what let's dive into the advanced options and I'll show you how to do more all right I've created another quick sample scene it's sort of like a bowl of reflective spheres and let's dive into some options so first of course the prompt I called it a bowl of bouncy balls colorful digital matte painting hyper detailed 8K concept art trending on artstation again The Prompt is such an important piece you really want to learn how to do good prompt engineering but let's dive into some options here so you can see that right away what it created with especially with this preset applied with this awesome artist is some pretty cool results and you can see that it added quite a bit of detail even you know things in like the reflections and this thing coming out there's a lot you know with different uh presets that even added like mountains in the background so the first thing I'm going to say is let's adjust the image similarity so I'm going to skip over to see but I'll come back to that uh if we wanted our scene to look quite a bit closer to the original scene let's just raise this image similarity up to maybe 0.5 uh kind of set it as a soft Max but you can go even higher than that but let's do that and then render everything exactly the same but just with the image similarity dialed up a little bit all right that's actually quite a bit closer so our initial image was that and that's the new output again something cool it's a stylized version but it's actually quite a bit closer so image similarities somewhere in the range of about like 0.15 to 0.5 is probably where you're going to want to live like let's go actually all the way down to 0.15 and try this exact same image again and yeah you can see quite a bit different a different perspective still captured some of the idea but it's you know a completely different image now so instead of being pretty faithful to the original image it is pretty Divergent which again might be what you want so it's a pretty sweet place to live to play around with image similarity again the range kind of 0.15 to 0.5 is is probably the place to start all right seed what is that so by default it's going to do a random seed which means that every time it generates a new image it's going to generate completely from a new random starting point that's how you can think of the seed as so let's again let's just do a new one and you can see that this is the same settings we used just a moment ago I think it was this one yeah so these two are exactly the same settings nothing's different other than it was a random seed so it came out with pretty different variations if you uncheck this it'll use the last seed that was rendered and now if we render again it should create something that's very similar if not maybe identical yeah very close I think let's see almost identical maybe actually identical so uh you're not guaranteed though that if we move this scene even just a little bit let's try keeping the back on the same but let's rotate it a little bit and now let's render it let's see if this random seed will keep it I think it will keep something that's close but not necessarily guaranteed yeah so you can see this was the previous result oops this was the previous result and this was our new result uh kind of similar art style but not exactly the same so stabilize the C keep it the same if you've got something that you like otherwise do a random Cedar notes create something from a different random starting point every time again these are all actually parameters that are built into stable diffusion and Dolly themselves so these are ones that I'm just capturing and applying to stable diffusion so uh steps is basically how much does the stable division algorithm will work so way down to 10 it's it's just going to like start processing an image and up to like 50 it will work harder to make the image that you want so I guess the the one time that you would really want to think about this is that the higher image similarity you want the higher steps you might want to actually give the the CPU or the the AI time to create that so let's pull up a new uh test scene again something pretty basic pretty um simple over here I made uh again these have all been in Eevee but of course you can use Cycles you can actually use you know really good cool renders I'm just throwing together things that make this click but um I made a very quick little scene here and we will render it and it took this image and made it that which is I have to say actually one of my favorites that I've made in this demo process but um if we did a lot lower steps like let's go way down to 10. and do this again you can see that uh actually still kind of created a cool image but it didn't take as long to make it so it didn't maybe do as many cycles of kind of like working on the prompt and getting it closer to what the actual prompt was so you can play around with this lower is faster higher is a little slower but not that much and basically again like the reason you'd want to raise it is that if you really want a higher image similarity you might want to raise the steps to give it more ability to get there prompt strength is maybe an even more advanced option but basically it's how close it's going to follow your text prompt rather than the scene so again I made a really quick just again terrible uh sample scene uh I called that cute tiger Club applied a cartoon style and it made something pretty sweet but let's say I wanted it to actually be a forest instead of that it's going to still use of course this same image to start with but now we've called it a forest and let's do I don't know something different a different preset and we'll just do the prompt strength way up maybe we'll do the problems like way up if you do it too high I think this has a chance of really looking bad you can kind of overcook is what they call it overcook the image by doing too high of a prompt but we'll just tell it forest and so you can see it took that sample scene and you can see the outline of like where that tiger Cub's face was and it's actually done something with it in the image it's made the light that way um but it knew like okay I've got a tiger cub as an image but I but I really really want the prompts to be a forest so that's what you can use prompt strength for is dialing that dialing that in we transformed it to a forest by just the sheer weight of the prompt string so you can do something really weird which is uh let's turn it negative um and I don't know let's try negative 10. I'm not sure how well this will work but we'll do cute tiger cub again uh but this has the chance of making something terrible but maybe just an interesting creative starting point the negative prompt means do the opposite of whatever a cute tiger cub is not of course like a logically the way a human would think but there we go it's uh the opposite of a tiger um I'm not sure how useful this is but it's a cool thing to play around with at least sampler is another setting that stable diffusion allows you to uh change it's I guess kind of deep in the heart of the AI algorithm uh what sampler it's using in terms of um I don't know how to explain it actually so I would suggest leaving this as a default but of course you can mess around with it and see what else it creates operation really the only thing is you can uncheck automatically run on every render so it won't do that and then run manually what you can do is just if you had something that took longer to render like an actual nice Cycles Render uh once it's rendered you can just keep generating new images from the last render without re-rendering so that's useful and you can also do new image from last AI image so now this crazy toilet that we have let's do play I don't know if this is going to work but let's try a normal prompt strength again and we'll create a cute tiger Club out of this image without re-rendering uh and like always it'll just take a few seconds and it will turn this into something okay not a great result you should definitely not be discouraged if you get trash sometimes it really is trash let's try it again we can just kind of keep cycling through uh using the last image as the input for the next image so instead of just our render just a game of telephone but that kind of actually turned cool uh turned from one weird thing into another and then this so yeah that's how you can use these options that's it for this tutorial please go nuts making amazing art and send me anything that you create let me know if it's okay to post publicly you can tweet images to me at AI underscore render on Instagram at AI render blender sorry for the rhyming username and you can always tweet or post with hashtags AI render AI art and stable diffusion and finally obviously I want to make this thing more amazing I've got lots of things planned for the future so please request features and Report bugs on GitHub and just feel free to keep making this thing amazing also send me prompt ideas if you have ideas for preset Styles we can make more amazing art together thank you enjoy [Music] [Music]
Info
Channel: nefex99
Views: 121,058
Rating: undefined out of 5
Keywords:
Id: tmyln5bwnO8
Channel Id: undefined
Length: 15min 12sec (912 seconds)
Published: Wed Oct 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.