Skip to content

Instantly share code, notes, and snippets.

@milnak
Last active November 30, 2025 03:28
Show Gist options
  • Select an option

  • Save milnak/0a4ce3853a338060cbd1b02f6bea96c1 to your computer and use it in GitHub Desktop.

Select an option

Save milnak/0a4ce3853a338060cbd1b02f6bea96c1 to your computer and use it in GitHub Desktop.
Stable Diffusion Install for Windows #windows

Stable Diffusion Install

These instructions were written for Windows, but are adaptable to other platforms.

For AMD video cards, follow instructions at the bottom of this page.

Important Stable Diffusion requires PyTorch which only works with Python 3.10.xx.

Install it, ensuring that you check "Add python.exe to PATH".

Open terminal and run "python.exe" you should see:

> python
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32

If the Windows store opens, remove "C:\Users\jeffm\AppData\Local\Microsoft\WindowsApps" from the System environment variables then reopen terminal and try again.

Clone AUTOMATIC1111 repo

cd /
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

Start Stable Diffusion

With a powerful video card, use:

./webui-user.bat

If you have limited video RAM (< 6GB) use:

./webui-user.bat --lowvram --precision full --no-half --skip-torch-cuda-test

Create sample images

Use the following settings:

  • Checkpoint: v1-5-pruned-emaonly.safetensors
  • Prompt: a highland cow in a magical forest, 35mm film photography, sharp
  • Batch count: 5
  • Sampling method: Euler a
  • Sampling steps: 40
  • CFG scale: 5

then click "Generate".

Download Additional Models

Note: Download model to models/Stable-diffusion.

Sample prompt and negative prompt are given for each model.

万象熔炉 | Anything V5/Ink

High-quality anime-style images. You can use danbooru tags (like 1girl, white hair) in the text prompt.

  • Prompt: (masterpiece,best quality), on front, 1girl, top view, looking at viewer, {fantasy|modern|science fiction}, {long hair|short hair}, (wavy hair:0.8), cowboy shot, outdoors, {day|dawn|night}, {blue eyes|black eyes|grey eyes}, {shy|happy|sad|smile}
  • Negative Prompt: worst quality,low quality,normal quality,watermark,text,error,blurry,signature,artist name,white clothes,lipstick,umbrella,wet, bad anatomy,EasyNegative,tattoo,text,letterboxed,colored skin,red pupils,crossed arms,crossed legs,arm arm support

DreamShaper - 8 | Stable Diffusion Checkpoint | Civitai

Portrait illustration style that sits between photorealistic and computer graphics.

  • Prompt: (masterpiece), (extremely intricate), fantasy, (((realistic portrait of an evil hermit, male, villain, anti hero, evil face, masculine face, medium hair, Maroon hair, wicked, cruel, sinister, malicious, ruthless, masculine, athletic))), (((dark bloody clothing, intricate details on clothing))), (perfect composition:1.4), aspect ratio 1:1, beach, deviantart hd, artstation hd, concept art, detailed face and body, award-winning photography, margins, detailed face, professional oil painting by Ed Blinkey, Atey Ghailan, Jeremy Mann, Greg Manchess, Alex Gray, trending on ArtStation, trending on CGSociety, intricate, high detail, sharp focus, dramatic, award winning matte drawing cinematic lighting octane render unreal engine volumetrics dtx
  • Negative Prompt: UnrealisticDream, (BadDream)

majicMIX realistic 麦橘写实 - v7 | Stable Diffusion Checkpoint | Civitai

Unlimited generations for my model with amazing features.

  • Prompt: 1girl,face,Undercut Fade,red hair,white background
  • Negative Prompt: (worst quality:2),(low quality:2),(normal quality:2),lowres,watermark

Photon - v1 | Stable Diffusion Checkpoint | Civitai

Photon aims to generate photorealistic and visually appealing images effortlessly.

  • Prompt: An abandoned amusement park reclaimed by nature, with rusted roller coasters and a carousel frozen in time. blurry
  • Negative Prompt: cartoon, painting, illustration, (worst quality, low quality, normal quality:2)

Protogen x3.4 (Photorealism) Official Release - Protogen x3.4 | Stable Diffusion Checkpoint | Civitai

Anime and manga-style visuals.

  • Prompt: modelshoot style, (extremely detailed CG unity 8k wallpaper), full shot body photo of the most beautiful artwork in the world, medieval princess, professional majestic oil painting by Ed Blinkey, Atey Ghailan, Studio Ghibli, by Jeremy Mann, Greg Manchess, Antonio Moro, trending on ArtStation, trending on CGSociety, Intricate, High Detail, Sharp focus, dramatic, photorealistic painting art by midjourney and greg rutkowski
  • Negative Prompt: canvas frame, cartoon, 3d, ((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((close up)),((b&w)), wierd colors, blurry, (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy, 3d render

Realistic Vision V6.0 B1

Good for generating anything realistic, whether they are people, objects, or scenes.

Download the Model SafeTensor (3.97 GB).

Sample prompt:

  • Prompt: city street, neon, fog, volumetric, closeup portrait photo of young woman in dark clothes, <lora:epiNoiseoffset_v2-pynoise:-1>
  • Negative Prompt: BadDream, (UnrealisticDream:1.2)

Another prompt:

  • Prompt: RAW photo, film still, Elizabeth [from bioshock], skyrim movie, award winning scene, interesting setting, detailed background, emotional scene, (high detailed skin:1.2), <lora:samdoesartsSamYang_offsetRightFilesize:0.6> <lora:epiNoiseoffset_v2:0.6>
  • Negative Prompt: (painting, drawing, anime, CGI, unreal engine, 3d, render:1.4), fake, cosplay, text, deformed iris, bored, boring, ugly, blank, plastic, award, blurry, camera, deformed, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck

AMD Video Cards - Automatic1111 with DirectML

Adapted from Stable-Diffusion-Info Wiki.

This includes the "Stable Diffusion 1.5 Model" (v1-5-pruned-emuonly). To install additional models, see information elsewhere on this page.

pyenv global 3.10.11

pip cache purge

git clone https://github.com/lshqqytiger/stable-diffusion-webui-amdgpu

cd stable-diffusion-webui-amdgpu

git submodule update --init --recursive

# pyenv fix as pyenv creates pyenv.bat which wont return
$env:PYTHON=Resolve-Path '~\.pyenv\pyenv-win\versions\3.10.11\python.exe'

# --lowvram is for 4GB video cards
.\webui.bat --use-directml --lowvram --opt-sub-quad-attention --opt-split-attention --no-half-vae --upcast-sampling

Sample negative prompt

3d, 3d render, B&W, bad anatomy, bad art, bad artist, bad proportions, bad_prompt_version2, bad-artist, blur, blurry, body out of frame, canvas frame, cartoon, cloned face, cross-eye, deformed, disfigured, duplicate, extra arms, extra fingers, extra legs, extra limbs, fused fingers, Glasses, gross proportions, logo, long neck, malformed limbs, missing arms, missing legs, morbid, mutated, mutated hands, mutation, mutilated, ng_deepnegative_v1_75t, out of frame, Photoshop, poorly drawn, poorly drawn face, poorly drawn feet, poorly drawn hands, text, tiling, too many fingers, ugly, ugly hands, video game, Watermark, weird colors

Updating torch

If you get a message to use "--reinstall-torch", instead, do the following:

cd venv/Scripts
activate
python.exe -m pip install --upgrade pip
pip install --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu118
pip install --force-reinstall --no-deps --pre xformers

Unleashing the Power

PromptHero - Search prompts for Stable Diffusion, ChatGPT & Midjourney

Guides

Stable Diffusion WebUI AUTOMATIC1111: A Beginner’s Guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment