🎯 Key Takeaways for quick navigation: 00:00 💻 Setting up Automatic 1111 on AWS SageMaker - Running Automatic 1111 with a GPU on AWS SageMaker Studio Lab. - Accessing free GPU and CPU resources on AWS SageMaker Studio Lab. - Steps to clone the Automatic 1111 repository and set up the environment. 03:00 🚀 Launching the Web UI and Using External Models - Launching the Automatic 1111 web UI on AWS SageMaker Studio Lab. - Tunneling the instance for external access. - Downloading and using third-party models for AI generation. 07:07 🎨 Generating Realistic Images with AI - Running AI prompts to generate realistic images. - Demonstrating the capabilities of Automatic 1111 for image generation. - Using AI-generated content for creative purposes. Made with HARPA AI
Thank you very much friend. I struggled for three days to finally try stable diffusion from my laptop. Unfortunately, I'm not good at programming, but I understood the general algorithm of actions. Glad I found your video. Hello from Kazakhstan! I would like to see a video from you on installing ControlNet and add-ons like Posex.
Hey I think ngrok is still free, I just checked their website. Where does it say they got rid of the free tier. If they did I gotta find a new tunneling service haha :)
@@toshvelaga Since January 2024, it has a 1GB/month limit, which for me runs out after using the notebook once or twice. And then it asks you to subscribe or wait for next month to be able to keep using it for free. I heard about zrok, but have not been able to make it work, and decided to ask you (:
ahhh i see thanks for clarifying. that sucks i guess ngrok is desperately trying to make money. I havend heard of zrok before but will check it out@@gianluca-aries
hello amazing vid. I got stuck at the end of python launch.py command "Traceback (most recent call last): File "/home/studio-lab-user/stable-diffusion-webui/launch.py", line 48, in " It´s sound any solution to you?
This method is great and I'm already using this method to run SD for a week now, will they ban SD AI artists from their platform as Kaggle and Google Collab did?
Can you please make a new updated video on how to install stable diffusion because it doesn't work for me anymore, when I write "python launch.py --lis..." an error appears, I believe it's not just me that this error is happening to . This happened when I decided to reinstall it because I had some buggy Lora, so I did the same procedure as in the video and it didn't work anymore, I believe it was because of the stable diffusion version, I don't know :(
this is what appears to me: Traceback (most recent call last): File "/home/studio-lab-user/stable-diffusion-webui/launch.py", line 48, in main() File "/home/studio-lab-user/stable-diffusion-webui/launch.py", line 44, in main start() File "/home/studio-lab-user/stable-diffusion-webui/modules/launch_utils.py", line 465, in start import webui File "/home/studio-lab-user/stable-diffusion-webui/webui.py", line 13, in initialize.imports() File "/home/studio-lab-user/stable-diffusion-webui/modules/initialize.py", line 36, in imports shared_init.initialize() File "/home/studio-lab-user/stable-diffusion-webui/modules/shared_init.py", line 40, in initialize from modules import styles File "/home/studio-lab-user/stable-diffusion-webui/modules/styles.py", line 9, in class PromptStyle(typing.NamedTuple): File "/home/studio-lab-user/stable-diffusion-webui/modules/styles.py", line 11, in PromptStyle prompt: str | None TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' (studiolab) studio-lab-user@default:~/stable-diffusion-webui$
Whenevr I run this command python launch.py --listen --xformers --enable-insecure-extension-access --ngrok NGROK_AUTHTOKEN... It gives me the error python: can't open file '/home/studio-lab-user/launch.py': [Errno 2] No such file or directory
hey there thanks for the kind words and apologies for the late reply, would you be able to type the following into the terminal: ls ls will list all the files and directories. Can you check that there is a launch.py? If not you either don't have the files or are in the wrong working directory
@@toshvelaga Thanks man...... I was able to fix the issue. It was like you said I was in the wrong directory. Btw I am trying to run Comphy ui on Sagemaker Studio Labs can you please make a guide on that or guide me to some resources
Hi Tosh, fantastic video, thank you. I was able to get up and running. I'm now trying to do this with lambda labs so I don't face the same time limitation, but the conda installation (step 2) doesn't work there. Says conda command not found. Any tips to get around this?
In my case the following is happening, I opened it yesterday just to test and it worked, so I opened it again today and when I entered the command with my ngrok this appears: ngrok authtoken detected, trying to connect... Invalid ngrok authtoken? ngrok connection aborted due to: ('failed to connect session', "Your account is limited to 1 simultaneous ngrok agent session. Do you know how to fix this?
yes, you need to terminate your previous ngrok connection. for some reason it did not disconnect. you can disconnect it by logging into your ngrok account and i think you can see the current session underneath Tunnels / Agents. If you terminate the active session you should be able to open up a new connection
true, its better to put in mind the model required for the work needed to do, also the download and setup can be do in cpu saving some time@@sidheart8905
when I click on "Start runtime", it returns a message error: " There is no runtime available right now. Please change the compute type or try again later."
It means they don't have any gpus free at the moment. You will have to try again a few times. I usually get the same message but try again every few minutes
yeah, it's sometimes hard to get a GPU. What I usually do is just keep spamming trying to connect with the GPU runtime until i get it. If I can't connect in a few minutes, I'll just come back in an hour or so. Wish they had more GPU's available but i can't complain since its free 😅
Thanks for the video. When I run the ngok thing, it says "python: can't open file '/home/studio-lab-user/sagemaker-studiolab-notebooks/launch.py': [Errno 2] No such file or directory"... so what do I do? thanks on advance
Make sure you have the automatic code downloaded from github.com/AUTOMATIC1111/stable-diffusion-webui. And then once you've downloaded it, you need to cd into the newly created folder with the automatic1111 code. If you've already downloaded the code, it's likely you are not in the directory.
Thanks for this. Question maybe know. UI is great but do you know of an API I can use to access my instance to post a prompt and the results of the model also via API? or must it all be client side ....?
Great question! Yes that's what I am working on now. Should have a video up soon. To run an API with high availability though it won't be free. Will need to pay for the GPU, although you can use a serverless GPU service like runpod to host the api
Hey! I was wondering about your thoughts on this. I see jupyter notebooks docker composes out there. I wonder if this can also be an option, and somehow use a docker image to access the GPU locally and skip the whole AWS thing. It's probably not scalable but just wondering if this is something you may have tried...
Cool. Can you please tell me how much data (MB/GB) I'll need in order to download a1111 in sagemaker studio and lastly, when running a1111 in sagemaker, do I need to restart downloading the whole a1111 from scratch or do all my files automatically save in sagemaker.
Hey has more than enough GB to download several models + Automatic1111. I believe there's 15 GB for free. No you won't need to restart downloading, everything is saved automatically.
Because judging from your video, you just installed a1111 without telling us how to run it again after downloading it for the first time (like when you want to start a new session after a day or two). Would appreciate it if you made a video about it
@@nelsonaruobebh3020 Ok i see what you mean. Once you already have it downloaded, to run the web ui just run this command and replace NGROK_AUTHTOKEN with your own token from ngrok: python launch.py --listen --xformers --enable-insecure-extension-access --ngrok NGROK_AUTHTOKEN
Thank you. I got my account and running an instance within 12 hours. Some users have reported problems getting the runtime to load, and apparently, the Captcha was to prevent bots and scripts from consuming the compute for users. There are a limited amount of computational resources available but hopefully, they will expand the free tier as more people continue to use it. @@toshvelaga
Will probably make another vid on extensions. Not familiar with roop, but it looks like there is installation instructions on the github page: github.com/s0md3v/sd-webui-roop
Hey good question, I haven't used fooocus UI before so not sure what the exact steps would be, that being said you can still use the GPU from sagemaker studio
@@toshvelagaif you don’t mind will you be able to make a tutorial on fooocus web ui, how to use it in the Sagemaker studio lab ? I’m not a programmer I just followed your steps but automatic web ui seems complicated and need to upload lots of other things to make it work. Where as run diffusion comes with many preloaded models
@@Messi-ny7ub so I don't know how to solve that error personally, I did find this tho: github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1742 maybe try running with --skip-torch-cuda-test
🎯 Key Takeaways for quick navigation:
00:00 💻 Setting up Automatic 1111 on AWS SageMaker
- Running Automatic 1111 with a GPU on AWS SageMaker Studio Lab.
- Accessing free GPU and CPU resources on AWS SageMaker Studio Lab.
- Steps to clone the Automatic 1111 repository and set up the environment.
03:00 🚀 Launching the Web UI and Using External Models
- Launching the Automatic 1111 web UI on AWS SageMaker Studio Lab.
- Tunneling the instance for external access.
- Downloading and using third-party models for AI generation.
07:07 🎨 Generating Realistic Images with AI
- Running AI prompts to generate realistic images.
- Demonstrating the capabilities of Automatic 1111 for image generation.
- Using AI-generated content for creative purposes.
Made with HARPA AI
Thank you very much friend. I struggled for three days to finally try stable diffusion from my laptop.
Unfortunately, I'm not good at programming, but I understood the general algorithm of actions. Glad I found your video.
Hello from Kazakhstan!
I would like to see a video from you on installing ControlNet and add-ons like Posex.
Awesome, so glad you found it helpful :)
can't open file '/home/studio-lab-user/launch.py': [Errno 2] No such file or directory. anything missing?
Thank you for the well explained video.
ngrok is no longer free. Could you explain how to do it with a similar free service like zrok? thank you
Hey I think ngrok is still free, I just checked their website. Where does it say they got rid of the free tier. If they did I gotta find a new tunneling service haha :)
@@toshvelaga Since January 2024, it has a 1GB/month limit, which for me runs out after using the notebook once or twice. And then it asks you to subscribe or wait for next month to be able to keep using it for free. I heard about zrok, but have not been able to make it work, and decided to ask you (:
ahhh i see thanks for clarifying. that sucks i guess ngrok is desperately trying to make money. I havend heard of zrok before but will check it out@@gianluca-aries
hello amazing vid. I got stuck at the end of python launch.py command "Traceback (most recent call last):
File "/home/studio-lab-user/stable-diffusion-webui/launch.py", line 48, in "
It´s sound any solution to you?
This method is great and I'm already using this method to run SD for a week now, will they ban SD AI artists from their platform as Kaggle and Google Collab did?
They probably won't ban SD because they have limits in place such as the 4 hour GPU limit per day.
Hey, have you found any alternative to Ngrok? It frequently ran out of request limit lately and requires us to upgrade plan.
I get the error TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' after launching, what should I do?
I got this as well. Any luck fixing it? @toshvelaga can you help please? it's possible it needs python 3.10 but sagemaker won't allow that...
Great video, thanks! Can you make another video to explain how to install extensions? Thanks!
Sure it's definitely something I can look into :)
Thanks bro wok like a charm
Can you please make a new updated video on how to install stable diffusion because it doesn't work for me anymore, when I write "python launch.py --lis..." an error appears, I believe it's not just me that this error is happening to . This happened when I decided to reinstall it because I had some buggy Lora, so I did the same procedure as in the video and it didn't work anymore, I believe it was because of the stable diffusion version, I don't know :(
this is what appears to me:
Traceback (most recent call last):
File "/home/studio-lab-user/stable-diffusion-webui/launch.py", line 48, in
main()
File "/home/studio-lab-user/stable-diffusion-webui/launch.py", line 44, in main
start()
File "/home/studio-lab-user/stable-diffusion-webui/modules/launch_utils.py", line 465, in start
import webui
File "/home/studio-lab-user/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/home/studio-lab-user/stable-diffusion-webui/modules/initialize.py", line 36, in imports
shared_init.initialize()
File "/home/studio-lab-user/stable-diffusion-webui/modules/shared_init.py", line 40, in initialize
from modules import styles
File "/home/studio-lab-user/stable-diffusion-webui/modules/styles.py", line 9, in
class PromptStyle(typing.NamedTuple):
File "/home/studio-lab-user/stable-diffusion-webui/modules/styles.py", line 11, in PromptStyle
prompt: str | None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
(studiolab) studio-lab-user@default:~/stable-diffusion-webui$
Dude love your content and it was super helpful and most importantly worked. But I am having difficulties running restarting the same project again.
Whenevr I run this command python launch.py --listen --xformers --enable-insecure-extension-access --ngrok NGROK_AUTHTOKEN... It gives me the error python: can't open file '/home/studio-lab-user/launch.py': [Errno 2] No such file or directory
hey there thanks for the kind words and apologies for the late reply,
would you be able to type the following into the terminal:
ls
ls will list all the files and directories. Can you check that there is a launch.py? If not you either don't have the files or are in the wrong working directory
@@toshvelaga Thanks man...... I was able to fix the issue. It was like you said I was in the wrong directory.
Btw I am trying to run Comphy ui on Sagemaker Studio Labs can you please make a guide on that or guide me to some resources
@@rishabhsingh1406 Hi. I've been getting the same error. Think you can explain the steps to work around it in laymen terms?
Hi Tosh, fantastic video, thank you. I was able to get up and running. I'm now trying to do this with lambda labs so I don't face the same time limitation, but the conda installation (step 2) doesn't work there. Says conda command not found. Any tips to get around this?
How do we turn it back on after closing it?
is it possible to add the controlnet extension as well because i can't seem to get it to work
How to make the same process with SadTalker?
How relaunch it when i Close sagamaker?
have you got any solution??
In my case the following is happening, I opened it yesterday just to test and it worked, so I opened it again today and when I entered the command with my ngrok this appears: ngrok authtoken detected, trying to connect...
Invalid ngrok authtoken? ngrok connection aborted due to: ('failed to connect session', "Your account is limited to 1 simultaneous ngrok agent session.
Do you know how to fix this?
yes, you need to terminate your previous ngrok connection. for some reason it did not disconnect. you can disconnect it by logging into your ngrok account and i think you can see the current session underneath Tunnels / Agents. If you terminate the active session you should be able to open up a new connection
i think this work exactly like a local one, so i can put things on it like control net and stuff right? so happy with this, thanks for share mate
but space is very less so delete the photos and unused models.. regularly
true, its better to put in mind the model required for the work needed to do, also the download and setup can be do in cpu saving some time@@sidheart8905
when I click on "Start runtime", it returns a message error:
" There is no runtime available right now. Please change the compute type or try again later."
It means they don't have any gpus free at the moment. You will have to try again a few times. I usually get the same message but try again every few minutes
@@toshvelaga Its working! After many attempts, it's working now! Thanks so much!
Awesome! Glad you got a GPU :)
How to restart the sd automatic 1111 webui 2nd time...after logout from sagemaker account....Can we done all this things again and again.....
Yup, everything is saved including any models you download, all you have to do is log back in and run the python command with ngrok
Thanks a lot
GPU There is no runtime available right now. Please change the compute type or try again later. :(
yeah, it's sometimes hard to get a GPU. What I usually do is just keep spamming trying to connect with the GPU runtime until i get it. If I can't connect in a few minutes, I'll just come back in an hour or so. Wish they had more GPU's available but i can't complain since its free 😅
@@toshvelaga so.. can I run webui on AWS free tier? free tier supports GPU??
yup, it should be free and you can connect with a GPU using sagemaker studio@@AfterDinnerCafe-ld4tb
Thanks for the video. When I run the ngok thing, it says "python: can't open file '/home/studio-lab-user/sagemaker-studiolab-notebooks/launch.py': [Errno 2] No such file or directory"... so what do I do? thanks on advance
Make sure you have the automatic code downloaded from github.com/AUTOMATIC1111/stable-diffusion-webui.
And then once you've downloaded it, you need to cd into the newly created folder with the automatic1111 code. If you've already downloaded the code, it's likely you are not in the directory.
Thanks for this. Question maybe know. UI is great but do you know of an API I can use to access my instance to post a prompt and the results of the model also via API? or must it all be client side ....?
Great question! Yes that's what I am working on now. Should have a video up soon. To run an API with high availability though it won't be free. Will need to pay for the GPU, although you can use a serverless GPU service like runpod to host the api
Awesome well I am looking forward to that!
Hey! I was wondering about your thoughts on this. I see jupyter notebooks docker composes out there. I wonder if this can also be an option, and somehow use a docker image to access the GPU locally and skip the whole AWS thing. It's probably not scalable but just wondering if this is something you may have tried...
@@toshvelagawhere we found your API related video?
Cool. Can you please tell me how much data (MB/GB) I'll need in order to download a1111 in sagemaker studio and lastly, when running a1111 in sagemaker, do I need to restart downloading the whole a1111 from scratch or do all my files automatically save in sagemaker.
Hey has more than enough GB to download several models + Automatic1111. I believe there's 15 GB for free. No you won't need to restart downloading, everything is saved automatically.
Cool. Then how do I run it?
Because judging from your video, you just installed a1111 without telling us how to run it again after downloading it for the first time (like when you want to start a new session after a day or two). Would appreciate it if you made a video about it
@@nelsonaruobebh3020 Ok i see what you mean. Once you already have it downloaded, to run the web ui just run this command and replace NGROK_AUTHTOKEN with your own token from ngrok: python launch.py --listen --xformers --enable-insecure-extension-access --ngrok NGROK_AUTHTOKEN
@@toshvelagathanks 🖤
I am gettin error like Model not found something
How much is the Vram for the free tier? What's your overall UX? Max storage?
Hey, this page might helpful has info on storage/RAM and limitations: studiolab.sagemaker.aws/faq
Thank you. I got my account and running an instance within 12 hours. Some users have reported problems getting the runtime to load, and apparently, the Captcha was to prevent bots and scripts from consuming the compute for users. There are a limited amount of computational resources available but hopefully, they will expand the free tier as more people continue to use it. @@toshvelaga
hey nice tutorial but can this be done on Sagemaker Studio Classic? like run Automatic1111 in a notebook
I believe so as long as there is a GPU. A GPU is all you need, it can be any type of notebook
This doesn’t work anymore
awesome!!
thank you can you make a video for kaggle
Sure, I can look into it. Haven't actually used Kaggle before but will take a look
hello thanks for the video.
how to add styles on this version ?
Bro how to add roop extension (face swap
Will probably make another vid on extensions. Not familiar with roop, but it looks like there is installation instructions on the github page: github.com/s0md3v/sd-webui-roop
what about controlnet?
does this still work???
You may want to mention that you need a credit card
can I use same steps if I want to use fooocus UI?
Hey good question, I haven't used fooocus UI before so not sure what the exact steps would be, that being said you can still use the GPU from sagemaker studio
@@toshvelagaif you don’t mind will you be able to make a tutorial on fooocus web ui, how to use it in the Sagemaker studio lab ? I’m not a programmer I just followed your steps but automatic web ui seems complicated and need to upload lots of other things to make it work. Where as run diffusion comes with many preloaded models
Do you know a way to add Loras?
Same how like adding models, but in Lora folder
do extensions work?
Do you know how to fix "torch unable to use gpu" ?
You are on the GPU runtime right?
@@toshvelaga yup
@@Messi-ny7ub so I don't know how to solve that error personally, I did find this tho: github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1742 maybe try running with --skip-torch-cuda-test
@@toshvelaga thx
make a Rvc sagemaker notebook
Actually good idea, I've seen a Google Collab notebook floating around. But will do.