提示词工程 #
提示词的重要性 #
提示词是与 AI 模型沟通的主要方式,好的提示词能够精确控制生成结果。
text
┌─────────────────────────────────────────────────────────────┐
│ 提示词的重要性 │
├─────────────────────────────────────────────────────────────┤
│ │
│ 差的提示词: │
│ "girl" │
│ → 随机生成,结果不可控 │
│ │
│ 一般的提示词: │
│ "a beautiful girl, anime style" │
│ → 有一定控制,但细节不足 │
│ │
│ 好的提示词: │
│ "a beautiful young girl with long silver hair, │
│ blue eyes, wearing white dress, standing in flower │
│ garden, soft sunlight, anime style, highly │
│ detailed, masterpiece, best quality" │
│ → 精确控制,高质量输出 │
│ │
└─────────────────────────────────────────────────────────────┘
提示词结构框架 #
基本结构 #
一个完整的提示词通常包含以下部分:
text
┌─────────────────────────────────────────────────────────────┐
│ 提示词结构模板 │
├─────────────────────────────────────────────────────────────┤
│ │
│ [主体] + [细节描述] + [环境/背景] + [风格] + [技术参数] │
│ │
│ 各部分说明: │
│ │
│ 主体(必需) │
│ ├── 核心内容 │
│ ├── 放在开头 │
│ └── 例: a girl, a cat, a landscape │
│ │
│ 细节描述 │
│ ├── 外观特征 │
│ ├── 动作姿态 │
│ └── 例: long hair, blue eyes, smiling │
│ │
│ 环境/背景 │
│ ├── 场景设置 │
│ ├── 光线条件 │
│ └── 例: in a forest, sunset, studio lighting │
│ │
│ 风格 │
│ ├── 艺术风格 │
│ ├── 参考艺术家 │
│ └── 例: anime style, oil painting, by Greg Rutkowski │
│ │
│ 技术参数 │
│ ├── 质量词 │
│ ├── 分辨率词 │
│ └── 例: masterpiece, 4k, highly detailed │
│ │
└─────────────────────────────────────────────────────────────┘
提示词模板 #
text
人物肖像模板:
┌─────────────────────────────────────────────────────────────┐
│ [数量] [主体] [年龄] [性别], │
│ [面部特征], [发型发色], [眼睛颜色], │
│ [服装], [姿势], [表情], │
│ [背景], [光线], │
│ [风格], [质量词] │
│ │
│ 示例: │
│ a young woman, beautiful face, long blonde hair, │
│ blue eyes, wearing white dress, standing pose, │
│ gentle smile, in a garden, soft sunlight, │
│ photorealistic, 8k, masterpiece │
└─────────────────────────────────────────────────────────────┘
风景场景模板:
┌─────────────────────────────────────────────────────────────┐
│ [场景类型], [主要元素], │
│ [天气/时间], [光线], │
│ [氛围], [视角], │
│ [风格], [质量词] │
│ │
│ 示例: │
│ mountain landscape, snow-capped peaks and pine forest, │
│ golden hour, dramatic clouds, │
│ peaceful atmosphere, wide angle view, │
│ photorealistic, 8k, highly detailed │
└─────────────────────────────────────────────────────────────┘
主体描述技巧 #
人物描述 #
text
人物描述要素:
1. 基本属性
├── 数量: a, one, two, group of
├── 性别: man, woman, boy, girl
├── 年龄: young, old, middle-aged, child
└── 种族: asian, caucasian, african
2. 外观特征
├── 发型: long hair, short hair, curly hair, ponytail
├── 发色: blonde, black, brown, red, silver, pink
├── 眼睛: blue eyes, green eyes, brown eyes
└── 皮肤: pale skin, tan skin, dark skin
3. 服装
├── 上装: t-shirt, dress, jacket, blouse
├── 下装: jeans, skirt, shorts, pants
├── 风格: casual, formal, sporty, elegant
└── 配饰: glasses, hat, jewelry, scarf
4. 姿势和动作
├── 站姿: standing, leaning, walking
├── 坐姿: sitting, kneeling, crouching
├── 动作: reading, running, dancing
└── 表情: smiling, serious, sad, happy
示例组合:
a young woman with long silver hair and blue eyes,
wearing elegant white dress, standing in a garden,
gentle smile, soft lighting
场景描述 #
text
场景描述要素:
1. 场景类型
├── 自然: forest, mountain, beach, desert
├── 城市: city, street, building, park
├── 室内: room, office, cafe, library
└── 虚构: fantasy world, sci-fi city
2. 时间和天气
├── 时间: morning, noon, sunset, night
├── 天气: sunny, cloudy, rainy, snowy
└── 特殊: golden hour, blue hour, stormy
3. 光线
├── 自然光: sunlight, moonlight, ambient light
├── 人工光: studio lighting, neon lights
└── 氛围光: dramatic lighting, soft lighting
4. 氛围
├── 情绪: peaceful, mysterious, dramatic
├── 风格: cozy, futuristic, vintage
└── 感觉: warm, cold, bright, dark
示例组合:
ancient forest with tall trees and moss-covered rocks,
morning mist, soft sunlight filtering through leaves,
peaceful atmosphere, magical feeling
风格控制 #
艺术风格 #
text
常见艺术风格:
绘画风格:
├── oil painting(油画)
├── watercolor(水彩)
├── acrylic painting(丙烯画)
├── sketch(素描)
├── charcoal drawing(炭笔画)
└── pastel drawing(粉笔画)
数字艺术:
├── digital art(数字艺术)
├── concept art(概念艺术)
├── illustration(插画)
├── digital painting(数字绘画)
└── matte painting(遮罩绘画)
摄影风格:
├── photograph(照片)
├── portrait photography(肖像摄影)
├── cinematic(电影感)
├── photorealistic(照片级真实)
└── film grain(胶片颗粒)
动漫风格:
├── anime(动漫)
├── manga(漫画)
├── chibi(Q版)
├── anime style(动漫风格)
└── studio ghibli style(吉卜力风格)
艺术家参考 #
text
使用艺术家名字控制风格:
写实主义:
├── by Greg Rutkowski
├── by Artgerm
├── by WLOP
└── by Ilya Kuvshinov
印象派:
├── by Claude Monet
├── by Vincent van Gogh
└── by Pierre-Auguste Renoir
现代艺术:
├── by Pablo Picasso
├── by Salvador Dali
└── by Andy Warhol
使用方式:
a beautiful landscape, oil painting, by Claude Monet
a portrait, digital art, by WLOP
风格组合 #
text
风格组合技巧:
1. 主风格 + 子风格
anime style, watercolor texture
(动漫风格 + 水彩质感)
2. 风格 + 参考艺术家
digital art, by Artgerm
(数字艺术 + Artgerm 风格)
3. 多风格混合
mix of anime and realistic style
(动漫与写实风格混合)
4. 风格强度控制
(anime style:1.3), (realistic:0.7)
(增强动漫风格,减弱写实)
质量词与修饰词 #
质量词 #
text
常用质量词:
基础质量词:
├── best quality
├── high quality
├── masterpiece
├── ultra detailed
└── highly detailed
分辨率词:
├── 4k
├── 8k
├── ultra HD
├── highres
└── UHD
细节词:
├── intricate details
├── fine details
├── sharp focus
├── detailed background
└── detailed face
推荐组合:
best quality, masterpiece, ultra detailed, 8k, highres
光线修饰词 #
text
光线效果:
自然光:
├── natural lighting
├── sunlight
├── soft lighting
├── golden hour
├── blue hour
└── dappled sunlight
戏剧光:
├── dramatic lighting
├── cinematic lighting
├── volumetric lighting
├── rim lighting
└── backlighting
特殊光:
├── neon lights
├── bioluminescence
├── aurora borealis
└── moonlight
氛围修饰词 #
text
氛围效果:
情绪:
├── peaceful
├── mysterious
├── dramatic
├── romantic
├── melancholic
└── cheerful
视觉:
├── dreamy
├── ethereal
├── fantasy
├── magical
├── surreal
└── whimsical
负向提示词 #
负向提示词的作用 #
text
负向提示词功能:
1. 排除不想要的元素
├── 避免生成特定内容
└── 例: no text, no watermark
2. 改善图像质量
├── 去除常见缺陷
└── 例: blurry, low quality
3. 纠正解剖错误
├── 修复人物问题
└── 例: bad hands, extra fingers
4. 控制风格
├── 避免特定风格
└── 例: 3D, cartoon (如果想要写实)
通用负向提示词 #
text
通用负向提示词模板:
基础版:
ugly, low quality, worst quality, blurry
进阶版:
ugly, low quality, worst quality, blurry,
lowres, bad anatomy, bad hands,
missing fingers, extra fingers,
jpeg artifacts, signature, watermark
完整版:
ugly, low quality, worst quality, blurry,
lowres, bad anatomy, bad hands,
missing fingers, extra fingers, extra limbs,
disfigured, deformed, malformed,
jpeg artifacts, signature, watermark,
text, username, artist name,
cropped, out of frame
人物负向提示词 #
text
人物专用负向词:
面部:
├── bad face
├── deformed face
├── ugly face
├── double head
└── multiple faces
身体:
├── bad anatomy
├── bad proportions
├── deformed body
├── extra limbs
└── missing limbs
手部:
├── bad hands
├── malformed hands
├── missing fingers
├── extra fingers
├── too many fingers
└── fused fingers
推荐组合:
bad anatomy, bad hands, missing fingers,
extra fingers, deformed, disfigured
风格负向提示词 #
text
避免特定风格:
避免动漫风格(想要写实):
anime, cartoon, 3D, illustration, drawing
避免写实风格(想要动漫):
photorealistic, photograph, realistic, photo
避免特定元素:
text, watermark, signature, logo,
frame, border, caption
权重控制 #
权重语法 #
text
权重增强语法:
圆括号增强:
(word) # 权重 × 1.1
((word)) # 权重 × 1.21
(((word))) # 权重 × 1.331
数值指定:
(word:1.1) # 权重 × 1.1
(word:1.5) # 权重 × 1.5
(word:2.0) # 权重 × 2.0
权重减弱语法:
方括号减弱:
[word] # 权重 ÷ 1.1
[[word]] # 权重 ÷ 1.21
数值指定:
(word:0.9) # 权重 × 0.9
(word:0.5) # 权重 × 0.5
权重使用示例 #
text
权重应用场景:
1. 强调关键元素
a (beautiful:1.3) girl with (long:1.2) hair
# 强调美丽和长发
2. 减弱次要元素
a girl with [blue] eyes
# 蓝色眼睛不那么重要
3. 平衡多个元素
(girl:1.2) and (cat:1.2)
# 确保两个主体都出现
4. 风格控制
(anime style:1.4), (realistic:0.6)
# 强烈动漫风格,轻微写实
5. 避免过度
(detailed:1.1) 比 (detailed:2.0) 更自然
# 权重过高可能导致问题
权重建议 #
text
权重使用建议:
推荐权重范围:
├── 轻微增强: 1.1 - 1.2
├── 明显增强: 1.3 - 1.5
├── 强烈增强: 1.5 - 2.0
└── 过高风险: > 2.0
推荐权重范围:
├── 轻微减弱: 0.8 - 0.9
├── 明显减弱: 0.5 - 0.7
└── 几乎忽略: < 0.5
注意事项:
├── 权重过高可能导致图像失真
├── 多个高权重可能相互冲突
├── 建议逐步调整,观察效果
└── 不同模型对权重敏感度不同
高级技巧 #
提示词混合 #
text
混合两个提示词:
语法:[prompt1 : prompt2 : ratio]
示例:
[cat : dog : 0.5]
# 前 50% 步数使用 cat,后 50% 使用 dog
# 产生猫狗混合效果
[anime style : realistic : 0.3]
# 30% 动漫风格后转为写实
应用:
├── 风格过渡
├── 内容混合
└── 创意效果
提示词编辑 #
text
步数内编辑提示词:
语法:[from:to:when]
示例:
[red:blue:0.5] dress
# 前 50% 步数红色裙子,后 50% 蓝色
[cat:dog:10]
# 前 10 步用 cat,之后用 dog
应用:
├── 颜色变化
├── 形态变化
└── 风格变化
交替采样 #
text
交替使用多个词:
语法:[word1|word2]
示例:
[cat|dog]
# 每步交替使用 cat 和 dog
# 产生混合效果
[red|blue|green] dress
# 三种颜色交替
应用:
├── 多元素融合
├── 颜色混合
└── 创意效果
分段提示词 #
text
BREAK 关键字:
语法:prompt1 BREAK prompt2
作用:
├── 强制分段处理
├── 减少词语间干扰
└── 提高复杂提示词效果
示例:
a beautiful girl BREAK detailed background
# 分开处理人物和背景
应用:
├── 复杂场景
├── 多主体
└── 减少语义混淆
提示词模板库 #
人物模板 #
text
写实人物:
portrait of a [age] [gender], [hair], [eyes],
[expression], [clothing], [pose],
[background], [lighting],
photorealistic, 8k, highly detailed,
professional photography
动漫人物:
[age] [gender], [hair], [eyes],
[clothing], [pose], [expression],
[background],
anime style, highly detailed,
masterpiece, best quality
奇幻角色:
[character type], [features],
[clothing/armor], [accessories],
[pose], [background],
fantasy art, detailed, dramatic lighting
场景模板 #
text
自然风景:
[landscape type], [elements],
[time of day], [weather],
[lighting], [atmosphere],
photorealistic, 8k, highly detailed
城市景观:
[city type], [architecture],
[time], [weather],
[lighting], [mood],
photorealistic, cinematic, detailed
室内场景:
[room type], [furniture],
[style], [lighting],
[time of day],
photorealistic, detailed, cozy
下一步 #
掌握了提示词技巧后,继续学习:
最后更新:2026-04-05