Run Stable Diffusion 2.0 Locally & Create AI Art

Поделиться
HTML-код
  • Опубликовано: 22 май 2024
  • In this video I show how you can easily install and run Stable Diffusion 2.0 on your local machine using huggingface pipelines. It's almost too easy!
    Timeline:
    00:00 Intro
    01:04 Install
    03:00 Results
    Follow me on twitch for live coding streams: / medallionstallion_
    My other videos:
    Speed Up Your Pandas Code: • Make Your Pandas Code ...
    Speed up Pandas Code: • Make Your Pandas Code ...
    Intro to Pandas video: • A Gentle Introduction ...
    Exploratory Data Analysis Video: • Exploratory Data Analy...
    Working with Audio data in Python: • Audio Data Processing ...
    Efficient Pandas Dataframes: • Speed Up Your Pandas D...
    * RUclips: youtube.com/@robmulla?sub_con...
    * Discord: / discord
    * Twitch: / medallionstallion_
    * Twitter: / rob_mulla
    * Kaggle: www.kaggle.com/robikscube
    #stablediffusion #python #aiart
  • НаукаНаука

Комментарии • 50

  • @tywenkelly
    @tywenkelly Год назад +5

    For those running locally like I was running on WSL2 Ubuntu: I had to put `torch.cuda.empty_cache()` at the top of my file, after `import torch`, because my GPU memory was not being flushed after each run and I was getting a "torch.cuda.OutOfMemoryError: CUDA out of memory" error.

    • @robmulla
      @robmulla  Год назад

      Pinned! Thanks for confirming you got it working on windows!

    • @tywenkelly
      @tywenkelly Год назад

      @@robmulla Yup! Another thing I ran into with WSL2 was memory fragmentation. I had to set environmental variable with this command to fix it (on GTX3070 8GB): export 'PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512'

  • @henkhbit5748
    @henkhbit5748 Год назад +2

    Thanks for sharing the installation process for stable diffusion2. 👍

    • @robmulla
      @robmulla  Год назад +1

      Thanks for watching Henk!

  • @athithyabalasubramani1045
    @athithyabalasubramani1045 Год назад +1

    I tried it , its working and it some its really cool

  • @ltomczak
    @ltomczak Год назад +2

    Rob, I've read negative prompts are actually very important for StabilityAIs stable diffusion 2.0. How could we implement negative prompts in this example?

    • @robmulla
      @robmulla  Год назад

      That's a good point. Maybe "yellow dog without two tounges" :)

  • @adenrajput8531
    @adenrajput8531 Год назад +2

    Hey Rob, when the kaggle notebook is keep crashing, what should we do? I'm submitting my notebook there for a competition but either it is taking too long to load or just crash.
    Few hours are left.
    Please guide.

    • @robmulla
      @robmulla  Год назад

      I need a little more info to help. Not sure what you are attempting to do. Usually kaggle provides an error message when it crashes. Always check to make sure you're not maxing out the memory use, disk space, or CPU/GPU.

    • @adenrajput8531
      @adenrajput8531 Год назад

      Thank you 🙂

  • @arbeitslos4247
    @arbeitslos4247 7 месяцев назад +1

    Very interesting to look back at this video after only a few months. It’s like a difference between pre WW2 photography and 20XX when compared to SD pictures today.

  • @polygrind
    @polygrind Год назад +1

    Hi, is the terminal you are using CMD? Because mine doesn't look like that, cheers

    • @Kim-re7hs
      @Kim-re7hs Год назад +1

      TMUX

    • @robmulla
      @robmulla  Год назад +1

      Hey Davide - I'm running ubuntu, it depends on the OS your running on. If you want to learn more about my setup you can check out this video: ruclips.net/video/TdbeymTcYYE/видео.html

    • @robmulla
      @robmulla  Год назад +1

      tmux ++++++ 😉

    • @polygrind
      @polygrind Год назад +1

      @@robmulla Thank you, well, it appears that it is ubuntu, since this is my main machine and I use it for work I will have to wait for a windows 10 tutorial. Thanks

    • @robmulla
      @robmulla  Год назад +1

      @@polygrind it looks like some other people in the comments here have gotten this working in windows 10 using WSL and a few modifications.

  • @nhathao7468
    @nhathao7468 Год назад +1

    Hm , they public weight of stable diffusion model, can u build again model from layer and transfer in custom data image generate?

    • @robmulla
      @robmulla  Год назад

      Finetuning stable diffusion 2.0 is really popular right now. Huggingface is hosting a bunch of public finetuned models you can test out.

  • @yanex4631
    @yanex4631 Год назад

    please sir, how do you run it on google colab and is it possible with our own images, please make a tutorial because I don't have a high GPU spec to run stable diffusion, and some people don't have enough GPU🙏🤧

  • @xeoncat
    @xeoncat Год назад +1

    How do you get that UI, when I activate stable-diffusion2 nothing happens

    • @robmulla
      @robmulla  Год назад

      You first need to create a conda environment if you want to do it like I am in the video. Check out my video on my setup to learn how I organize conda environments.

  • @crabbypaddy5549
    @crabbypaddy5549 Год назад +1

    When I START the local install and click the .bat it does not load properly. It ask me to update pip....when I successfully do, it still insist of update... what am I doing wrong? I cant start the stable diffusion.

    • @robmulla
      @robmulla  Год назад +2

      Hey Crabby Paddy. What system are you running on? If it's windows you should try using WSL2, I've heard others have had success that way. You shouldn't need to click a .bat file. Also you could try to run it in the cloud using kaggle like here: www.kaggle.com/code/josecarmona/stable-diffusion-v2-test

    • @crabbypaddy5549
      @crabbypaddy5549 Год назад

      @@robmulla Im running windows 10 pro, nvidia 3090, 98gb ram, ryzen 9 - 5950x. I'm baffled that I cant get past the pip update issue.

    • @crabbypaddy5549
      @crabbypaddy5549 Год назад

      @@robmulla and also thank you.....I will try your suggestions

  • @mohammadharoon9969
    @mohammadharoon9969 Год назад

    how i can run it in windows 10

  • @palgun.
    @palgun. Год назад +1

    Not able import EulerDiscreteScheduler can anyone help in windows

    • @robmulla
      @robmulla  Год назад +1

      Sorry I don’t use windows but are you using WSL2? I hope you were able to figure it out.

  • @alexandergarzo9415
    @alexandergarzo9415 Год назад +1

    does this works in colab?

    • @robmulla
      @robmulla  Год назад +1

      I believe so though I haven't tried it. There are people who were able to run it in a Kaggle notebook.

    • @pw7225
      @pw7225 Год назад +1

      It may happen that RAM/VRAM is too small for the free tier. But I was able to finetune Stable Diffusion V2.0 with the paid colab.

    • @zoumanakeita8016
      @zoumanakeita8016 Год назад

      Haha, this is funny, I have made a tutorial explaining how to use Stablediffusion 2.1 on Google Colab
      Here is the link to the video:
      ruclips.net/video/gyfItUVwCP8/видео.html

    • @ltomczak
      @ltomczak Год назад

      It works - I just tried it

  • @robmulla
    @robmulla  Год назад +2

    Just now realizing the dog 4:07 has two tounges! 😂

    • @rsmith31416
      @rsmith31416 Год назад

      Interesting video. I was going to point out that after you said "The only thing I'm noticing..." . By the way, "Euler" is pronounced /ˈɔɪlər/ :)

    • @crabbypaddy5549
      @crabbypaddy5549 Год назад

      Snakedog.

  • @Beauty.and.FashionPhotographer
    @Beauty.and.FashionPhotographer Год назад +1

    Newbie installation Video for Mac would be great.... this is way beyond my IQ

    • @robmulla
      @robmulla  Год назад

      Thanks for watching! I'm not sure if this will work on a mac because it requires cuda which only runs on nvidia gpus. There are a few free options though like running in a kaggle notebook or colab.

    • @Beauty.and.FashionPhotographer
      @Beauty.and.FashionPhotographer Год назад +2

      @@robmulla Phyton seems to be suggested for macs... If You know macs, a video Tutorial would undoubtfully have more viewers than a windows tutorial, considering that artists pretty much exclusively use macs to create works.. and there is no one out there who has done a mac tutorial on Diffusion V2 yet

  • @srinivasgorur-shandilya1788
    @srinivasgorur-shandilya1788 Год назад +1

    It’s pronounced “oy-ler”

    • @robmulla
      @robmulla  Год назад

      Oops! Thanks for the correction.

  • @zoumanakeita8016
    @zoumanakeita8016 Год назад +1

    Haha, this is funny, I have made a tutorial explaining how to use Stablediffusion 2.1 on Google Colab
    Here is the link to the video:
    ruclips.net/video/gyfItUVwCP8/видео.html

  • @JuventinoDOC33
    @JuventinoDOC33 5 месяцев назад

    Too complicated for me, because I believe that you need to know a certain terminology to understand this video. After 1 minute you start to write something, but don´t tell us WHAT program you use for this. So there you allready lost me. But thanks for trying ;)

  • @deepcontractor6968
    @deepcontractor6968 Год назад +1

    Hey Rob, do you have a discord?

    • @robmulla
      @robmulla  Год назад +2

      Yes. Join here: discord.gg/HZszek7DQc