Stable Diffusion 提示词工程
最后更新: 2026-03-26
难度: ⭐⭐ 进阶
📝 什么是提示词?
提示词(Prompt)是你与 AI 沟通的语言,决定了生成图像的内容、风格和质量。
核心公式:
好图 = 精准提示词 + 合适模型 + 正确参数🏗️ 提示词标准结构
基础结构(6 要素)
[主体] + [细节] + [动作/场景] + [环境] + [风格] + [质量词]完整示例
A beautiful young woman, long black hair, blue eyes,
smiling, wearing white dress,
standing in flower garden,
spring sunlight, cherry blossoms falling,
photorealistic, cinematic lighting,
masterpiece, best quality, 8k, ultra detailed结构解析:
| 部分 | 内容 | 作用 |
|---|---|---|
| 主体 | young woman, long black hair, blue eyes | 定义核心对象 |
| 细节 | smiling, wearing white dress | 添加特征 |
| 动作 | standing | 定义姿态 |
| 环境 | flower garden, spring sunlight | 设置场景 |
| 风格 | photorealistic, cinematic lighting | 确定风格 |
| 质量 | masterpiece, best quality, 8k | 保证质量 |
🎯 主体描述技巧
人物描述
模板:
[年龄] + [性别] + [外貌特征] + [表情] + [服装]示例:
25 year old woman, asian, long wavy hair,
green eyes, gentle smile, wearing casual sweater常用词汇:
| 类别 | 词汇 |
|---|---|
| 年龄 | young, teenage, adult, middle-aged, elderly |
| 性别 | man, woman, boy, girl, child |
| 发型 | long hair, short hair, curly hair, straight hair, ponytail |
| 发色 | black hair, blonde hair, brown hair, red hair, silver hair |
| 眼睛 | blue eyes, green eyes, brown eyes, hazel eyes |
| 表情 | smiling, serious, laughing, thoughtful, surprised |
| 服装 | casual wear, formal suit, dress, uniform, traditional clothing |
场景描述
模板:
[地点] + [时间] + [天气] + [光线]示例:
ancient temple, sunset, clear sky, golden hour lighting常用词汇:
| 类别 | 词汇 |
|---|---|
| 地点 | forest, beach, mountain, city, castle, garden |
| 时间 | sunrise, sunset, noon, midnight, dawn |
| 天气 | sunny, rainy, snowy, foggy, cloudy |
| 光线 | natural light, studio lighting, cinematic lighting, volumetric lighting |
物体描述
模板:
[物品名称] + [材质] + [颜色] + [风格]示例:
vintage camera, metal body, black color, retro style🎨 风格关键词
摄影风格
photorealistic, photography, portrait photography,
commercial photography, fashion photography,
street photography, landscape photography艺术风格
| 风格 | 关键词 |
|---|---|
| 油画 | oil painting, impasto, textured brushstrokes |
| 水彩 | watercolor, transparent, soft edges |
| 素描 | pencil sketch, graphite, monochrome |
| 数字艺术 | digital art, digital painting, concept art |
| 像素艺术 | pixel art, 8-bit, 16-bit, retro game |
| 赛博朋克 | cyberpunk, neon, futuristic, sci-fi |
| 蒸汽波 | vaporwave, aesthetic, retro, 80s |
| 极简主义 | minimalism, simple, clean, geometric |
大师风格
in the style of Van Gogh(梵高风格)
in the style of Picasso(毕加索风格)
in the style of Monet(莫奈风格)
in the style of Da Vinci(达芬奇风格)渲染风格
3D render, octane render, unreal engine 5,
blender render, cinema 4D, ray tracing,
global illumination, subsurface scattering⚖️ 权重控制技巧
基本语法
| 语法 | 效果 | 示例 |
|---|---|---|
(word) | 权重 ×1.1 | (cat) |
(word:1.5) | 权重 ×1.5 | (cat:1.5) |
[word] | 权重 ×0.9 | [cat] |
(word:0.5) | 权重 ×0.5 | (cat:0.5) |
权重范围参考
| 权重值 | 效果 | 适用场景 |
|---|---|---|
| 0.3-0.5 | 轻微影响 | 背景元素 |
| 0.6-0.8 | 正常强调 | 一般特征 |
| 0.9-1.2 | 标准权重 | 主体描述 |
| 1.3-1.5 | 强烈强调 | 核心特征 |
| 1.6-2.0 | 极端强调 | 慎用,易崩坏 |
实战示例
示例 1:强调眼睛颜色
portrait of a woman, (blue eyes:1.4), black hair示例 2:弱化背景
warrior in battlefield, (detailed armor:1.3), [blurry background:0.6]示例 3:多重权重
(girl:1.2), (long hair:1.1), (blue dress:1.3), [crowd:0.5]🔀 组合与交替
AND 组合
语法: 使用 AND 连接多个概念
beautiful garden AND sunset AND cherry blossoms效果: 平等融合所有元素
交替提示词
语法: [word1:word2:step]
[cat:dog:0.5]
(前 50% 步数用 cat,后 50% 用 dog)效果: 融合两个概念的特征
🚫 负向提示词
什么是负向提示词?
告诉 AI 不想要 什么内容。
通用负向词
ugly, duplicate, morbid, mutilated,
poorly drawn, bad anatomy, wrong anatomy,
extra limbs, missing limbs, deformed,
disfigured, bad proportions, blurry,
low quality, worst quality, watermark,
signature, text, username, error针对人像的负向词
bad hands, mutated hands, missing fingers,
extra fingers, bad feet, mutated feet,
cross-eyed, malformed eyes, asymmetrical face针对风景的负向词
distorted perspective, warped buildings,
unnatural colors, oversaturated,
jpeg artifacts, compression artifacts📐 提示词长度控制
最佳长度
| 长度 | 效果 | 推荐度 |
|---|---|---|
| 10-30 词 | 简洁明确 | ⭐⭐⭐⭐⭐ |
| 30-50 词 | 细节丰富 | ⭐⭐⭐⭐ |
| 50-80 词 | 过度描述 | ⭐⭐ |
| 80+ 词 | 混乱冲突 | ⭐ |
长度优化技巧
❌ 冗长版本:
a very beautiful and amazing portrait of a gorgeous young woman
who has long flowing black hair and stunning blue eyes and she
is wearing a beautiful white dress and standing in a beautiful
garden with many colorful flowers and it is a sunny day with
beautiful sunlight shining down on her face✅ 精简版本:
portrait of beautiful young woman, long black hair, blue eyes,
white dress, standing in flower garden, sunny day, sunlight🎯 高质量提示词模板
人像摄影模板
[portrait/close-up/full body] of [subject],
[physical features], [expression], [clothing],
[environment], [lighting],
photorealistic, [camera/lens],
masterpiece, best quality, 8k填充示例:
close-up portrait of a young woman,
asian, long wavy hair, green eyes, gentle smile,
wearing casual sweater,
indoor, natural window light,
photorealistic, 85mm lens,
masterpiece, best quality, 8k风景摄影模板
[landscape/seascape/cityscape],
[main subject], [foreground], [background],
[time of day], [weather], [season],
[lighting conditions],
photorealistic, wide angle,
masterpiece, best quality, 8k填充示例:
landscape, mountain lake,
pine trees in foreground, snow peaks in background,
sunrise, clear sky, autumn,
golden hour lighting,
photorealistic, wide angle lens,
masterpiece, best quality, 8k艺术创作模板
[subject], [action/pose],
[environment/background],
[art style], [artist reference],
[medium/technique],
[quality words]填充示例:
fantasy warrior, dynamic pose,
ancient ruins background,
digital art, in style of Greg Rutkowski,
concept art, dramatic lighting,
masterpiece, highly detailed, 8k产品设计模板
product photography, [product name],
[material], [color], [style],
[perspective/view],
[background], [lighting],
commercial photography, studio lighting,
highly detailed, 8k填充示例:
product photography, wireless headphones,
matte black plastic, minimalist design,
45 degree angle view,
white background, soft studio lighting,
commercial photography,
highly detailed, 8k🔧 提示词调试技巧
问题诊断流程
图像有问题?
│
├─ 主体不像 → 增加主体描述权重
├─ 细节模糊 → 增加质量词,提高 Steps
├─ 风格不对 → 更换风格关键词
├─ 构图混乱 → 简化提示词
└─ 颜色暗淡 → 添加颜色相关词迭代优化法
第 1 版(基础):
a cat sitting on a bench第 2 版(加细节):
a fluffy cat, orange fur, green eyes,
sitting on wooden bench, garden background第 3 版(加风格):
a fluffy cat, orange fur, green eyes,
sitting on wooden bench, garden background,
sunny day, photorealistic, highly detailed第 4 版(加质量):
a fluffy cat, orange fur, green eyes,
sitting on wooden bench, garden background,
sunny day, natural lighting,
photorealistic, 8k, masterpiece, best quality📊 提示词效果对比
基础版 vs 优化版
| 版本 | 提示词 | 效果 |
|---|---|---|
| 基础版 | a woman | 模糊,随机 |
| 进阶版 | portrait of a beautiful woman, long hair, smiling | 清晰,有细节 |
| 专业版 | close-up portrait of a beautiful young woman, long wavy black hair, green eyes, gentle smile, wearing white sweater, natural window lighting, photorealistic, 85mm, masterpiece, 8k | 精细,高质量 |
🎓 提示词学习资源
提示词库
| 网站 | 网址 | 特点 |
|---|---|---|
| PromptHero | https://prompthero.com/ | 最大提示词库 |
| Civitai | https://civitai.com/ | 带模型和预览 |
| OpenArt | https://openart.ai/ | 可搜索和复制 |
提示词生成工具
| 工具 | 网址 | 功能 |
|---|---|---|
| Prompt Generator | 内置于 WebUI | 基础生成 |
| Danbooru 标签 | https://danbooru.donmai.us/ | 动漫标签 |
| Phraser | https://phraser.tech/ | AI 辅助生成 |
📝 常见问题
Q1: 提示词越长越好吗?
答案: 不是。30-50 词最佳,过长会导致 AI 困惑。
Q2: 为什么加了质量词还是模糊?
可能原因:
- Steps 太低(建议 25-35)
- 模型本身质量有限
- 分辨率太低(建议 512x512 以上)
- 采样器不合适
Q3: 中英文提示词哪个更好?
答案: 英文更好。模型主要用英文训练,理解更准确。
Q4: 如何保存和管理提示词?
建议:
- 使用 WebUI 的"Save prompt"功能
- 建立提示词文档(按场景分类)
- 使用 PNG Info 从生成图中提取
- 收藏优质提示词到笔记软件
📖 下一章预告
- 图生图基础操作
- 重绘强度调节
- 局部重绘技巧
- 图像扩展(Outpainting)
本教程持续更新中 | 2026-03-26
