How to Install & Use Stable Diffusion on Windows
Vložit
- čas přidán 11. 05. 2024
- In this step-by-step tutorial, learn how to download and run Stable Diffusion to generate images from text descriptions.
📚 RESOURCES
- Stable Diffusion web demo: huggingface.co/spaces/stabili...
- Install Git: git-scm.com/download/win
- Install Python: www.python.org/downloads/rele...
- Stable Diffusion WebUI GitHub page: github.com/AUTOMATIC1111/stab...
- Command to download Stable Diffusion WebUI repository:
Git clone github.com/AUTOMATIC1111/stab...
- Download model / checkpoint: huggingface.co/runwayml/stabl...
- Overview of different models: stable-diffusion-art.com/models
- Command to update Stable Diffusion WebUI automatically:
Git pull
⌚ TIMESTAMPS
00:00 Introduction
00:42 Stable Diffusion on the web
01:07 System requirements
01:49 Install Git
02:26 Install Python
03:20 Install Stable Diffusion
04:59 Download model / checkpoint
06:37 Update Stable Diffusion
07:24 Launch Stable Diffusion
08:10 Overview of web interface
12:06 Wrap up
📺 RELATED VIDEOS
- Git and GitHub for Beginners Tutorial: • Git and GitHub Tutoria...
- Python for Beginners Tutorial: • 👩💻 Python for Beginne...
📩 NEWSLETTER
- Get the latest high-quality tutorial and tips and tricks videos emailed to your inbox each week: kevinstratvert.com/newsletter/
🔽 CONNECT WITH ME
- Official web site: www.kevinstratvert.com
- LinkedIn: / kevinstratvert
- Discord: bit.ly/KevinStratvertDiscord
- Twitter: / kevstrat
- Facebook: / kevin-stratvert-101912...
- TikTok: / kevinstratvert
- Instagram: / kevinstratvert
🎒 MY COURSES
- Go from Excel novice to data analysis ninja in just 2 hours: kevinstratvert.thinkific.com/
🙏 REQUEST VIDEOS
forms.gle/BDrTNUoxheEoMLGt5
🔔 SUBSCRIBE ON CZcams
czcams.com/users/kevlers?...
🙌 SUPPORT THE CHANNEL
- Hit the THANKS button in any video!
- Amazon affiliate link: amzn.to/3kCP2yz (Purchasing through this link gives me a small commission to support videos on this channel -- the price to you is the same)
#stratvert #stablediffusion #ai - Věda a technologie
Kevin is always my go-to guy for all tech knowledge that I need for the demands of my job. He provides a clear guide, breaks it down into simpler, understandable chunks, and is very straight forward and professional. Thank you, Kevin!
Great video. In case anyone runs into the same problem I had, when I launched the "webui-user.bat" file, it couldn't find python, even though I clicked the path box as stated in the video. Good news is that the fix is easy and simple. Just edit the .bat file the same way the video instructs you to add the git pull, but this time find the command line "set PYTHON=". After the =, put the path to your python.exe (wherever you installed it to). For example, "set PYTHON=C:\Users\MainUser\AppData\Local\Programs\Python\Python310\python.exe"
you are a saint! thank you for posting this
For me the 'set PYTHON' command was already there. So adding another command actually didnt work. But assigning the file path to the set PYTHON command that was there already worked. Thanks for the help
thanks
I have the same error but doing this does not work for me, it keeps telling me Couldn't launch python
@@JulDuk Same for me bro, could you fix it?
The best, most detailed, and no BS tutorial I've ever watched thanks Kevin for this video!
same here. well done
Right I was gonna comment the same thing, he explains why you get python and git and what they do, and actually explains things clearly and slowly.
yep
After 2 attempts of installing it, your made it simple and to the point. Thanks so much for the time you put into your tutorials! Gotta go play!
Thank you for the clear and concise explanations. I tried installing this before by myself and gave up with out video. Your video actually made it seem really simple, and thank you for explaining why you need each of the programs.
Dude, Kevin, what a great video. Super easy to follow, no needless nothing talk, helpful info and tips. Super awesome man, keep it up.
Awesome tutorial, went from not knowing anything to having it working in one sitting! Thanks for all the help
THANK YOU so much for the easiest and clearest step-by-step guide to installing this. I'm a novice myself, and following your steps made so much more sense than all the other videos and documents I found online.
If you are having trouble installing torch after launching the .bat file try deleting the venv folder in your stable diffusion webui folder and a new one should be generated after launching the webui-user bat file which will install a compatible version of torch.
thanks man
I am getting this error:
ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: none)
ERROR: No matching distribution found for torch==1.13.1+cu117
thanks homie
Ur amazing brother
You the man
😉
I can't believe how easy you just made this set-up! Thanks for your clear, easy-to-follow, step-by-step instructions. You skipped me ahead to the fun part! 🙂👍
Coming from outside the space this AI-art field seems extremely daunting. Thanks to you I can now try my hands at creating my first image. You are a hero.
Thank you so much for this! This is the best tutorial I've seen on getting stable diffusion running. I was so confused on what to do until I found your tutorial
5/5 clarity and thoroughness it's amazing how few quality how to videos on this site, well done
Wonderful precise step by step process with explanation. It was an adventure for me as I had to walk through it several times because of a python problem. It finally worked after i got rid of anaconda3, anaconda2, miniconda3, and their env variables.
I'm guessing I have the same problem... When executing the bat file, it won't run because it tells me python is not found. Sadly I need anaconda for my studies....
I've been trying to install for weeks. This is the first video that took step by step in an understandable way. Thank you.
Kevin - this is the best stable diffusion beginner's tutorial I've found. Incredible work and thank you for being so precise with your words and instructions.
The problem with many videos like this is that they're usually too focused. "ok i'm gonna show you how to do this with a very obscure git project". But you explained WHY we're using this fork, what this fork is, and explained every stop along the way. well done
what makes you think that this GIT project is obscure??
@@VitasLoWang it isn't. That's the point I'm making. I'm comparing this video to others
Super detailed explanation - made simple. Really interesting and thorough. Great job!
Kevin - thank you so much for the excellent explanation. Like a few people here I had a Python 310/311 issue with the path. I solved it by renaming the Python 310 app folder to 311 and referring to 311 in the BAT file (even though it was Python 310).
up! thank u this works
Thanks a bunch man. I'm generally computer savvy but I can tell this tutorial saved me a ton of time.
Sometimes I think Kevin is an AI
aren't we all?
We're all Turing machines
Why Its still not working even 3.10.6
Is my pc too old or something im on windows 10
@@the_proffesional1713 what gpu u using ? its not working on my gtx660 with 2gb vram
@@niloyck2540 your 2gb of vram is probably the problem.
This guy deserves credit no joke, I'm an IT engineer and still didn't know some of the useful keyboard shortcuts he uses so there's plenty of added benefit when watching his tutorials. Subscribed and highly recommend. Kevin, if you haven't already please make a tutorial for M1/2 Macs.
Welcome to IT, where you know all the things you need to know, but you can't keep up with all the damn shortcuts!
I never would've thought to use that command prompt shortcut in file explorer. This guy's a genius.
i am a cyber security students and my professor always discuss with his students about new things in cyber industry.
even tho you got a title and become a teacher, you always have to learn new things about it, its the fun part of this industry.
Kevin you are great,you just made this set-up easy like a breeze! Good work!!!
Professionally done. One of the best video tutorials I've every come across. BRAVO!
Long process, but well and clearly explained. Totally new product for me. The presentation made it quite interesting. For those that may complain about it being difficult to install i would say that it is not an application for everyone, like Word or PowerPoint. Thanks Kevin. Great video.
I would disagree. Having seen what it can do this kind of program is great for many people, especially creatives who are not always very tech savvy. Saying it's not for everyone is just trying to justify gate-keeping.
Lol bro it took me 20 minutes. Its not long at all.
@@majicMix911 My point exactly. Just follow the steps. But some seem to feel that it is too comlicated and long. They want everything automated.😂😂
No reason for ANY application to be difficult to install, it's MAYBE complicated now cause it's not really widespread, in a year or two it will be a one click thing, like every other piece of software.
I disagree with the statement that the installation process for the product is long. It could be made more efficient and user-friendly for a wider audience. Everyone should have access to use it easily, regardless of their technical skill level. It should not be considered an application only for advanced users.
Thanks for a great vid!!!
For all of you who asked about the -"Torch is not able to use GPU" .... what did the job for me was updating my nvidia driver - try it
its updated but still does not work. Any idea?
Probably the best tutorial video I've ever followed and I did follow quite a few. Thanks buddy.
thank you so much man. incredible tutorial. i am familiar with installing things on a pc but i know that there are some people out there that struggle with file placement and i know that even this is about as simple and great of a tutorial as there can be,
What a great tutorial! 👍Not just instructions, but also explanations.
I did have some errors. But it was all my faults, e.g. didn't ensure my old Python version having been removed.
Again, that's a super good video. Thanks for making such great effort to illustrate the process 👍👍👍
i got error. ill try to remove mine too
how to remove? can you help?
Ah, thanks for this. I couldn't figure out what was wrong, forgot I installed python ages ago for something else.
Very good instructions. Few things that didn't work: 1) using cmd "git clone" led to "permission denied", so I had to run cmd as admin. 2) double click on webui-user.bat didn't have any effect, so I had to run it via "git CMD". But it worked, thank you very much!
how did you run number 2 with git CMD can you explain a little?
@@krezen3588
I opened "git cmd" as administrator (this is a program you installed), drilled to the right directory (the inner one of stable) and then typed the name of the file (with bat extension)
@@michaell.9027 thank you for your help!
@@michaell.9027 I tried this but in both CMD and Git CMD (cd d/ X:\...) it gives an error:
======================================
Already up to date
Couldn't launch Python
exit code: 9009
stderr:
Python not found, run without arguments to install from Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases
======================================
I install both Git 64 bit & Python 3.10.7, and checked the Path box. Any idea why it won't launch Python?
Is it because it's on a different SSD on Dir X:\ rather than C:\ or D:\ ?
@@ElioRose Same Problem here... Any advice??
Great tutorial, love your teaching style, right to the point. Thank you!
I really like how you explain each part short and clear! I've followed another DS installation video before for my old PC but it didn't cover any explaination.
Hello there! Very good tutorial! I'm going to link it in my media for the people who ask me how to install my models :)
However, just a quick detail, there's no need to rename the downloaded model as 'model', actually that can lead to confusion of people thinking they have to rename any model, and if you use many models keeping original names helps you keep things organised.
I had errors. I had the python 3.10.6... But when i deleted venv it all took its place. Thank you for great installation tutorial.
Honestly amazing and very helpful. I'm a total newby regarding this stuff and this was a very clear step by step. Thank you so much.
So concise and helpful. Thank you!
Glad it was helpful!
@@KevinStratvert What is "a while" to complete? Seems to be stuck on "Model loaded in 121.4s (load weights from disk: 82.4s, create model: 4.6s, apply weights to model: 4.7s, apply half(): 3.6s, apply dtype to VAE: 0.2s, load VAE: 0.5s, move model to device: 13.1s, hijack: 0.3s, load textual inversion embeddings: 2.3s, calculate empty prompt: 9.6s)." and I am not seeing much use in CPU, GPU,. or disk.
Man, how is this even free. This is so clear and well explained. Companies don't make internal intruction videos half as good as this.
> Man, how is this even free.
dont give them ideas pls
delete this comment ASAP
I'm sure they already have had the idea since like at least 8 years ago@@UFR00lz
I learned more than "how to download and use SD". Very efficient and useful. Thank you
Wow. Thanks a lot for this very clear and very detailed step by step explanation. I liked and subscribed your channel right away! Hope I can find other useful tutorial on this.
Another good one, thanks Kevin!
I look in the comments.....and I find my great Maths teacher!!!! What a lovely coincidence.
Thank you so much! Love your content, very professional explanation and right to the point!
I didn't understand the hype reading the comments but now I see what it's all about. Thanks to your clear and concise tutorial I had it running in less than 10 minutes! Keep doing what you're doing!
Much needed video thanks
Awesomesauce 👏🏻👏🏻 very easy to follow.
Also if anyone is facing a Runtime error installing torch, delete the venv file which was downloaded for the wrong python version.
Thank you sir, you saved me!
man you saved me a lot of trouble, thanks
What the hell is venv file? I can't find it anywhere
@@saltysalt844 It’s suppose to be in the folder where you downloaded stable diffusion. However, if you can’t find it in yours, it might be caused by a different issue.
Man im getting this error again and again after deletion of venv folder too... help me how to solve this?
Thank you for the excellent setup video, its clear, simple and easy to follow
Thank you Kevin. Your clear step-by-step explanation is very helpful.
I'm not a complete moron as a PC user, but man, this shit's tricky to install, I searched everywhere but every tutorial lacked a few steps that got me stuck, I finally managed to install following your steps, thanks!
No it isnt. Read the github docs. Simple.
@@majicMix911 "Simple" Glad to see people still live in a bubble where their very own experience is the universal one. Stopped to consider he's dyslexic or something?
thx for the Video greatly appreciated. Is there any way to use your Instructions with the 2.1 ckpt files ?
Superb tutorial ; clear, precise and friendly. Thank you.
Man, it's a complicated tutorial but you make it so ez great job man I hope you do a more In dept video like this.
Kevin, you did an outstanding job, demonstrating the installation processes, and all of its dependencies -- as well as how to, then, create your images and the options to do so.
But there is a big "However" (and no fault of yours).
Few people are going to go through that installation process.
I know no friends or family members that would be able to accomplish that tortured installation process. They would not even try.
The only people I know that could do so are at my employer's IT department, that do network engineering, system administration, tech support services, etc.
Imagine if you had to do that type of installation for Adobe's Photoshop, or Microsoft's Excel?
The people that wrote the code for those Python scripts are both brilliant, as well as lacking in other intellectual matters.
To them, this process is child's play. And so they roll it out, as it is, expecting the general public to make it work.
Until someone creates an executable that downloads all required packages, and installs all of those packages, this will not become wildly used.
Yes, we will see lots of output/images from this process. But it will be coming from a tiny percentage of people that got it to work.
Your next door neighbor, who uses his computer every day, will not get this to work, even with your well produced video tutorial.
I would like to see a dozen random, intelligent, people in a room (doctors, pilots, chefs, lawyers, carpenters, etc) all sit down and be asked to get this working on a computer that is provided for them.
This comment emphasizes what I wanted to say as well
Agreed! It's overly complex now. Over time though, it'll become easier and easier to use and access. Canva recently integrated text-to-image into their product and it's coming soon to Microsoft's Designer. You don't get as much control, but it'll open up the functionality to the masses. I'm sure you'll also eventually see it as a standard feature in apps like Word and PowerPoint.
he didnt show how common errors you will find in the process, python errors, etc. What he did is so simple and takes no time, the problems are the errors that most people will find, and no way to solve.
I'm a lawyer and got to install this, but I can see my peers struggling to follow these steps if they want to use the program
@@MrDvneil exactly, i'm getting errors in python.. dont know what to do.
Thanks for accepting my request and talking about ai arts. Love your videos ❤
Thanks for the hard work on putting this together! One thing. None of the URLs will be copy-pasteable because of YT "needing" to screw them all up. You'll probably need to just right-click them and open in a new tab/window and copy them that way.
Thank you so much, really helpful and easy to follow video. Honestly you got me into AI and this will change my life so thank you again. Only negative I would say which isn't huge is just get all downloads at the start so you don't have to wait when following the tutorial but other than that absolutely perfect.
Perfect timimg, was looking for a guide on it this week 👍 3090 space heater mode engaged 😁
I had a problem at 7:43 in the video where i waited very long and nothing happened (i checked my D and C drive data transfer on the task manager, but there was no data transfer). So the hint i can give you is to restart your computer after installing everything before doing the cmd thing at 7:43. Now it worked for me. And i set the name of the data "webui-user" to "webui-user.bat" because in my folder the name of the data was "webui-user". I hope this helps someone with the same problem.
Youre a fucking saint god bless you, stranger
I have the same problem, that step takes forever, with no progress. I restarted my pc, and the file is indeed called "webui-user.bat''. But I am still stuck...
Thanks man, it worked!!
Nice video mate- while it was 'exhaustive' in a sense, it was also weirdly concise and you didn't blather on too much. You did stick to a very specific way of doing it but it makes sense given your target audience is intended to be as wide as physically possible.
Why can't everyone clearly explain things like this? best video ever.
Kevin, always like your presentation knowledge base. Just installed Stable Diffusion and ran into a glitch. Installed the model but it failed not finding a torch 2.0.1. Wondering if my python might be a later version than 3.10.6?
Wow I've gotten to a video that's recent! This really worked and I've got it going and love it. Is there a way to set it up or figure it out so it can upscale images too? I see there might be settings for it, but I don't wanna mess nothing up by changing too much if I don't understand.
I'm pretty computer illiterate and this seemed like a really daunting endeavor. However, it worked the first time through for me. Thank you for the video!!
Grateful for this video. Not only did it really dumb down (lol) Stable Diffusion installation, I now understand how the hell I am supposed to download anything on Git Hub. I have wanted to download things from there before but I'd open the window, see a bunch of random files with extensions I am not even familiar with, and I'd say nevermind and close it. lol. I am going to watch your other videos on it. Much appreciated!
I've been trying to get stable diffusion over the past few days. I keep running into an issue that doesn't allow me to download torch. I'm not sure if I messed with the code so that it doesn't work or if the torch download folder changed locations, preventing the previous path from working. I'm not sure what I'm doing wrong here.
~~~
Edit: I figured it out. I had the current version of Python, but it needed to be the 3.10.6 version. In order for the program to work, I also needed to redownload the stable diffusion folder so the system wouldn't check for the current version.
I still don't know how to update to the 2.0 or 2.1 version of stable diffusion without causing crashes, but I'll figure it out by the time the next version comes out.
If you have an error with "torch==1.13.1+cu117 ", it's because you downloaded a "too recent" version of python. Follow these steps :
-Delete the "venv" folder in stable diffusion
-Uninstall python
-Install python 3.10.6
Yes I was just about to post this too. Downgraded python from 3.11+ to 3.10.6 fixed it for me :)
unfortunately did not work ERROR: Could not find a version that satisfies the requirement torch==1.13.1+cu117 (from versions: none)
ERROR: No matching distribution found for torch==1.13.1+cu117
@@bluecobaltbackup woops, I forgot to mention that you have to uninstall python. It seems that stable diffusion auto chooses the latest version of python. Try again with these steps
@@supermariosupermayhem ah i figured it out! my PC had python 3.8 downloaded and was automatically using that instead of 3.10.6
i couldn't find the venc folder where is it
Thank you so much for such detailed explanation - happy I found your channel! Moving onto python now!
Thanks so much for making such a clear tutorial, I got set up in no time.
Would you consider making an alternative version of this tutorial for owners of AMD Radeon video cards ? thanks!
Nice video! I am seeing many videos on version 1111. Is this just a different UI, or is something better in the code ?
Automatic1111 includes a nice UX and also contains performance optimizations for consumer grade hardware. Base Stable Diffusion is all command line and runs into performance issues.
THANK YOU SOOOO MUCH, I had to reinstall it due to issues and your guide is so much easier than the others.
bro you are a great teacher, thank you for explaining step by step.
im so lucky to find you with a guide i need
If you can't find the .bat file there is pretty good chance you have not check the file name extension in the view option
Thank you! You are right, I couldn't find it at all :( Where should I change these settings and run a model again? Sorry for asking, I wish to be as smart as you guys! Will appreciate any help. Thanks to Kevin that even people like me can at least try their chances here!
LEGENED
I had error message :[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: C:\Stable diffusion\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip. if you have the same issue open a CMD in the C:\Stable diffusion\stable-diffusion-webui\venv\Scripts then type python.exe -m pip install --upgrade pip
Thank you for this 👍
My dude, I have been struggling with stable diffusion and this video helped so much. Thank you, thank you, thank you!
One of the best and most clear tutorials ever!!
I get some error with something called "torch" anyone else?
What the hell is wrong with one simple exe file.
?
@@PopStoryai?
@@oldgold8247 ?
real.
Great instructions, easy to follow. Thank you.
Fantastic, thank you. Whatever your field of expertise is, you're also an expert at teaching. Slick work.
Hello, please I need your help, I tried to install 3 versions of stable diffusion 1.4, 1.5, and 2.0 and yet I have the same error message ( Stable diffusion model failed to load, exiting ). Thank you in advance for your help.
00:00 Learn how to install and use Stable Diffusion for AI-generated images
01:49 Two pre-requisites required for Stable Diffusion installation
03:24 Install Stable Diffusion and WebUI for easy interaction.
05:03 Download the base model for Stable Diffusion.
06:35 Install and launch Stable Diffusion
08:02 Using Stable Diffusion to generate photorealistic images from text prompts
09:33 Adjust parameters for Stable Diffusion image generation
10:59 Stable Diffusion generates different images for each prompt
Crafted by Merlin AI.
i subscribed immediately. he explained everything so on point. this is how you do a tutorial video.
Not sure if you forgot to mention this in the video or not but does this tutorial cover how to install this for non NVIDIA GPU users? Is there anyway to get SD running natively with an AMD GPU or are we stuck with long wait times using the CPU? Could you do a tutorial on this if thats the case? I appreciate your help.
up
up
up
Simple and clean, you sir deserve a like and a subscribe!
I'm running a desktop 3080, but out of curiosity since you only mentioned NVIDIA at 1:20, would someone running an AMD Radeon discrete GPU be able to use stable diffusion?
up !!!
On the 7:33 min, I got the "exit code: 3" , launch unsuccessful. Exiting
How can I fix this ? :/ thanks for the help !
i need help 2 :(
me2 :')
same here.
Holy shoot I am totally code illiterate and this is helping so much. I even had to troubleshoot twice in this process because a problem occurred and two other sites really solved it! Thank you. I'm currently waiting for the dependencies to all install but i will share my progress later.
Wow. Really thorough. Lots of information in such a small amount of time. My A.D.D. brain is a BIG fan. Thank you!!!
I tried to follow the video, which was very detailed, however, when I started stable diffusion I got an error about creating torch. Any suggestions. I put the stable diffusion on and external SDD.
same problem
Make sure you install Python 3.10.6
The link is in his description. Also you have to uninstall newer versions of python before you use the "git clone" function.
Hope this helps
raise RuntimeError("Cannot add middleware after an application has started"_
RuntimeError: Cannot add middleware after an application has started.
Local URL: wont launch. Pls help
Great video. Clear instructions and explanations
FINALLY someone who gives a full explanation rather than "fkn figure it out yourself". THANK YOU.
Kevin make tutorials looks easy like a teacher giving tasks to children in elementary.
Oh, absolutely! Because clearly, everyone wants to feel like they're back in elementary school being talked down to. Kevin's tutorials are just the perfect level of condescending and simplistic. Keep it up Kevin!
How to fix: Torch is not able to use GPU!
I have python 3.10.6 so python isn't the problem
Anyone knows how to fix this?
I tried this and got further webui-user.bat file and under the arguments type "--skip-torch-cuda-test"....but then got Warning: caught exception 'Found no NVIDIA driver on your system. Basically think the video fails to stress this won't work on AMD!
thanks for this , saved me the headache of trying to get it working on my own . plz make follow ups for more ways to uses and different models and so on
Very well instructed video to install stable diffusion, Thank you so much!
Great video, but I am getting 2 errors that are preventing me from continuing.
1. Fatal error about dubious ownership in repository.
2. The "Python was not found" error. I have tried re-installing the version in the video multiple times.
Make sure you install it on the C Drive?
I'm constantly getting this error: Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "C:\Program Files\Python310\Lib\encodings\__init__.py", line 85, in search_function
I tried everything I could, including editing the path variables in environment variable settings and reinstalling several times(always making sure to check 'install to path'). I feel like this is a very simple error with a simple solution, but I can't seem to figure anything out. Can anyone help me?
Edit: Nevermind, got it to work after reinstalling SD using git bash(idk why this made a difference) and adding git to the path along with python
one of the best explanation i have ever came across, great work
Thanks so much for this your the Best youtube tutorial guy I have seen in a while