logo
🤖 AI 工具

Stable Diffusion

Stable Diffusion Cheat Sheet - 快速参考指南,收录常用语法、命令与实践。

📂 分类 · AI 工具🧭 Markdown 速查🏷️ 3 个标签
#ai#image#stable-diffusion
向下滚动查看内容
返回全部 Cheat Sheets

Overview

What is Stable Diffusion
  • Open source AI image generation model
  • Can run locally
  • Supports multiple models and extensions
  • Highly customizable
Main UI Tools
ToolFeatures
AUTOMATIC1111Most comprehensive
ComfyUINode-based workflow
FooocusSimple and easy
SD.NextModern interface
Main Models
ModelFeatures
SD 1.5Classic, most resources
SDXLHigh quality, 1024x1024
SD 3Latest, improved text
FluxHigh quality new model

Prompt Basics

Basic Format
CODE
滚动查看更多
[subject], [description], [environment], [style], [quality]
Positive Prompt Example
CODE
滚动查看更多
1girl, long hair, blue eyes,
white dress, standing in garden,
detailed background, soft lighting,
masterpiece, best quality, 8k
Negative Prompt Example
CODE
滚动查看更多
lowres, bad anatomy, bad hands,
text, error, missing fingers,
extra digit, fewer digits, cropped,
worst quality, low quality,
normal quality, jpeg artifacts,
signature, watermark, username, blurry
Weight Syntax

Increase weight

CODE
滚动查看更多
(beautiful:1.3)
((important))        # ~1.21x
(((very important))) # ~1.33x

Decrease weight

CODE
滚动查看更多
(unwanted:0.7)
[less important]     # ~0.9x
Prompt Blending

AND association

CODE
滚动查看更多
cat AND dog        # Generate both cat and dog

BREAK separation

CODE
滚动查看更多
portrait BREAK landscape

Generation Parameters

Samplers
SamplerFeaturesRecommended Steps
EulerFast, good results20-30
Euler aCreative variation20-40
DPM++ 2MBalanced20-30
DPM++ 2M KarrasBetter details20-30
DPM++ SDEHigh quality25-40
DPM++ 2M SDE KarrasRecommended20-35
UniPCFast, high quality15-25
DDIMStable, consistent50+
Sampling Steps
StepsEffect
15-20Quick preview
20-30Normal use
30-50High quality
50+Fine details
CFG Scale
ValueEffect
1-5More creative, may deviate
7-8Balanced (recommended)
9-12Strict prompt following
15+Oversaturated, artifacts
Resolution

SD 1.5

CODE
滚动查看更多
512x512   # Default
512x768   # Portrait
768x512   # Landscape

SDXL

CODE
滚动查看更多
1024x1024 # Default
1024x1536 # Portrait
1536x1024 # Landscape
Seed
CODE
滚动查看更多
-1        # Random seed
Fixed     # Reproducible results

Models & LoRA

Checkpoint Models

Realistic

CODE
滚动查看更多
Realistic Vision
SDXL Realistic
Juggernaut XL

Anime

CODE
滚动查看更多
Anything V5
Counterfeit
Animagine XL
LoRA Usage

Basic format

CODE
滚动查看更多
<lora:lora_name:weight>

Example

CODE
滚动查看更多
1girl, <lora:koreanDollLikeness:0.7>,
detailed face, masterpiece

Multiple LoRAs

CODE
滚动查看更多
portrait, <lora:styleA:0.6>,
<lora:styleB:0.4>, best quality
Embeddings (Textual Inversion)

Negative embeddings

CODE
滚动查看更多
(in negative prompt)
EasyNegative, badhandv4, ng_deepnegative
VAE

Recommended

CODE
滚动查看更多
vae-ft-mse-840000
sdxl_vae

Purpose

CODE
滚动查看更多
Improve colors and details
Reduce grayish appearance

Common Features

Hires. Fix

Settings

CODE
滚动查看更多
Upscaler: R-ESRGAN 4x+
Hires steps: 10-20
Denoising strength: 0.3-0.5
Upscale by: 1.5-2
Inpainting

Steps

  1. Upload image to img2img
  2. Select Inpaint
  3. Draw mask area
  4. Set Denoising 0.4-0.7
  5. Generate
ControlNet

Common Preprocessors

CODE
滚动查看更多
Canny         # Edge detection
OpenPose      # Pose control
Depth         # Depth map
Lineart       # Line art
Tile          # Detail enhancement
IP-Adapter    # Image reference
img2img

Parameters

CODE
滚动查看更多
Denoising strength:
0.1-0.3  # Minor changes
0.4-0.6  # Medium changes
0.7-0.9  # Major changes

Quality Prompts

Quality Positive
CODE
滚动查看更多
masterpiece, best quality,
ultra detailed, 8k uhd,
high resolution, intricate details,
sharp focus, photorealistic
Quality Negative
CODE
滚动查看更多
worst quality, low quality,
normal quality, lowres,
bad anatomy, bad hands,
text, error, cropped,
jpeg artifacts, signature,
watermark, username
SDXL Recommended

Positive

CODE
滚动查看更多
score_9, score_8_up, score_7_up
detailed, masterpiece

Negative

CODE
滚动查看更多
score_6, score_5, score_4,
low quality, blurry

Prompt Templates

Portrait

Template

CODE
滚动查看更多
Positive:
1girl, solo, portrait, looking at viewer,
[hair color] hair, [hairstyle], [eye color] eyes,
[clothing], detailed face, beautiful eyes,
natural lighting, soft shadows,
masterpiece, best quality, 8k

Negative:
lowres, bad anatomy, bad hands, text,
error, missing fingers, extra digit,
fewer digits, cropped, worst quality,
low quality, normal quality

Example

CODE
滚动查看更多
1girl, solo, portrait, looking at viewer,
blonde hair, long wavy hair, green eyes,
white blouse, detailed face, beautiful eyes,
natural lighting, soft shadows,
masterpiece, best quality, 8k
Landscape

Template

CODE
滚动查看更多
Positive:
landscape, [scene type],
[time] sky, [weather],
volumetric lighting, atmospheric,
detailed environment, high detail,
masterpiece, best quality, 8k

Negative:
blurry, low quality, text, watermark,
ugly, deformed, oversaturated

Example

CODE
滚动查看更多
landscape, mountain lake at sunset,
orange sky, scattered clouds,
volumetric lighting, atmospheric,
detailed environment, high detail,
masterpiece, best quality, 8k
Anime Character

Template

CODE
滚动查看更多
Positive:
1girl, anime style, [character description],
[clothing], [pose/action],
detailed, vibrant colors,
masterpiece, best quality

Negative:
lowres, bad anatomy, bad hands,
worst quality, low quality,
extra limbs, missing limbs

Example

CODE
滚动查看更多
1girl, anime style, silver hair, red eyes,
black gothic dress, holding umbrella,
standing in rain, detailed, vibrant colors,
masterpiece, best quality
Product Photo

Template

CODE
滚动查看更多
Positive:
product photography, [product],
studio lighting, white background,
professional, commercial,
high detail, 8k uhd

Negative:
blurry, low quality, shadows,
text, watermark, cluttered

More Prompt Examples

Fantasy Characters

Wizard

CODE
滚动查看更多
old wizard with long white beard,
wearing purple robes with golden stars,
holding glowing staff, magical aura,
fantasy art style, detailed,
dramatic lighting, masterpiece

Warrior

CODE
滚动查看更多
female warrior in ornate armor,
battle stance, sword drawn,
wind blowing through hair,
epic fantasy, cinematic lighting,
detailed armor, masterpiece, 8k
Sci-Fi Scenes

Space Station

CODE
滚动查看更多
interior of futuristic space station,
large observation window showing Earth,
clean white surfaces, holographic displays,
sci-fi movie style, cinematic,
volumetric lighting, 8k

Robot

CODE
滚动查看更多
advanced humanoid robot,
sleek chrome design, glowing blue eyes,
standing in laboratory,
sci-fi concept art, highly detailed,
studio lighting, 8k
Nature & Animals

Wildlife

CODE
滚动查看更多
majestic lion in savanna,
golden hour lighting, dramatic sky,
wildlife photography style,
sharp focus, detailed fur,
National Geographic quality

Underwater

CODE
滚动查看更多
coral reef teeming with tropical fish,
sunlight rays through water,
underwater photography, vivid colors,
sharp focus, detailed, 8k
Food Photography

Dessert

CODE
滚动查看更多
chocolate lava cake with molten center,
fresh raspberries, mint leaf garnish,
dark slate plate, food photography,
shallow depth of field, studio lighting,
professional, appetizing

Asian Cuisine

CODE
滚动查看更多
bowl of ramen with soft-boiled egg,
steam rising, chopsticks, detailed noodles,
overhead shot, food photography style,
warm lighting, professional, 8k
Architecture

Modern Interior

CODE
滚动查看更多
minimalist living room interior,
floor to ceiling windows, city view,
neutral colors, designer furniture,
architectural photography, natural light,
clean lines, interior design magazine

Historical

CODE
滚动查看更多
gothic cathedral interior,
sunlight streaming through stained glass,
stone pillars, vaulted ceiling,
architectural photography, dramatic lighting,
detailed stonework, 8k

WebUI Extensions

Recommended Extensions

Image Enhancement

CODE
滚动查看更多
Ultimate SD Upscale
Tiled Diffusion
ADetailer (face fix)

Prompt Tools

CODE
滚动查看更多
Dynamic Prompts
Prompt All-in-one

ControlNet

CODE
滚动查看更多
sd-webui-controlnet
ADetailer Settings
CODE
滚动查看更多
Model: face_yolov8n.pt
Confidence: 0.3
Denoising: 0.4

Performance Optimization

VRAM Optimization

Command line args

CODE
滚动查看更多
--medvram           # Medium VRAM
--lowvram           # Low VRAM
--xformers          # VRAM optimization
--opt-sdp-attention # PyTorch 2.0
Speed Settings
CODE
滚动查看更多
--api               # Enable API
--no-half-vae       # Avoid black images
--precision full    # Precision issues
Recommended Config
VRAMSuggested Settings
4GB--lowvram
6GB--medvram
8GBDefault
12GB+SDXL capable

Troubleshooting

Gray/Dark Images

Solutions

CODE
滚动查看更多
1. Change VAE
2. Use --no-half-vae
3. Adjust CFG to 7-8
Hand Issues

Solutions

CODE
滚动查看更多
Negative: bad hands, extra fingers
Use ADetailer
Use ControlNet OpenPose
Face Issues

Solutions

CODE
滚动查看更多
Use ADetailer extension
Use face_yolov8n model
Add "detailed face" to prompt
Slow Generation

Solutions

CODE
滚动查看更多
Lower resolution
Reduce steps to 20-25
Use UniPC sampler
Enable xformers

ComfyUI Basics

Basic Nodes
CODE
滚动查看更多
Load Checkpoint  # Load model
CLIP Text Encode # Text encoding
KSampler         # Sampler
VAE Decode       # VAE decode
Save Image       # Save image
Basic Workflow
CODE
滚动查看更多
Checkpoint → CLIP → KSampler → VAE Decode → Save
                ↑
            Empty Latent
Advantages
  • Node-based workflow
  • Highly customizable
  • Better memory management
  • Complex workflow support

相关 Cheat Sheets

1v1免费职业咨询
logo

Follow Us

linkedinfacebooktwitterinstagramweiboyoutubebilibilitiktokxigua

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png

地址

Level 10b, 144 Edward Street, Brisbane CBD(Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
四川省成都市武侯区桂溪街道天府大道中段500号D5东方希望天祥广场B座45A13号
Business Hub, 155 Waymouth St, Adelaide SA 5000

Disclaimer

footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

匠人学院网站上的所有内容,包括课程材料、徽标和匠人学院网站上提供的信息,均受澳大利亚政府知识产权法的保护。严禁未经授权使用、销售、分发、复制或修改。违规行为可能会导致法律诉讼。通过访问我们的网站,您同意尊重我们的知识产权。 JR Academy Pty Ltd 保留所有权利,包括专利、商标和版权。任何侵权行为都将受到法律追究。查看用户协议

© 2017-2025 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572