Running Automatic1111 Stable Diffusion Web UI on a GPU for Free

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 95

  • @PeterKallio
    @PeterKallio Рік тому +8

    🎯 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

  • @OslaFe
    @OslaFe Рік тому +5

    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  Рік тому

      Awesome, so glad you found it helpful :)

  • @andreasyonathan392
    @andreasyonathan392 6 місяців тому +3

    can't open file '/home/studio-lab-user/launch.py': [Errno 2] No such file or directory. anything missing?

  • @nickfrets7437
    @nickfrets7437 4 місяці тому

    Thank you for the well explained video.

  • @gianluca-aries
    @gianluca-aries 7 місяців тому +1

    ngrok is no longer free. Could you explain how to do it with a similar free service like zrok? thank you

    • @toshvelaga
      @toshvelaga  7 місяців тому +1

      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 7 місяців тому +1

      @@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  7 місяців тому +1

      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

  • @DiegoParma
    @DiegoParma 7 місяців тому +2

    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?

  • @madushandissanayake96
    @madushandissanayake96 Рік тому +3

    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  Рік тому +3

      They probably won't ban SD because they have limits in place such as the 4 hour GPU limit per day.

  • @truymenh7728
    @truymenh7728 5 місяців тому +2

    Hey, have you found any alternative to Ngrok? It frequently ran out of request limit lately and requires us to upgrade plan.

  • @TB0Y298
    @TB0Y298 7 місяців тому +2

    I get the error TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' after launching, what should I do?

    • @jasonauyong4450
      @jasonauyong4450 7 місяців тому +1

      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...

  • @simongus
    @simongus Рік тому +2

    Great video, thanks! Can you make another video to explain how to install extensions? Thanks!

    • @toshvelaga
      @toshvelaga  Рік тому +1

      Sure it's definitely something I can look into :)

  • @KanisGAILerning
    @KanisGAILerning 11 місяців тому +1

    Thanks bro wok like a charm

  • @nefasto9355
    @nefasto9355 7 місяців тому +2

    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 7 місяців тому +4

      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 9 місяців тому

    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 9 місяців тому +1

      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  8 місяців тому

      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 8 місяців тому +2

      @@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 4 місяці тому

      ​@@rishabhsingh1406 Hi. I've been getting the same error. Think you can explain the steps to work around it in laymen terms?

  • @elijahauger
    @elijahauger 5 місяців тому

    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 10 місяців тому +2

    How do we turn it back on after closing it?

  • @hameedbarakat4777
    @hameedbarakat4777 3 місяці тому

    is it possible to add the controlnet extension as well because i can't seem to get it to work

  • @hebatullahhesham4522
    @hebatullahhesham4522 3 місяці тому +1

    How to make the same process with SadTalker?

  • @raihanuddin6949
    @raihanuddin6949 11 місяців тому +4

    How relaunch it when i Close sagamaker?

    • @NOPEFallacy
      @NOPEFallacy 4 місяці тому

      have you got any solution??

  • @nefasto9355
    @nefasto9355 10 місяців тому +1

    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  10 місяців тому +1

      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

  • @Nekotico
    @Nekotico 11 місяців тому +1

    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 10 місяців тому

      but space is very less so delete the photos and unused models.. regularly

    • @Nekotico
      @Nekotico 10 місяців тому

      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

  • @qualeaarte889
    @qualeaarte889 Рік тому +1

    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  Рік тому +1

      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 Рік тому

      @@toshvelaga Its working! After many attempts, it's working now! Thanks so much!

    • @toshvelaga
      @toshvelaga  Рік тому +1

      Awesome! Glad you got a GPU :)

  • @snehasissengupta2773
    @snehasissengupta2773 Рік тому +2

    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  Рік тому

      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 Рік тому +1

      Thanks a lot

  • @AfterDinnerCafe-ld4tb
    @AfterDinnerCafe-ld4tb 9 місяців тому +1

    GPU There is no runtime available right now. Please change the compute type or try again later. :(

    • @toshvelaga
      @toshvelaga  9 місяців тому

      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 9 місяців тому +1

      @@toshvelaga so.. can I run webui on AWS free tier? free tier supports GPU??

    • @toshvelaga
      @toshvelaga  9 місяців тому

      yup, it should be free and you can connect with a GPU using sagemaker studio@@AfterDinnerCafe-ld4tb

  • @psmoguel
    @psmoguel Рік тому +2

    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  Рік тому

      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.

  • @geooogle
    @geooogle Рік тому +1

    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  Рік тому +1

      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 Рік тому

      Awesome well I am looking forward to that!

    • @geooogle
      @geooogle Рік тому +1

      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 6 місяців тому

      ​@@toshvelagawhere we found your API related video?

  • @nelsonaruobebh3020
    @nelsonaruobebh3020 Рік тому +1

    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  Рік тому +1

      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 Рік тому +1

      Cool. Then how do I run it?

    • @nelsonaruobebh3020
      @nelsonaruobebh3020 Рік тому +1

      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  Рік тому +3

      @@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 4 місяці тому +1

      ​@@toshvelagathanks 🖤

  • @soitk1825
    @soitk1825 10 місяців тому +1

    I am gettin error like Model not found something

  • @PeterKallio
    @PeterKallio Рік тому +1

    How much is the Vram for the free tier? What's your overall UX? Max storage?

    • @toshvelaga
      @toshvelaga  Рік тому +1

      Hey, this page might helpful has info on storage/RAM and limitations: studiolab.sagemaker.aws/faq

    • @PeterKallio
      @PeterKallio Рік тому

      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

  • @Adrian-mt2fr
    @Adrian-mt2fr 10 місяців тому

    hey nice tutorial but can this be done on Sagemaker Studio Classic? like run Automatic1111 in a notebook

    • @toshvelaga
      @toshvelaga  10 місяців тому

      I believe so as long as there is a GPU. A GPU is all you need, it can be any type of notebook

  • @kcac.chilibun
    @kcac.chilibun 7 місяців тому +1

    This doesn’t work anymore

  • @oliverli9630
    @oliverli9630 10 місяців тому

    awesome!!

  • @Ron711711
    @Ron711711 9 місяців тому +1

    thank you can you make a video for kaggle

    • @toshvelaga
      @toshvelaga  9 місяців тому

      Sure, I can look into it. Haven't actually used Kaggle before but will take a look

  • @Sounds-Books
    @Sounds-Books 10 місяців тому

    hello thanks for the video.
    how to add styles on this version ?

  • @bgmipubg2941
    @bgmipubg2941 Рік тому +1

    Bro how to add roop extension (face swap

    • @toshvelaga
      @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

  • @Faded_Fragger
    @Faded_Fragger 8 місяців тому

    what about controlnet?

  • @afrosymphony8207
    @afrosymphony8207 6 місяців тому

    does this still work???

  • @dbmmf1770
    @dbmmf1770 5 місяців тому

    You may want to mention that you need a credit card

  • @roycedacosta2433
    @roycedacosta2433 10 місяців тому

    can I use same steps if I want to use fooocus UI?

    • @toshvelaga
      @toshvelaga  10 місяців тому

      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 10 місяців тому

      @@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

  • @okamisaiai5459
    @okamisaiai5459 10 місяців тому

    Do you know a way to add Loras?

    • @mlaofmd1145
      @mlaofmd1145 10 місяців тому

      Same how like adding models, but in Lora folder

  • @SlimJim-z5q
    @SlimJim-z5q 11 місяців тому

    do extensions work?

  • @Messi-ny7ub
    @Messi-ny7ub 11 місяців тому

    Do you know how to fix "torch unable to use gpu" ?

    • @toshvelaga
      @toshvelaga  11 місяців тому

      You are on the GPU runtime right?

    • @Messi-ny7ub
      @Messi-ny7ub 11 місяців тому

      @@toshvelaga yup

    • @toshvelaga
      @toshvelaga  11 місяців тому

      @@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 11 місяців тому

      @@toshvelaga thx

  • @user-wb4pm6bp5l
    @user-wb4pm6bp5l Рік тому +1

    make a Rvc sagemaker notebook

    • @toshvelaga
      @toshvelaga  Рік тому

      Actually good idea, I've seen a Google Collab notebook floating around. But will do.