文生图基础 — 写出高质量提示词
环境搭建好了,开始学出图的核心技能:写提示词。SD 的提示词体系和 Midjourney 不太一样,掌握它的规则很重要。
一、SD 提示词的特点
Section titled “一、SD 提示词的特点”SD 与 Midjourney 的提示词对比
Section titled “SD 与 Midjourney 的提示词对比”| 特性 | Midjourney | Stable Diffusion |
|---|---|---|
| 提示词语言 | 英文长句 | 英文关键词式 |
| 格式 | 自然语言描述 | 逗号分隔的关键词 |
| 负向提示词 | --no 参数 | 有专门的负向输入框 |
| 权重控制 | 参数控制 | 用 () 或数字权重 |
| 风格控制 | 风格关键词 | 靠模型+LoRA |
SD 的提示词格式
Section titled “SD 的提示词格式”正向提示词(正面描述你想要的):masterpiece, best quality, 1girl, long hair, white dress, sunflower field, sunset, photorealistic
负向提示词(描述你不要的):ugly, deformed, blurry, low quality, bad hands, extra fingers二、提示词基本公式
Section titled “二、提示词基本公式”公式:主体 + 细节 + 环境 + 风格 + 画质
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分类关键词库
Section titled “分类关键词库”人物: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 hairsmile, happy, angry, sad, crying, surprised, laughing, blush, seriousstanding, sitting, walking, running, lying down, looking at viewerturning 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三、负向提示词
Section titled “三、负向提示词”为什么要有负向提示词?
Section titled “为什么要有负向提示词?”SD 默认的生成质量不稳定。负向提示词能帮你避免常见问题。
基础通用负向
Section titled “基础通用负向”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人像专用负向
Section titled “人像专用负向”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风景专用负向
Section titled “风景专用负向”blurry, low quality, bad composition, bad lighting,oversaturated, underexposed, foggy, hazy,unnatural colors, artifacts, noise, compression artifacts四、权重控制
Section titled “四、权重控制”用括号控制权重
Section titled “用括号控制权重”(cat) → 权重 1.1 倍(提高)((cat)) → 权重 1.21 倍(((cat))) → 权重 1.33 倍[cat] → 权重 0.9 倍(降低)[[cat]] → 权重 0.81 倍用数字精确控制
Section titled “用数字精确控制”(cat:1.5) → 权重 1.5 倍(cat:0.5) → 权重 0.5 倍(降低一半)(cat:1.2) → 权重 1.2 倍权重使用技巧
Section titled “权重使用技巧”# 突出主体(masterpiece:1.2), (1girl:1.3), beautiful face, (detailed eyes:1.1)
# 降低不重要元素(background:0.8), (trees:0.6)
# 强烈强调(((masterpiece))), ((best quality))五、提示词模板库
Section titled “五、提示词模板库”# 写实人像(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概念设计模板
Section titled “概念设计模板”# 赛博朋克城市(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六、图生图(img2img)
Section titled “六、图生图(img2img)”图生图是什么
Section titled “图生图是什么”基于一张已有的图片进行修改和优化。
1. 把草稿变成精致作品2. 改变图片的风格3. 对不满意的地方局部重绘4. 照片转二次元- 切换到
img2img页面 - 上传一张图片
- 写提示词(描述你想要的样子)
- 调整 Denoising Strength(降噪强度)
Denoising Strength 详解
Section titled “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 backgroundDenoising: 0.6
# 改油画风格上传一张照片 + 提示词:oil painting, van Gogh style, thick brush strokes,vibrant colors, artistic, masterpieceDenoising: 0.7七、高清放大
Section titled “七、高清放大”用 WebUI 的 Extras 页面:
- 切换到
Extras页 - 上传要放大的图片或选择刚刚生成的图
- 选择放大倍数(2x、4x)
- 选择缩放模型(推荐 4x-UltraSharp)
- 点击 Generate
推荐的放大参数
Section titled “推荐的放大参数”Upscaler 1: 4x-UltraSharp(锐化效果好)Upscaler 2: R-ESRGAN 4x+(通用)Upscale by: 2(放大2倍)Denoising: 0.3在文生图页面底部开启「Hires.fix」:
Upscaler: 4x-UltraSharpHires steps: 15-20Denoising strength: 0.4-0.5Upscale by: 1.5-2.0八、同一模型不同风格
Section titled “八、同一模型不同风格”一个模型出不同风格
Section titled “一个模型出不同风格”# 写实版 - 用 Realistic Visionprompt: portrait of a woman, photorealistic, photography, detailed skin texture
# 油画版 - 换关键词prompt: portrait of a woman, oil painting, impressionist style, visible brush strokes
# 动漫版 - 用 Anything V5prompt: portrait of a woman, anime style, cell shaded, vibrant colors模型选择速查
Section titled “模型选择速查”| 追求效果 | 推荐模型 | 尺寸 |
|---|---|---|
| 真实照片 | Realistic Vision | 512x768 |
| 艺术插画 | DreamShaper | 512x768 |
| 动漫 | Anything V5 | 512x768 |
| SDXL 画质 | SDXL 1.0 | 1024x1024 |
| 人像摄影 | ChilloutMix | 512x768 |
九、批量出图
Section titled “九、批量出图”Batch 参数
Section titled “Batch 参数”Batch count: 4 → 连续生成 4 次(每次 1 张)Batch size: 4 → 同时生成 4 张(需大显存)- Batch count:显存不足时使用,逐张生成
- Batch size:显存充足时使用,同时生成
一般推荐 Batch count 4,因为一次出多张可以对比选择。
改变种子探索
Section titled “改变种子探索”Seed: -1 每次随机种子固定种子 + 换一个词 → 观察改变部位固定种子 + 换模型 → 感受模型差异固定种子 + 换 CFG → 感受强度差异十、提示词调试技巧
Section titled “十、提示词调试技巧”常见问题的排查
Section titled “常见问题的排查”问题:人脸变形→ 负向提示词加: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 控制构图快速迭代工作流
Section titled “快速迭代工作流”第1轮:基础提示词 + 随机种子 → 5 张图第2轮:选出最好的一张 → 固定种子 → 微调提示词第3轮:优化细节 → 启用 Hires.fix → 高清出图第4轮:Extras 放大 → 最终导出掌握了文生图的所有基础技巧后,是时候接触 SD 的核心竞争力了。接下来学习 ControlNet — 让 AI 完全按照你的构图、姿态、深度来生成。
💡 今日练习:用不同类型的模型(写实、艺术、动漫)生成同一个主题的图,观察不同模型的特点。再用 img2img 把一张真实照片处理成动漫风格。