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 - Наука
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.
Pinned! Thanks for confirming you got it working on windows!
@@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'
Thanks for sharing the installation process for stable diffusion2. 👍
Thanks for watching Henk!
I tried it , its working and it some its really cool
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?
That's a good point. Maybe "yellow dog without two tounges" :)
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.
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.
Thank you 🙂
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.
Hi, is the terminal you are using CMD? Because mine doesn't look like that, cheers
TMUX
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
tmux ++++++ 😉
@@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
@@polygrind it looks like some other people in the comments here have gotten this working in windows 10 using WSL and a few modifications.
Hm , they public weight of stable diffusion model, can u build again model from layer and transfer in custom data image generate?
Finetuning stable diffusion 2.0 is really popular right now. Huggingface is hosting a bunch of public finetuned models you can test out.
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🙏🤧
How do you get that UI, when I activate stable-diffusion2 nothing happens
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.
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.
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
@@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.
@@robmulla and also thank you.....I will try your suggestions
how i can run it in windows 10
Not able import EulerDiscreteScheduler can anyone help in windows
Sorry I don’t use windows but are you using WSL2? I hope you were able to figure it out.
does this works in colab?
I believe so though I haven't tried it. There are people who were able to run it in a Kaggle notebook.
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.
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
It works - I just tried it
Just now realizing the dog 4:07 has two tounges! 😂
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/ :)
Snakedog.
Newbie installation Video for Mac would be great.... this is way beyond my IQ
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.
@@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
It’s pronounced “oy-ler”
Oops! Thanks for the correction.
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
Nice work Zoumana.
@@robmulla thanks!
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 ;)
Hey Rob, do you have a discord?
Yes. Join here: discord.gg/HZszek7DQc