Skip to content

文生图基础 — 写出高质量提示词

环境搭建好了,开始学出图的核心技能:写提示词。SD 的提示词体系和 Midjourney 不太一样,掌握它的规则很重要。

特性MidjourneyStable Diffusion
提示词语言英文长句英文关键词式
格式自然语言描述逗号分隔的关键词
负向提示词--no 参数有专门的负向输入框
权重控制参数控制() 或数字权重
风格控制风格关键词靠模型+LoRA
正向提示词(正面描述你想要的):
masterpiece, best quality, 1girl, long hair, white dress, sunflower field, sunset, photorealistic
负向提示词(描述你不要的):
ugly, deformed, blurry, low quality, bad hands, extra fingers

公式:主体 + 细节 + 环境 + 风格 + 画质

Section titled “公式:主体 + 细节 + 环境 + 风格 + 画质”
[主体] 1girl, long black hair, blue eyes, wearing a red dress
[动作] standing, looking at viewer, smiling
[环境] in a garden with roses, fountain in background, sunny day
[风格] photorealistic, photography, cinematic lighting
[画质] masterpiece, best quality, ultra detailed, 8K
完整正向提示词:
masterpiece, best quality, 1girl, long black hair, blue eyes,
wearing a red dress, standing in a beautiful rose garden,
stone fountain in background, sunlight through trees,
photorealistic, photography, cinematic lighting, ultra detailed, 8K
人物:1girl, 1boy, 1woman, 1man, multiple girls, group
动物:cat, dog, bird, wolf, fox
物体:car, building, food, flower
场景:landscape, cityscape, interior
发型:long hair, short hair, ponytail, braids, twin tails
发色:black hair, blonde hair, brown hair, silver hair, red hair
smile, happy, angry, sad, crying, surprised, laughing, blush, serious
standing, sitting, walking, running, lying down, looking at viewer
turning around, jumping, dancing, sleeping
制服:school uniform, maid outfit, suit, dress, kimono, armor
日常:casual wear, t-shirt, jeans, hoodie, jacket
装饰:hat, glasses, necklace, scarf, ribbon
自然:forest, beach, mountain, river, flower field, snow
城市:city street, building interior, rooftop, cafe, library
幻想:castle, fantasy world, space, underwater, floating islands
前置:masterpiece, best quality, high quality, excellent
细节:ultra detailed, highly detailed, intricate details
分辨率:8K, 4K, highres
光效:cinematic lighting, soft lighting, dramatic lighting
构图:from above, from below, close-up, wide shot

SD 默认的生成质量不稳定。负向提示词能帮你避免常见问题。

ugly, deformed, blurry, low quality, worst quality, bad anatomy,
disfigured, poorly drawn face, extra limbs, extra fingers,
bad hands, malformed hands, mutated hands, extra legs,
watermark, text, signature, username, logo,
signature, artist name, frame, border
ugly, bad eyes, cross-eyed, bad face, extra chin,
bad mouth, twisted mouth, mutilated,
extra fingers, bad hands, missing fingers,
bad proportions, deformed limbs,
fat, obese, double chin, bad skin,
wrinkled skin, pores visible, acne,
bad hair, messy hair, bad haircut
blurry, low quality, bad composition, bad lighting,
oversaturated, underexposed, foggy, hazy,
unnatural colors, artifacts, noise, compression artifacts
(cat) → 权重 1.1 倍(提高)
((cat)) → 权重 1.21 倍
(((cat))) → 权重 1.33 倍
[cat] → 权重 0.9 倍(降低)
[[cat]] → 权重 0.81 倍
(cat:1.5) → 权重 1.5 倍
(cat:0.5) → 权重 0.5 倍(降低一半)
(cat:1.2) → 权重 1.2 倍
# 突出主体
(masterpiece:1.2), (1girl:1.3), beautiful face, (detailed eyes:1.1)
# 降低不重要元素
(background:0.8), (trees:0.6)
# 强烈强调
(((masterpiece))), ((best quality))
# 写实人像
(photorealistic:1.3), (masterpiece:1.2), 1girl,
(beautiful face:1.2), delicate features,
(long black hair:1.1), wearing a white sundress,
standing in a sunflower field at golden hour,
warm sunlight, soft shadows, depth of field,
cinematic lighting, ultra detailed, 8K
负向:
ugly, deformed, blurry, low quality, bad anatomy,
bad hands, extra fingers, poorly drawn face
# 壮丽山景
(landscape:1.2), majestic mountains, snow capped peaks,
crystal clear lake, reflection in water, pine forest,
golden hour, dramatic clouds, misty atmosphere,
National Geographic photography, ultra detailed, 8K
负向:
blurry, low quality, oversaturated, ugly, deformed
# 赛博朋克城市
(cyberpunk city:1.3), neon lights, rain soaked streets,
flying cars, holographic billboards, dark and moody,
futuristic architecture, crowded streets,
cinematic composition, Blade Runner style,
intricate details, ultra detailed
负向:
ugly, deformed, blurry, low quality, cartoon

基于一张已有的图片进行修改和优化。

1. 把草稿变成精致作品
2. 改变图片的风格
3. 对不满意的地方局部重绘
4. 照片转二次元
  1. 切换到 img2img 页面
  2. 上传一张图片
  3. 写提示词(描述你想要的样子)
  4. 调整 Denoising Strength(降噪强度)
0.1-0.3 — 微调(基本保持原图)
0.3-0.5 — 中度修改(改变风格)
0.5-0.7 — 大幅修改(保留构图,换画风)
0.7-0.9 — 重度修改(几乎完全重画)
# 照片转二次元
上传一张真人照片 + 提示词:
(anime style:1.3), 1girl, Studio Ghibli aesthetic,
soft colors, big eyes, detailed background
Denoising: 0.6
# 改油画风格
上传一张照片 + 提示词:
oil painting, van Gogh style, thick brush strokes,
vibrant colors, artistic, masterpiece
Denoising: 0.7

用 WebUI 的 Extras 页面:

  1. 切换到 Extras
  2. 上传要放大的图片或选择刚刚生成的图
  3. 选择放大倍数(2x、4x)
  4. 选择缩放模型(推荐 4x-UltraSharp)
  5. 点击 Generate
Upscaler 1: 4x-UltraSharp(锐化效果好)
Upscaler 2: R-ESRGAN 4x+(通用)
Upscale by: 2(放大2倍)
Denoising: 0.3

在文生图页面底部开启「Hires.fix」:

Upscaler: 4x-UltraSharp
Hires steps: 15-20
Denoising strength: 0.4-0.5
Upscale by: 1.5-2.0
# 写实版 - 用 Realistic Vision
prompt: portrait of a woman, photorealistic, photography, detailed skin texture
# 油画版 - 换关键词
prompt: portrait of a woman, oil painting, impressionist style, visible brush strokes
# 动漫版 - 用 Anything V5
prompt: portrait of a woman, anime style, cell shaded, vibrant colors
追求效果推荐模型尺寸
真实照片Realistic Vision512x768
艺术插画DreamShaper512x768
动漫Anything V5512x768
SDXL 画质SDXL 1.01024x1024
人像摄影ChilloutMix512x768
Batch count: 4 → 连续生成 4 次(每次 1 张)
Batch size: 4 → 同时生成 4 张(需大显存)
  • Batch count:显存不足时使用,逐张生成
  • Batch size:显存充足时使用,同时生成

一般推荐 Batch count 4,因为一次出多张可以对比选择。

Seed: -1 每次随机种子
固定种子 + 换一个词 → 观察改变部位
固定种子 + 换模型 → 感受模型差异
固定种子 + 换 CFG → 感受强度差异
问题:人脸变形
→ 负向提示词加:bad face, wrong face, disfigured face
→ 或者放一张参考图到 ControlNet
问题:图太暗
→ 正向提示词加:bright lighting, well-lit, sunny
→ 降低 CFG Scale 到 5-7
问题:图太模糊
→ 正向提示词加:sharp focus, detailed, 8K
→ 增大采样步数到 25-30
问题:颜色太鲜艳/太暗淡
→ 降低/提高 CFG Scale
→ 检查负向提示词是否有颜色词
问题:主体太小/太大
→ 用权重调整:(main subject:1.3)
→ 或者用 ControlNet 控制构图
第1轮:基础提示词 + 随机种子 → 5 张图
第2轮:选出最好的一张 → 固定种子 → 微调提示词
第3轮:优化细节 → 启用 Hires.fix → 高清出图
第4轮:Extras 放大 → 最终导出

掌握了文生图的所有基础技巧后,是时候接触 SD 的核心竞争力了。接下来学习 ControlNet — 让 AI 完全按照你的构图、姿态、深度来生成。


💡 今日练习:用不同类型的模型(写实、艺术、动漫)生成同一个主题的图,观察不同模型的特点。再用 img2img 把一张真实照片处理成动漫风格。