Running Automatic1111 Stable Diffusion Web UI on a GPU for Free

  Рет қаралды 13,157

Tosh Velaga

Tosh Velaga

10 ай бұрын

Tutorial on how to use Automatic1111 Stable Diffusion Web UI using Sagemaker Studio.
You get 4 hours of free GPU per day and 8 hours of CPU.
Code to run:
git clone github.com/AUTOMATIC1111/stab...
conda install glib=2.51.0 -y
python launch.py --listen --xformers --enable-insecure-extension-access --ngrok NGROK_AUTHTOKEN

Пікірлер: 95
@OslaFe
@OslaFe 9 ай бұрын
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.
@toshvelaga
@toshvelaga 9 ай бұрын
Awesome, so glad you found it helpful :)
@andreasyonathan392
@andreasyonathan392 3 ай бұрын
can't open file '/home/studio-lab-user/launch.py': [Errno 2] No such file or directory. anything missing?
@truymenh7728
@truymenh7728 3 ай бұрын
Hey, have you found any alternative to Ngrok? It frequently ran out of request limit lately and requires us to upgrade plan.
@elijahauger
@elijahauger 2 ай бұрын
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?
@ataturksevdals617
@ataturksevdals617 7 ай бұрын
How do we turn it back on after closing it?
@user-oz5mx4jo2b
@user-oz5mx4jo2b 9 ай бұрын
Thanks bro wok like a charm
@nickfrets7437
@nickfrets7437 Ай бұрын
Thank you for the well explained video.
@DiegoParma
@DiegoParma 4 ай бұрын
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?
@FurMingle
@FurMingle 7 ай бұрын
hello thanks for the video. how to add styles on this version ?
@simongus
@simongus 9 ай бұрын
Great video, thanks! Can you make another video to explain how to install extensions? Thanks!
@toshvelaga
@toshvelaga 9 ай бұрын
Sure it's definitely something I can look into :)
@soitk1825
@soitk1825 7 ай бұрын
I am gettin error like Model not found something
@oliverli9630
@oliverli9630 7 ай бұрын
awesome!!
@madushandissanayake96
@madushandissanayake96 10 ай бұрын
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?
@toshvelaga
@toshvelaga 10 ай бұрын
They probably won't ban SD because they have limits in place such as the 4 hour GPU limit per day.
@geooogle
@geooogle 10 ай бұрын
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 ....?
@toshvelaga
@toshvelaga 10 ай бұрын
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
@geooogle
@geooogle 10 ай бұрын
Awesome well I am looking forward to that!
@geooogle
@geooogle 10 ай бұрын
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...
@awais6044
@awais6044 4 ай бұрын
​@@toshvelagawhere we found your API related video?
@hameedbarakat4777
@hameedbarakat4777 20 күн бұрын
is it possible to add the controlnet extension as well because i can't seem to get it to work
@TB0Y298
@TB0Y298 5 ай бұрын
I get the error TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' after launching, what should I do?
@jasonauyong4450
@jasonauyong4450 5 ай бұрын
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...
@nefasto9355
@nefasto9355 7 ай бұрын
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?
@toshvelaga
@toshvelaga 7 ай бұрын
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
@nefasto9355
@nefasto9355 5 ай бұрын
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 :(
@nefasto9355
@nefasto9355 5 ай бұрын
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$
@rishabhsingh1406
@rishabhsingh1406 6 ай бұрын
Dude love your content and it was super helpful and most importantly worked. But I am having difficulties running restarting the same project again.
@rishabhsingh1406
@rishabhsingh1406 6 ай бұрын
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
@toshvelaga
@toshvelaga 6 ай бұрын
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
@rishabhsingh1406
@rishabhsingh1406 5 ай бұрын
@@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
@schizoid1255
@schizoid1255 Ай бұрын
​@@rishabhsingh1406 Hi. I've been getting the same error. Think you can explain the steps to work around it in laymen terms?
@hebatullahhesham4522
@hebatullahhesham4522 23 күн бұрын
How to make the same process with SadTalker?
@user-qf6pr3rs4l
@user-qf6pr3rs4l 8 ай бұрын
do extensions work?
@Faded_Fragger
@Faded_Fragger 6 ай бұрын
what about controlnet?
@nelsonaruobebh3020
@nelsonaruobebh3020 10 ай бұрын
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.
@toshvelaga
@toshvelaga 10 ай бұрын
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.
@nelsonaruobebh3020
@nelsonaruobebh3020 10 ай бұрын
Cool. Then how do I run it?
@nelsonaruobebh3020
@nelsonaruobebh3020 10 ай бұрын
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
@toshvelaga
@toshvelaga 10 ай бұрын
@@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
@NOPEFallacy
@NOPEFallacy Ай бұрын
​@@toshvelagathanks 🖤
@raihanuddin6949
@raihanuddin6949 8 ай бұрын
How relaunch it when i Close sagamaker?
@NOPEFallacy
@NOPEFallacy Ай бұрын
have you got any solution??
@PeterKallio
@PeterKallio 10 ай бұрын
How much is the Vram for the free tier? What's your overall UX? Max storage?
@toshvelaga
@toshvelaga 10 ай бұрын
Hey, this page might helpful has info on storage/RAM and limitations: studiolab.sagemaker.aws/faq
@PeterKallio
@PeterKallio 9 ай бұрын
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
@psmoguel
@psmoguel 9 ай бұрын
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
@toshvelaga
@toshvelaga 9 ай бұрын
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.
@snehasissengupta2773
@snehasissengupta2773 9 ай бұрын
How to restart the sd automatic 1111 webui 2nd time...after logout from sagemaker account....Can we done all this things again and again.....
@toshvelaga
@toshvelaga 9 ай бұрын
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
@snehasissengupta2773
@snehasissengupta2773 9 ай бұрын
Thanks a lot
@Adrian-mt2fr
@Adrian-mt2fr 7 ай бұрын
hey nice tutorial but can this be done on Sagemaker Studio Classic? like run Automatic1111 in a notebook
@toshvelaga
@toshvelaga 7 ай бұрын
I believe so as long as there is a GPU. A GPU is all you need, it can be any type of notebook
@qualeaarte889
@qualeaarte889 9 ай бұрын
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."
@toshvelaga
@toshvelaga 9 ай бұрын
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
@qualeaarte889
@qualeaarte889 9 ай бұрын
@@toshvelaga Its working! After many attempts, it's working now! Thanks so much!
@toshvelaga
@toshvelaga 9 ай бұрын
Awesome! Glad you got a GPU :)
@Nekotico
@Nekotico 8 ай бұрын
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
@sidheart8905
@sidheart8905 8 ай бұрын
but space is very less so delete the photos and unused models.. regularly
@Nekotico
@Nekotico 8 ай бұрын
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
@bgmipubg2941
@bgmipubg2941 9 ай бұрын
Bro how to add roop extension (face swap
@toshvelaga
@toshvelaga 9 ай бұрын
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
@PeterKallio
@PeterKallio 10 ай бұрын
🎯 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
@afrosymphony8207
@afrosymphony8207 3 ай бұрын
does this still work???
@okamisaiai5459
@okamisaiai5459 8 ай бұрын
Do you know a way to add Loras?
@mlaofmd1145
@mlaofmd1145 7 ай бұрын
Same how like adding models, but in Lora folder
@AfterDinnerCafe-ld4tb
@AfterDinnerCafe-ld4tb 6 ай бұрын
GPU There is no runtime available right now. Please change the compute type or try again later. :(
@toshvelaga
@toshvelaga 6 ай бұрын
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 😅
@AfterDinnerCafe-ld4tb
@AfterDinnerCafe-ld4tb 6 ай бұрын
@@toshvelaga so.. can I run webui on AWS free tier? free tier supports GPU??
@toshvelaga
@toshvelaga 6 ай бұрын
yup, it should be free and you can connect with a GPU using sagemaker studio@@AfterDinnerCafe-ld4tb
@roycedacosta2433
@roycedacosta2433 8 ай бұрын
can I use same steps if I want to use fooocus UI?
@toshvelaga
@toshvelaga 7 ай бұрын
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
@roycedacosta2433
@roycedacosta2433 7 ай бұрын
@@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
@gianluca-aries
@gianluca-aries 4 ай бұрын
ngrok is no longer free. Could you explain how to do it with a similar free service like zrok? thank you
@toshvelaga
@toshvelaga 4 ай бұрын
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 :)
@gianluca-aries
@gianluca-aries 4 ай бұрын
@@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 (:
@toshvelaga
@toshvelaga 4 ай бұрын
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
@Ron711711
@Ron711711 6 ай бұрын
thank you can you make a video for kaggle
@toshvelaga
@toshvelaga 6 ай бұрын
Sure, I can look into it. Haven't actually used Kaggle before but will take a look
@kcac.chilibun
@kcac.chilibun 4 ай бұрын
This doesn’t work anymore
@Messi-ny7ub
@Messi-ny7ub 9 ай бұрын
Do you know how to fix "torch unable to use gpu" ?
@toshvelaga
@toshvelaga 9 ай бұрын
You are on the GPU runtime right?
@Messi-ny7ub
@Messi-ny7ub 9 ай бұрын
@@toshvelaga yup
@toshvelaga
@toshvelaga 9 ай бұрын
@@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
@Messi-ny7ub
@Messi-ny7ub 9 ай бұрын
@@toshvelaga thx
@user-wb4pm6bp5l
@user-wb4pm6bp5l 9 ай бұрын
make a Rvc sagemaker notebook
@toshvelaga
@toshvelaga 9 ай бұрын
Actually good idea, I've seen a Google Collab notebook floating around. But will do.
@dbmmf1770
@dbmmf1770 3 ай бұрын
You may want to mention that you need a credit card
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 12 МЛН
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 15 МЛН
What it feels like cleaning up after a toddler.
00:40
Daniel LaBelle
Рет қаралды 89 МЛН
Run Stable Diffusion as an API on AWS SageMaker
10:36
Tosh Velaga
Рет қаралды 3,7 М.
Run Stable Diffusion with GPUs for cheap on vast.ai
21:22
Simon Moisselin
Рет қаралды 14 М.
How to run Stable Diffusion on Cloud GPU for Cheap!
13:03
Kazi Ahmed
Рет қаралды 5 М.
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 12 МЛН
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 6 МЛН
📱магазин техники в 2014 vs 2024
0:41
djetics
Рет қаралды 594 М.
Что делать если в телефон попала вода?
0:17
Лена Тропоцел
Рет қаралды 3,3 МЛН