TL;DR
本文档为SRE团队提供Midjourney AI图像生成的Prompt结构化与参数优化实践指南。核心内容包括:账号配置、基础Prompt构建、高级参数应用(如--ar, --style, --v等)以及风格调参策略。目标是标准化生成流程,提升图像产出效率与准确性。
1. 前置条件与环境配置
在进行Midjourney图像生成之前,确保以下条件已满足。
-
Midjourney账号注册与Discord集成
用户需拥有一个有效的Midjourney订阅。Midjourney服务主要通过Discord平台进行交互。确保已加入Midjourney官方Discord服务器。
# 访问Midjourney官网进行注册 https://www.midjourney.com/home # 接受Discord邀请 # Expected Output: Successful connection to Midjourney Bot on Discord. -
Discord频道选择
在Midjourney Discord服务器中,选择任一
#newbies频道或拥有Midjourney Bot权限的私有服务器频道进行操作。# 切换到指定频道 /imagine prompt: A simple testExpected Output: Midjourney Bot processes the request and returns a grid of four images.
2. Midjourney基础Prompt结构与参数应用
有效的Prompt是生成高质量图像的关键。本节将详细说明Prompt的结构化方法与常用参数。
-
基础Prompt构建
Prompt由主描述词、风格修饰词和技术参数组成。建议使用英文进行描述,以获得最佳效果。
/imagine prompt: <主描述词>, <风格修饰词>, <情绪/光照/构图> --<参数1> <值1> --<参数2> <值2>Example:
/imagine prompt: A futuristic cityscape at sunset, neon lights, cyberpunk aesthetic, highly detailed, dramatic lighting --ar 16:9 --v 5.2Expected Output: Four images of a futuristic cityscape matching the description, in 16:9 aspect ratio, generated with Midjourney V5.2.
-
核心参数解析与应用
掌握以下核心参数对于精细控制图像生成至关重要。
-
--ar <宽高比>: 设置图像的宽高比。# 示例: 16:9 电影宽屏 /imagine prompt: tranquil forest, misty, cinematic --ar 16:9Expected Output: Images with a 16:9 aspect ratio.
-
--v <版本号>: 指定Midjourney模型版本。不同版本有不同的风格和能力。最新的稳定版通常为默认。# 示例: 使用V5.2版本 /imagine prompt: abstract art, vibrant colors --v 5.2Expected Output: Images generated using Midjourney Model V5.2.
-
--style <风格值>: 控制图像的风格化程度。通常用于Niji模型或特定风格模型。# 示例: 动漫风格 /imagine prompt: cute anime character, fantasy adventurer --style rawExpected Output: Images with a 'raw' artistic style, less opinionated by Midjourney's default aesthetic.
Note:
--style raw在V5.2及更高版本中可用,可以减少Midjourney的默认美学偏好。 -
--seed <数字>: 指定种子值,用于复现特定图像的构图或元素。对于迭代优化非常有用。# 示例: 使用种子值12345 /imagine prompt: vintage car, city street, rain --seed 12345Expected Output: Images with a consistent initial noise pattern, allowing for better iterative refinement.
-
--chaos <0-100>: 调整结果的多样性。高值会生成更多不寻常、意想不到的结果。# 示例: 高混乱度 /imagine prompt: surreal landscape, floating islands --chaos 80Expected Output: Highly varied and potentially abstract interpretations of the prompt.
-
--s <0-1000>(或--stylize): 控制Midjourney默认美学风格的强度。高值会使图像更具“Midjourney风格”。# 示例: 强风格化 /imagine prompt: majestic castle, medieval times --s 750Expected Output: Images with strong Midjourney artistic qualities.
-
3. 高级风格调参与迭代优化
通过组合和迭代调整参数,可以实现更精细的风格控制。
-
权重分配 (Prompt Weighting)
使用
::来为Prompt中的不同部分分配权重,影响其在图像生成中的重要性。# 示例: 强调“cat”而非“dog” /imagine prompt: a cat::2 and a dog::1 playing in a parkExpected Output: Image where the cat is more prominent or detailed than the dog.
-
负面Prompt (Negative Prompting)
使用
--no参数来排除图像中不希望出现的元素。这是一个非常实用的Midjourney AI绘画技巧。# 示例: 排除红色 /imagine prompt: abstract painting, vibrant colors --no redExpected Output: Abstract painting with vibrant colors, explicitly avoiding the color red.
-
图像作为Prompt (Image Prompts)
通过提供图像URL作为Prompt的一部分,Midjourney会以该图像的构图或风格为参考进行生成。这是Midjourney怎么用的一个高级实践。
# 示例: 参考URL图像的风格 /imagine prompt: <image_url> a futuristic car, sleek design, high-tech --ar 16:9Expected Output: A futuristic car image influenced by the style or composition of the provided URL image.
Warning: 确保URL是直接指向图像文件的链接。
Note: 持续实验不同的Prompt组合和参数值是掌握Midjourney的关键。利用/settings命令可以查看当前模型版本和默认设置。
Version: V1.0
Date: 2024-05-25