Earngenix Logo
Skip to main content

Stable Diffusion · Windows + Nvidia GPU · 2026

How to Install Stable Diffusion Locally on Windows with Automatic1111

A complete beginner-friendly guide to install Stable Diffusion with Automatic1111 on a Windows PC with an Nvidia GPU — from Python setup to your first AI-generated image.

By Earngenix Team10 min read
Stable Diffusion installation guide — hero image showing Automatic1111 web UI running locally on Windows

How to Install Stable Diffusion with Automatic1111 on Windows

What you need: A Windows PC with an Nvidia GPU (4GB+ VRAM recommended), approximately 15GB of free disk space, a working internet connection, and about 20–30 minutes for the full setup.

This guide walks you through installing Stable Diffusion using the Automatic1111 web UI on a Windows PC with an Nvidia GPU. By the end, you will have a fully working local AI image generation setup — with no monthly fees and no usage limits.

Automatic1111 is the most popular Stable Diffusion interface for Windows. It provides a browser-based UI, supports thousands of community models, and has an extensive extension ecosystem.

Step 1: Download and Install Python 3.10

1Download Python 3.10 from the official website

Visit the official Python 3.10 download page and scroll down to find Windows Installer (64-bit). Download and run the installer.

⚠️ Warning: During installation, check the box for "Add Python to PATH" before clicking Install Now. Skipping this step is the most common installation mistake and will cause errors later.
Python 3.10 Windows installer showing the Add Python to PATH checkbox that must be ticked before installation
Check 'Add Python to PATH' before clicking Install Now.

Step 2: Download and Install Git

2Install Git for Windows

Go to Git for Windows and download the standalone 64-bit installer. Run it and click through all the default settings — no changes needed.

Git is required to download the Automatic1111 repository from GitHub in the next step.

Git for Windows installer showing the default settings selection screen during installation
Run the Git installer with all default settings.

Step 3: Clone the Automatic1111 Repository

3Download Automatic1111 from GitHub
  • Make sure you have at least 13–15 GB of free space on your chosen drive.
  • Create a folder where you want to install Stable Diffusion, for example: D:\AI-Software
  • Right-click inside the folder and select "Open in Terminal" (or open a Command Prompt and navigate to the folder).
  • Paste and run the command below:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
💡 Tip: The download may take a few minutes. Once complete, a new folder called stable-diffusion-webui will appear in your chosen directory.
Windows Terminal showing the git clone command downloading the Automatic1111 stable-diffusion-webui repository
Run the git clone command to download Automatic1111.

Step 4: Set Up and Optimize the Web UI

4Edit webui-user.bat to add launch flags

Inside the stable-diffusion-webui folder, find the file called webui-user.bat and open it in Notepad. Add launch flags to optimize performance for your GPU.

FlagEffectWhen to Use
--xformersSpeeds up generation timeAlways (if you have an Nvidia GPU)
--autolaunchAuto-opens browser on startupRecommended for convenience
--medvramReduces VRAM usageGPUs with 4–8 GB VRAM
--lowvramFurther reduces VRAM usageVery low-spec GPUs (under 4 GB)
--no-half-vaeFull precision VAE (prevents black images)If you see black/corrupted outputs

For most Nvidia GPUs (4–8GB VRAM), add this line:

set COMMANDLINE_ARGS=--xformers --autolaunch --medvram

CPU-only mode (very slow — not recommended):

set COMMANDLINE_ARGS=--use-cpu all --precision full --no-half --skip-torch-cuda-test

Save the file after making your changes.

Notepad showing webui-user.bat file with COMMANDLINE_ARGS flags added for Automatic1111 optimization
Add your chosen flags to the webui-user.bat file and save.

Step 5: Download a Stable Diffusion Model

5Download a checkpoint model

Stable Diffusion requires a model file to generate images. Visit CivitAI to browse and download models. Popular beginner choices include Juggernaut XL (realistic), Deliberate (detailed), and Rev Animated (anime/stylized).

Once downloaded, place the .safetensors or .ckpt file in:

stable-diffusion-webui/models/Stable-diffusion/
💡 Tip: Always prefer .safetensors files over .ckpt — they load faster and are more secure.
Stable Diffusion models folder showing .safetensors checkpoint files placed in stable-diffusion-webui/models/Stable-diffusion
Place your downloaded model file in the Stable-diffusion models folder.

Step 6: Run the Web UI

6Launch Automatic1111
  • Go back to the stable-diffusion-webui folder and double-click webui-user.bat to start the installation.
  • A terminal window will open and begin downloading additional dependencies like Torch and TorchVision. This may take 5–15 minutes depending on your internet speed.
  • Once ready, your browser will open automatically if you used the --autolaunch flag. Otherwise, open your browser and go to:
http://127.0.0.1:7860
Windows terminal showing Automatic1111 stable diffusion webui starting up and displaying the local URL http://127.0.0.1:7860
The terminal shows Automatic1111 launching — copy the URL and open it in your browser.

Step 7: Generate Your First AI Image

7Run your first generation
  • In the Automatic1111 web UI, you will see a prompt box at the top of the page.
  • Enter a description of what you want to generate — for example: "A cat wearing a hat, masterpiece, best quality"
  • Click the orange <strong>Generate</strong> button and wait a few seconds.
  • Your first AI-generated image will appear in the output area on the right.
Automatic1111 Stable Diffusion web UI showing an AI-generated image of a cat wearing a hat in the output panel
Your first AI-generated image created with Stable Diffusion and Automatic1111.

Final Tips

Congratulations — you now have Stable Diffusion with Automatic1111 running locally on your Windows PC. Here are a few things worth knowing as you start exploring:

🔄 Keeping Automatic1111 Updated

To update to the latest version, open a terminal inside your stable-diffusion-webui folder and run:

git pull

This fetches the latest improvements and bug fixes from the GitHub repository.

💡 Tip: Once you are comfortable with the basics, explore the LoRA guide to learn how to add style control to your generations, and checkpoint models guide to understand the different model types available.

Frequently Asked Questions

You need a Windows PC with an Nvidia GPU (at least 4GB VRAM recommended), Python 3.10, Git, and 13-15GB of free disk space. An AMD GPU or CPU-only setup is possible but significantly slower.

Use Python 3.10.x specifically. Newer Python versions can cause compatibility issues with some Automatic1111 dependencies. Download Python 3.10 from the official Python website and make sure to check 'Add Python to PATH' during installation.

The --medvram flag tells Automatic1111 to use less GPU memory, which is important for GPUs with 4-8GB of VRAM. Without it, generation may fail with an out-of-memory error on lower-end GPUs. Use --lowvram if you have very limited VRAM.

The most popular source is CivitAI (civitai.com), which hosts thousands of community models. Hugging Face is another trusted source for official model releases. Always prefer .safetensors files over .ckpt for security and speed.

Open a terminal inside your stable-diffusion-webui folder and run: git pull. This fetches the latest changes from the GitHub repository and updates your local installation.

Discussion

Join the discussion

Sign in to leave a comment or reply

💬

No comments yet

Be the first to share your thoughts!