Skip to content

Instantly share code, notes, and snippets.

@milnak
Last active April 19, 2024 18:13
Show Gist options
  • Save milnak/0a4ce3853a338060cbd1b02f6bea96c1 to your computer and use it in GitHub Desktop.
Save milnak/0a4ce3853a338060cbd1b02f6bea96c1 to your computer and use it in GitHub Desktop.
Stable Diffusion Install for Windows

Stable Diffusion Install

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

Note: Stable Diffusion requires PyTorch which only works with Python 3.10.

Install Prerequisites

Install Scoop then do:

scoop bucket add versions

scoop install versions/python310

scoop install main/git

scoop install main/curl

Clone AUTOMATIC1111 repo

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

Download Stable diffusion 1.5 Model (general-purpose model)

cd /stable-diffusion-webui/models/Stable-diffusion

curl -L -O 'https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt'

Download Additional Models

Note: Download model to /stable-diffusion-webui/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 V5.1 - V5.1 (VAE) | Stable Diffusion Checkpoint | Civitai

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

Download the Model SafeTensor (3.97 GB).

  • 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)

webui-user.bat Modifications

cd /stable-diffusion-webui
notepad webui-user.bat

If your video card only has 4GB-6GB, modify this line:

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

To make Stable Diffusion not block the terminal, modify this line:

%PYTHON% launch.py %* to start /MIN "Stable Diffusion" %PYTHON% launch.py %*

Start WebUI

cd /stable-diffusion-webui
./webui-user.bat

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

Online Guides

Beginner's Guide Series:

Generating Consistent Face using Stable Diffusion- 3 Efficient Methods

Generating Realistic People in Stable Diffusion

Master the Art of AI Image Enhancement with These Easy Prompts

Mastering Light- Achieve the Perfect Balance

Unleashing the Power

PromptHero - Search prompts for Stable Diffusion, ChatGPT & Midjourney

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