How to Use AWS SageMaker for Text to Image with Stable Diffusion

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I am going to show you how to install and run stable diffusion 2.1 model which is used for text to image generation in AWS switch maker I am already logged into my AWS account and on my screen that you can see that I'm already at awch Magnet studio if you don't know how to go there all you need to do is to go to your AWS account go to AWS sagemaker service and on the left hand side click on Studio once you click there then you will be after opening the studio you will be on this screen on the left hand side click on estate maker jumpstart in the model notebook solution just on the top right search for stable diffusion and you will present it with these models now in order to use this model all you need to do is to click here and it will open a new screen in this screen click on deploy and that will start deploying if you want to see what exactly this deployment configuration will be just open up this deployment configuration and it is showing you what sort of instance it is using in this case it is using mlp3 2x launch which is quite an expensive one but so let's try it out click on deploy here and it is going to deploy the model for you so let's wait for it to finish the stable diffusion is still being deployed and it takes around five to ten minutes and I have seen that sometime it even takes 20 minutes so let's wait stable diffusion model has been deployed on the studio now open this notebook it will open this notebook in a new window and it will start the kernel so it has started it now let's run all of these cells one by one where we will be importing some of the libraries and in order to run it just click on this play button within that cell that's done okay now let's run the endpoint helpers for the endpoint that's done so now here we are going to call the model where we will be um generating the image from the prompt so the image here in this example is cottage in impressionist Style here and you can see the static which means that it is in progress so let's wait for it to finish while it finishes you can read through a lot of advanced features of this model while it performs this inference so we are given we are we need to give it a prompt and out of the stuff while we were doing it you can see that it has generated this image and how cool is that let's try some more um promptly let me ask it to do some beach image B2 is palm trees maybe I will just make the beat right this mobile let's try it out complete button you can read through a lot of these parameters it will give you more idea there you go so you can see how cool um that image is and just look at attention to detail look at this water despite Sandy Beach and this palm tree and also there are palm trees in that distance amazing stuff there are various examples in this provided jump start notebook let me run this one where we have astronaut on a horse so click on play button and what is happening in this prompt is that we have given some of the values for different parameters so let's wait for it to finish and as I have mentioned earlier if the static is shown here it means that it is still in progress so that's done scroll down a bit and you can see the astronaut on a horse and also this image amazing stuff and then we can also um use a compressed image output and for this one Let's uh if you just read this it says the default response type above from an endpoint is a nested delay with RCB values and this limit is bit large so we can reduce it by compressing it and then um this is the code to do it so this is how you can use table diffusion in aw sagemaker with different prompts of your liking and you can delete images as you please I hope that you enjoyed it if you have any feedback please put it in the comment section and if you like the content please consider subscribing to the channel thank you very much
Info
Channel: Fahd Mirza
Views: 1,208
Rating: undefined out of 5
Keywords:
Id: vHl2XYd6Z3U
Channel Id: undefined
Length: 4min 53sec (293 seconds)
Published: Thu Jul 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.