How to Install & Use Stable Diffusion on Windows in 2024 (Easy Way)
Summary
TLDRThe video script provides a step-by-step guide on installing and using stable diffusion models through Comfy UI, an easier alternative to the traditional Python method. It covers the installation of Comfy UI, downloading and placement of necessary files, and generating images using the stable diffusion model. The script also introduces additional features like custom nodes and higher quality models available on Civit AI, emphasizing the ease of use and powerful capabilities of the system.
Takeaways
- 🔧 Installation of Comfy UI is recommended for easier setup compared to Python, making Stable Diffusion accessible to users with lower technical knowledge.
- 💻 Comfy UI can be found by searching its name on Google, and the first link provides a direct download link.
- 📂 After downloading, extract the ZIP file and move the folder to a suitable location, such as 'AI' in the Documents folder for better organization.
- 🖥️ Users should choose the appropriate 'run' file based on their hardware, either 'run CPU' or 'run Nvidia GPU', with the latter requiring at least 8 GB of VRAM.
- 🔄 To check VRAM, users can use the 'DXDiag' tool on Windows by typing 'dxdiag' in the Run dialog box and looking at the display information.
- 🔗 The video provides a link to download Comfy UI on Mac, which is slightly different but still functional.
- 📦 Downloading the necessary Stable Diffusion models, including the base and refiner models, is crucial for image generation, with file sizes ranging from 6 GB to 30 minutes depending on internet speed.
- 🗂️ The downloaded models need to be placed in the 'checkpoints' folder within the Comfy UI directory for proper functionality.
- 🎨 Image generation involves using the 'run Nvidia GPU' application, loading a checkpoint, and entering prompts into the Comfy UI interface.
- 🔄 Custom nodes can be installed via the Comfy UI manager to enhance Stable Diffusion's capabilities, with a variety of nodes available for different tasks.
- 🌐 Users can test custom models on Civit AI before downloading them to ensure they meet their quality expectations and to avoid lengthy download times.
Q & A
What are the two methods mentioned in the script for installing Stable Diffusion?
-The two methods mentioned are installing through Python, which is considered the hard way, and using Comfy UI, which is described as the easy way.
Why is Comfy UI recommended for users with low technical knowledge?
-Comfy UI is recommended for users with low technical knowledge because it simplifies the installation process and makes it more accessible, requiring just a few downloads and setup steps rather than dealing with complex Python installations.
What is the approximate size of the Comfy UI download file?
-The Comfy UI download file is around 1.4 GB.
What are the two run files that users should look out for in the extracted Comfy UI folder?
-The two run files are 'run CPU' and 'run Nvidia GPU'.
What is the minimum VRAM requirement for the model used in the script?
-The model used in the script requires around 8 GB of VRAM.
How can users check their GPU's VRAM?
-Users can check their VRAM by pressing Windows + R, typing 'dxdiag', clicking OK, clicking on 'Yes', and then checking the 'Display' tab to see the VRAM information.
What is the first model that needs to be downloaded for Stable Diffusion?
-The first model to download is the 'stable diffusion XL base 1.0'.
Where should the downloaded models be placed in the Comfy UI folder structure?
-The downloaded models should be placed in the 'models' folder within the Comfy UI directory, specifically in the 'checkpoints' subfolder.
How does the script suggest generating an image with Stable Diffusion?
-To generate an image, users should click on 'run Nvidia GPU', open the interface in a web browser, load a checkpoint, enter a prompt into the 'CLIP text' field, set the desired image parameters, and then click on 'Q prompt' to start the image generation process.
What is the purpose of the 'Comfy UI manager'?
-The 'Comfy UI manager' is used to install additional custom nodes and extensions that can enhance the functionality of the Stable Diffusion interface and allow users to perform more complex tasks.
How can users test a model before downloading it on Civit AI?
-Users can test a model on Civit AI by using the 'run model' feature, which allows them to generate an image with the model without having to download it first.
Outlines
💻 Installing Comfy UI for Stable Diffusion
The paragraph explains the process of installing Comfy UI, an easier alternative to the traditional Python installation for Stable Diffusion. It highlights the simplicity of using Comfy UI and guides the user through the installation steps, including downloading the software, extracting the ZIP file, and placing it in the appropriate directory. The importance of checking VRAM requirements for running the Nvidia GPU version is also discussed, as well as the necessity of downloading additional packages upon the first run of the Nvidia GPU executable.
📦 Downloading and Configuring Stable Diffusion Models
This paragraph details the steps to download and configure Stable Diffusion models, including the Stable Diffusion XL base and refiner models. It provides instructions on where to place the downloaded files within the AI documents folder and emphasizes the importance of having a high-speed internet connection due to the large file sizes. The paragraph also mentions the option to download an additional model, the Think Diffusion XL, and encourages users to follow the provided links in the description for a smoother installation process.
🖼️ Generating Images with Stable Diffusion
The focus of this paragraph is on generating images using the installed Stable Diffusion models. It walks the user through the process of loading checkpoints, setting up prompts, and adjusting parameters such as image resolution and batch size. The paragraph explains the role of the K sampler in creating the image and the potential need for additional installations during the process. It also touches on the differences in prompting style compared to chat GBT and showcases the quality of images that can be produced using the base model.
🔧 Customizing Comfy UI with Add-ons
This paragraph discusses the customization of Comfy UI through the installation of add-ons, specifically custom nodes. It guides the user on how to access the Comfy UI manager on GitHub, install custom nodes via the terminal, and restart the UI for the changes to take effect. The paragraph provides examples of different nodes, such as the reactor and open pose, and explains how they can be utilized within the UI. It also introduces Civit AI as a platform for downloading custom models, testing them before installation, and achieving higher quality outputs.
Mindmap
Keywords
💡Stable Diffusion
💡Comfy UI
💡Installation
💡Nvidia GPU
💡VRAM
💡Checkpoints
💡Prompts
💡Custom Nodes
💡Civit AI
💡Image Generation
💡GitHub
Highlights
The introduction of an easy method to install and use stable, diffusion models through a comfy UI, which simplifies the process for users with low technical knowledge.
Comparing the hard way of installation through Python, which the speaker has tried twice without success, to the easy way through the comfy UI.
The recommendation to use Comfy UI due to its ease of use compared to the traditional method of downloading through Python.
A detailed step-by-step guide on how to install Comfy UI, including searching on Google and downloading the software.
The importance of checking the system's VRAM before proceeding with the installation, especially for users with an Nvidia graphics card or an M1/M2 Mac.
Instructions on how to find out the VRAM capacity by using the Windows R command and DXDAG tool.
The process of installing stable, diffusion models, including downloading the stable, diffusion XL base and refiner, and the file sizes involved.
The explanation of where to place the downloaded model files within the AI documents folder for the comfy UI to recognize them.
A guide on how to generate an image using the installed models, including setting up the prompt, negative prompt, and other parameters.
The introduction of the Comfy UI manager and the installation of custom nodes to enhance the functionality of the stable diffusion models.
The demonstration of using custom nodes such as the reactor and open pose for unique image manipulations.
The recommendation to test custom models on Civit AI before downloading them to ensure they meet the desired quality standards.
The availability of high-quality models on Civit AI, which can be filtered by highest rated or most downloaded.
The process of testing an image model using Civit AI's free image generator before installation, to verify the output quality.
The mention of the preferred think diffusion XL model and its availability in the video description for download.
The overall tutorial's goal to empower users with the knowledge to install and use stable, diffusion models effectively and efficiently.
Transcripts
if you never installed or used stable
diffusion there is the hard way doing it
through python that I've tried two times
without success and the easy way through
comfy UI so I'll show you how to install
comy UI and show you how easy it really
is I'll show you how to install stable
diffusion models so you can generate
images how to use custom nodes to make
stable diffusion more powerful full and
by the end of this video I'll show you
how to install the highest quality
models so you can get ultimate control
just follow this tutorial step by step
so you can install and use stable
diffusion step number one install comfy
UI so just write comfy UI into Google
search and click the first link by the
way every single link is down in the
description now the reason we want to
use comfy UI is it's a lot easier the
old way of getting stable diffusion
would be to download through python that
somebody with very low technical
knowledge would have a hard time doing
with comfy UI all you have to do is just
download a couple of things and then it
will work in this node base now you
might be thinking hey this looks pretty
complicated man but actually when you
get into it it's so simple and I'll
explain everything to you in a later
step so how do we install well all you
need to do is scroll down a little bit
and you will go to the installing here
just click on direct link to download
and you will start downloading this one
is around 1.4 GB so just wait for it to
install now just go through your
downloads folder until you find this
file which is a ZIP file right click on
it click on extract all and extract then
you will get this folder I recommend
that you cut it away from the downloads
folder go to documents make a new folder
named Ai and paste it in here this will
make it easier for the later steps now
let's double click it and here there are
two run files that you need to look out
for the first one is run CPU and the
second one is run Nvidia GPU and this is
important if you have an Nvidia graphics
card the model we're going to run today
needs around 8 GB of vram and if you're
running a Mac with M1 two or three I've
left a link in the description to
download it on Mac as well it's a little
bit different but you can still get it
to work but how do you find out how much
vram you have well just click Windows R
and write DX dag click okay click on yes
and you can now see what you are working
with just click on the display in the
top and you can see I have the AMD
Radeon graphics that only has 400 MB of
vram and I have my GPU Nvidia GeForce
RTX 3070 laptop with 8 GB of vram so
check your requirements before you
continue so now that you know we can
just click on run Nvidia GPU it will for
you install a bunch of packages so it
will take a little bit of time but for
me what happens is it opens the comy UI
in my web browser but the main issue is
that if you've done every single step
now you won't actually have any models
here that you can use to generate an
image so that's
why stop taking meeting notes let AI do
it for you just get TLD DV for free and
it works inside of Zoom Google meet and
teams I just had this short meeting now
I can summarize main ideas create a list
of next action steps or even generate
sales rep performance report you can
even provide a custom prompt and
generate we just got an instant summary
you can also use the AI report Builder
if you have have multiple meetings with
one clients and summarize all of them
then you can schedule this to happen
recurringly you get your AI report that
you can schedule to happen every Friday
that then integrates with your favorite
tools from slack to HubSpot download TLD
DV by clicking the link in the
description down below and put AI into
your meetings thanks to tlv for
sponsoring this video so that's why
we're going to go to step number two
install stable diffusion the first thing
we're going to download is the stable
diffusion XL base 1.0 again links to all
of them are in the description below and
all you need to do is go down and
download this one called save tensors
now the file size is quite high on this
so depending on your internet speed this
might take some time for me it took
around 30 minutes and all you need to do
is click on this download file now I'll
show you actually a better model that I
like more but this is the original
stable diffusion base so if you want the
raw unfiltered base this is the one to
get now the second thing you need to
download is the stable diffusion refiner
so I'm just going to scroll down a
little bit and here you see the same
thing happen we're going to download the
first one save tensor and click on this
download button again this is 6 GB so it
might take some time the last thing is
the sdxl V once again just start
scrolling down and let's download this
one a little lower file size on this
just click the download file and if
you're downloading all these models now
I would recommend also downloading this
think diffusion XL model that I'll show
you later in this video but if you're
but if you're following step by step I
highly recommend to follow the link in
the description and download this as
well once the files are downloaded I
need to show you where to put them so
let's imagine these are the files I'm
just going to cut them then we go inside
of the the AI documents click on config
UI then click on models then click
checkpoints this is where you're going
to paste the base and the refiner now we
only have the v file left so I'm going
to cut that away from this folder go
back one step to the models again then
scroll down until we find V now just
paste your v in here if you've come this
far you're doing amazing all you need to
do is Step number three generate the
image now that everything is installed
we just click on run Nvidia GPU again
this screen will load for a bit and then
you'll open this in your Chrome if it
doesn't open automatically just take
this HTTP link and copy and paste it to
your browser now let's the fun begin and
if you think this looks very complicated
it really isn't and once you get a hang
of it maybe you'll actually like this a
lot better than other interfaces but
let's start at the beginning where we
load a checkpoint since you loaded them
into the model folder before you can see
that they are now here the base and the
refiner so we'll just use the base now
you can see this clip path goes up to
this clip text en code prompt this is
the positive prompt or basically what
you want it to make so let's go simple
red apple right below it you have the
negative prompt this is things that you
don't want to be in the image so you
could say blur noise and things like
this now here you see the image you will
generate I have it set to 1280 by 720
and the batch size is four meaning I'll
generate four Images I'm going to put it
on one because it's faster to generate
then we go over to the actual K sampler
this is what actually creates your image
the recommended settings is to go the
older sample name steps between 20 and
30 CFG I like around 8 to 10 10 and the
rest I keep on default now we can create
our first image by just clicking this Q
prompt now you'll see it starts loading
with a green kind of stroke around it
sometimes this might load for a while
and that's when you can take up this
terminal and it will see that it's
trying to fetch some data right now and
sometimes you might even have to install
some stuff so just be patient let it
load and now it moved to the next step
where it's actually reading our prompt
it then has moved to the K sampler and
you will soon start to see a bar in the
top start to fill as you can see it's
downloading some things and just like
that our first image is generated the
first one always takes a little longer
let's try another prompt like a man
showing an iPad to the camera and let's
Q prompt again this time will be a lot
faster and depending on how many images
you are generating and the file size
this will take shorter or longer just
like that it goes into the VA code and
we get the new image as you can see this
is the quality that you get from the
base model and if you're used to
prompting inside of chat gbt it takes a
little bit of a different prompting
style but let me show you some good
results with my favorite model in a
minute just one more example like a
gorgeous Viking woman at the top of the
mountain Q prompt it's loading again and
here is the final image a woman that
looks like she would carry you into bed
but is that all you can do with comfy Ai
and how do we actually get the best
output that's why we have step number
four comfy UI manager just go to the
comfy UI manager on GitHub because this
is where we're going to install a bunch
of add-ons and this is by far the
easiest way to do it just scroll a
little bit down and the first step is to
get to the CD custom nodes ter terminal
as you can see this is inside of comy UI
then custom nodes then you just want to
rightclick and click on open Terminal as
you can see we're now running inside of
the correct folder now just copy this
git clone and paste it right in here
click on enter and it will take a little
bit to install now you can close it now
we just go to config UI and click on
restart now you can see that we have
this manager button in the bottom right
and the most important button here is
install custom nodes as you can see they
have hundreds of different custom nodes
that you can install to do different
things for you for example if I search
reactor this is a node that I was
playing with yesterday the fast and
simple R like face swap extension node
so you can just click on install here
then we can search for open pose where
you can apply a pose of a character and
then you'll actually render out that
post for the character once they're
installed you can now right click add
node and you have your new nodes you
downloaded here for example reactor you
have three different nodes that you now
have access to that have these inputs
and outputs for example to use this fast
face swap they need an image so we're
going to use this as the input image we
need to rightclick add node image and
load image where I'm going to upload an
image of my face something like this put
the image into the source image then in
the save image I'm just going to drag
over this one now we can change the
prompt we cue The Prompt you'll now see
that it's also having this green circle
around it before and here is the image
we got yeah we definitely need some
prompting help and I guess is this
supposed to be me that's why we go to
the last step to get higher quality just
go to civit ai.com because this is where
you can download a lot of custom models
and get exactly what you're looking for
just click on the models tab in the top
then we can filter by highest rated most
downloaded and you'll see the top models
here I tested a bunch of them and I
believe there's one thing that you
should do before you start installing
and that is to actually test them on
civit AI itself say you like this model
for example instead of downloading it
being 6 GB and taking a little bit of
time you can actually click on this run
model and go to cart which is a free
image generator and now you can just run
the same prompt Again by clicking here
and test the entire model I'm just going
to run it and just like that we tested
the model even before downloading it so
you can get higher quality images this
think diffusion XL I'll leave in the
description down below because it's my
favorite and once you've downloaded it
just put it into the models folder that
we did for the Bas and the refin ER so
you now know how to install and use
stable diffusion like the video see the
description below and I'll see you in
next video
関連動画をさらに表示
Text to Image generation using Stable Diffusion || HuggingFace Tutorial Diffusers Library
SDXL Local LORA Training Guide: Unlimited AI Images of Yourself
מדריך מלא: איך לאמן מודל FLUX עם הפנים שלכם באתר ASTRIA + קבלו 10$ לחשבון שלכם מתנה!
AutoGen Studio 2.0 Advanced Tutorial | Build multi-agent GenAI Application!!
שיעור סטייבל דיפיוז'ן - מתחילים
Text to Video: The Next Leap in AI Generation
5.0 / 5 (0 votes)