返回博客
教程指南
AI专家
2024-12-12
12分钟

提示词工程完全指南:从新手到专家

提示词教程AI生成技巧
提示词工程完全指南:从新手到专家

什么是提示词工程?

提示词工程(Prompt Engineering)是指设计和优化输入给AI模型的文本描述,以获得期望输出结果的技术和艺术。在AI图像生成中,一个好的提示词可以决定生成图像的质量和准确性。

基础提示词结构

一个有效的提示词通常包含以下要素:

1. 主体描述

明确描述你想要生成的主要对象:

  • "一只橙色的猫" - 基础描述
  • "一只毛茸茸的橙色长毛猫" - 添加细节
  • "一只坐着的毛茸茸橙色长毛猫,绿色眼睛" - 更多细节

2. 环境和背景

描述场景和环境:

  • "在花园里"
  • "在阳光明媚的花园里"
  • "在春天阳光明媚的玫瑰花园里"

3. 艺术风格

指定你想要的艺术风格:

  • 写实风格:photorealistic, realistic, photography
  • 绘画风格:oil painting, watercolor, digital art
  • 动漫风格:anime, manga, cartoon
  • 艺术家风格:in the style of Van Gogh, Picasso-inspired

4. 技术参数

添加技术细节提升质量:

  • 质量词:high quality, detailed, sharp focus
  • 光线:soft lighting, dramatic lighting, golden hour
  • 构图:close-up, wide shot, bird's eye view
  • 相机设置:shallow depth of field, bokeh

高级提示词技巧

1. 权重控制

使用括号来强调重要元素:

  • (beautiful) - 轻微强调
  • ((beautiful)) - 中等强调
  • (beautiful:1.2) - 数值控制强调程度

2. 负面提示词

告诉AI你不想要什么:

  • blurry, low quality, distorted
  • extra limbs, deformed, ugly
  • text, watermark, signature

3. 组合技巧

使用AND、OR等逻辑连接词:

  • "red rose AND blue background"
  • "cat OR dog in the garden"

不同类型图像的提示词模板

人物肖像

[年龄] [性别] [外貌特征], [表情], [服装], [姿势], [背景], [光线], [艺术风格], [质量词]
      
示例:
"young woman, smiling, long brown hair, wearing white dress, sitting in garden, soft natural lighting, portrait photography, high quality, detailed"

风景摄影

[地点/场景] [时间] [天气] [颜色调调] [构图] [艺术风格] [质量词]
      
示例:
"mountain landscape, sunset, golden hour, warm colors, wide shot, landscape photography, highly detailed, sharp focus"

概念艺术

[概念/主题] [风格] [颜色方案] [情绪] [技术细节] [质量词]
      
示例:
"futuristic city, cyberpunk style, neon colors, dark atmosphere, digital art, concept art, highly detailed"

常见问题和解决方案

问题1:生成的图像不够清晰

解决方案:

  • 添加质量词:high resolution, sharp focus, detailed
  • 使用负面提示词:blurry, low quality, pixelated

问题2:颜色不符合预期

解决方案:

  • 明确指定颜色:bright red, deep blue, warm golden
  • 使用色彩理论词汇:monochromatic, complementary colors

问题3:构图不理想

解决方案:

  • 指定构图类型:close-up, medium shot, wide angle
  • 使用摄影术语:rule of thirds, centered composition

提示词优化流程

步骤1:基础版本

从简单的描述开始:

"cat in garden"

步骤2:添加细节

逐步添加更多信息:

"orange cat sitting in flower garden"

步骤3:风格化

添加艺术风格和质量词:

"orange cat sitting in flower garden, photography, natural lighting, high quality"

步骤4:精细调整

根据结果进行微调:

"fluffy orange cat sitting peacefully in blooming flower garden, soft natural lighting, shallow depth of field, professional photography, highly detailed, sharp focus"

实用提示词库

质量提升词汇

  • high quality, highly detailed, sharp focus
  • professional, masterpiece, award-winning
  • 8k resolution, ultra-detailed, photorealistic

光线效果

  • soft lighting, dramatic lighting, rim lighting
  • golden hour, blue hour, studio lighting
  • volumetric lighting, ambient lighting

艺术风格

  • photography: portrait, landscape, street, macro
  • painting: oil painting, watercolor, acrylic, digital art
  • illustration: vector art, concept art, character design

结语

掌握提示词工程需要时间和练习。记住,最好的提示词是能够准确传达你想法的提示词。不断实验、学习和改进,你将能够创造出令人惊艳的AI艺术作品。

在RaphaelAI平台上,你可以自由实验各种提示词技巧,探索AI艺术的无限可能。开始你的创作之旅吧!

分享这篇文章:
12分钟阅读

相关文章