Prompt¶
Prompt 语法总结¶
cf: https://zhuanlan.zhihu.com/p/619247417
分割符号 使用逗号 , 用于分割词缀,且有一定权重排序功能,逗号前权重高,逗号后权重低。例:girl, beautiful
建议的通用范式 建议用以下归类的三大部分来准备相关提示词 前缀(画质词+画风词+镜头效果+光照效果) + 主体(人物&对象+姿势+服装+道具) + 场景(环境+细节)
更改提示词权重 使用小括号()增加模型对被括住提示词的注意 (提高权重)。
一般流程:先把要描述的画面写下生成一次,根据生成结果边试边改不满意或遗漏的描述,要强调的概念用 (xxx: 1.x ) 语法形式来提升权重,其中 xxx 是你要强调的词 1.x 代表要提升的比例,如 1.5 就是提升 150% 的权重。权重取值范围 0.4-1.6,权重太小容易被忽视,太大容易拟合图像出错。例:(beautiful:1.3) 。叠加权重:通过叠加小括号方式提高权重,每加一层相当于提高1.1倍权重,例:((((beautiful eyes)))) 。
各种权重类语法公式明细:
(PromptA:权重):用于提高或降低该提示词的权重比例,注:数值大于1提高,小于1降低
(PromptB):PromptB的权重为1.1=(PromptA:1.1)
{PromptC}: PromptC的权重为1.05=(PromptB:1.05)
[PromptD]: PromptD的权重减弱0.952=(PromptC:0.952)
((PromptE))=(PromptE:1.1*1.1)
{{PromptF}}=(PromptF:1.05*1.05)
[[PromptG]]=(PromptG:0.952*0.952)
调取 LoRA & Hypernetworks 模型 使用尖括号 <> 调取LoRA或超网络模型。 按照下述形式输入:lora:filename:multiplier 或 hypernet:filename:multiplier 可调取相应模型,例:lora:cuteGirlMix4_v10:0.5 。 注:要先确保在【…\models\lora】或【…\models\hypernetworks】文件夹已保存好相关模型文件。
分布与交替渲染 使用方框号 [] 可应用较为复杂的分布与交替需求。
[A:B:step] 代表执行A效果到多少进度,然后开始执行B。例:[blue:red:0.4],渲染蓝色到40%进度渲染红色。注:step > 1 时表示该组合在前多少步时做为 A 渲染,之后作为 B 渲染。step < 1 时表示迭代步数百分比。 [A:0.5] 这样写的含义是从50%进度开始渲染A [A::step] 渲染到多少进度的时候去除A [A|B] A和B交替混合渲染 6. 反向提示词 反向提示词(Negative prompt),就是我们不想出现什么的描述。例:NSFW 不适合在工作时看的内容,包括限制级,还有低画质相关和一些容易变形身体部位的描述等。 注:在C站可下载一个叫 Easynegative 的文件,它的作用是把一些常用的反向提示词整合在一起了,让我们只需输入简单的关键词就能得到较好效果。把它放到 xxx/enbeddings 文件夹,需要触发时在 negative prompt 中输入 easynegative 即可生效。
一些注意说明 AI 会按照 prompt 提示词输入的先后顺序和所分配权重来执行去噪工作; AI 也会依照概率来选择性执行,如提示词之间有冲突,AI 会根据权重确定的概率来随机选择执行哪个提示词。 越靠前的 Tag 权重越大;比如景色Tag在前,人物就会小,相反的人物会变大或半身。 生成图片的大小会影响 Prompt 的效果,图片越大需要的 Prompt 越多,不然 Prompt 会相互污染。 Prompt 支持使用 emoji,且表现力较好,可通过添加 emoji 图来达到效果。如 形容喜欢表情, 可修手。 连接符号,使用 +, and, |, _ 都可连接描述词,但各自细节效果有所不同。
https://rom1504.github.io/clip-retrieval
Summary¶
分割符号¶
使用逗号 , 用于分割词缀,且有一定权重排序功能,逗号前权重高,逗号后权重低。例:girl, beautiful
通用范式¶
建议用以下归类的三大部分来准备相关提示词 前缀(画质词+画风词+镜头效果+光照效果) + 主体(人物&对象+姿势+服装+道具) + 场景(环境+细节)
(subject)(style), (action/scene), (artist), (filters)
Following this basic rule you will be able to generate some descent images.
(subject) This is the basic building block of any prompt. The so called raw prompt. Ex: a black horse.
(style) Style is a crucial part of the prompt. The AI, when missing a specified style, usually chooses the one it has seen the most in related images, for example, if I generated landscape, it would probably generate realistic or oil painting looking images. Having a well chosen style + raw prompt is sometimes enough, as the style influences the image the most right after the raw prompt.
(action/scene) The action describes what the subject is actually doing and the scene describes where. Example: jumping in the forest
(filters) Filters are the extra sauce that you add to your prompt to make it look like you want. For instance, if you want to make your image more artistic, add “trending on artstation”. If you want to add more realistic lighting add “Unreal Engine.” You can be creative and add any filter that you want, but here are some examples:
Highly detailed, surrealism, trending on art station, triadic color scheme, smooth, sharp focus, matte, elegant, the most beautiful image ever seen, illustration, digital paint, dark, gloomy, octane render, 8k, 4k, washed colours, sharp, dramatic lighting, beautiful, post processing, picture of the day, ambient lighting, epic composition
Here is the final example using this basic rule:
realistic art of a black horse, in the forest, by marc simonetti, fog, centered, symmetry, painted, intricate, volumetric lighting, beautiful, rich deep colours, masterpiece, sharp focus, ultra detailed, 4k
example¶
更改提示词权重¶
使用小括号()增加模型对被括住提示词的注意 (提高权重)。
一般流程:先把要描述的画面写下生成一次,根据生成结果边试边改不满意或遗漏的描述,要强调的概念用 (xxx: 1.x) 语法形式来提升权重,其中 xxx 是你要强调的词 1.x 代表要提升的比例,如 1.5 就是提升 150% 的权重。权重取值范围 0.4-1.6,权重太小容易被忽视,太大容易拟合图像出错。例:(beautiful:1.3) 。叠加权重:通过叠加小括号方式提高权重,每加一层相当于提高1.1倍权重,例:((((beautiful eyes)))) 。
各种权重类语法公式明细:
(PromptA:weight):用于提高或降低该提示词的权重比例,注:数值大于1提高,小于1降低
(PromptB):PromptB的权重为1.1=(PromptA:1.1)
{PromptC}: PromptC的权重为1.05=(PromptB:1.05)
[PromptD]: PromptD的权重减弱0.952=(PromptC:0.952)
((PromptE)=(PromptE:1.1*1.1)
{{PromptF}}=(PromptF:1.05*1.05)
[[PromptG]]=(PromptG:0.952*0.952)
调取 LoRA & Hypernetworks 模型¶
使用尖括号 <> 调取LoRA或超网络模型。
按照下述形式输入:lora:filename:multiplier 或 hypernet:filename:multiplier 可调取相应模型,例:lora:cuteGirlMix4_v10:0.5 。
要先确保在webui/models/lora或webui/models/hypernetworks文件夹已保存好相关模型文件。
分布与交替渲染¶
使用方框号 [] 可应用较为复杂的分布与交替需求。
[A:B:step] 代表执行A效果到多少进度,然后开始执行B。例:[blue:red:0.4],渲染蓝色到40%进度渲染红色。注:step > 1 时表示该组合在前多少步时做为 A 渲染,之后作为 B 渲染。step < 1 时表示迭代步数百分比。
[A:0.5] 这样写的含义是从50%进度开始渲染A
[A::step] 渲染到多少进度的时候去除A
[A|B] A和B交替混合渲染
反向提示词¶
反向提示词(Negative prompt),就是我们不想出现什么的描述。例:NSFW 不适合在工作时看的内容,包括限制级,还有低画质相关和一些容易变形身体部位的描述等。 注:在C站可下载一个叫 Easynegative 的文件,它的作用是把一些常用的反向提示词整合在一起了,让我们只需输入简单的关键词就能得到较好效果。把它放到 xxx/enbeddings 文件夹,需要触发时在 negative prompt 中输入 easynegative 即可生效。
Note
SD 会按照 prompt 提示词输入的先后顺序和所分配权重来执行去噪工作;
SD 也会依照概率来选择性执行,如提示词之间有冲突,AI 会根据权重确定的概率来随机选择执行哪个提示词。
越靠前的 Tag 权重越大;比如景色Tag在前,人物就会小,相反的人物会变大或半身。
生成图片的大小会影响 Prompt 的效果,图片越大需要的 Prompt 越多,不然 Prompt 会相互污染。
Prompt 支持使用 emoji,且表现力较好,可通过添加 emoji 图来达到效果。如 形容喜欢表情, 可修手。
连接符号,使用 +, and, |, _ 都可连接描述词,但各自细节效果有所不同。
Example¶
(8k, best quality, masterpiece:1.3), (realistic, photo-realistic:1.47), (highly detailed), original, extremely detailed wallpaper, solo, (beautiful detailed eyes), 1girl, lying on a pool at night, (surrounded by the shimmering water), (illuminated by soft and dim pool lights), (blurred background with a mix of vibrant and colorful lights), (wearing stylish swimsuit), (relaxed and content expression), (dramatic and moody atmosphere), (realistic and immersive lighting and background), (sense of tranquility and peace). <lora:japaneseDollLikeness_v10:0.3> <lora:koreanDollLikeness_v10:0.2>
Negative prompt: EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,strange fingers,bad hand,signature, watermark, username, blurry, bad feet,bad leg, duplicate, extra limb, ugly, disgusting, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blurry,mutated hands and fingers,, EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,strange fingers,bad hand,signature, watermark, username, blurry, bad feet, bad leg, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (outdoor:1.6), manboobs, backlight,(ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (more than 2 nipples:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), bad hands, missing fingers, extra digit, (futa:1.1), bad body, NG_DeepNegative_V1_75T,pubic hair, glans,
Size: 720x720, Seed: 2712508812, Model: Chilloutmix-Ni-pruned-fp32-fix, Steps: 30, Sampler: DPM++ 2M Karras, CFG scale: 7, Model hash: fc2511737a, Face restoration: CodeFormer
(8k, best quality, masterpiece:1.3), (realistic, photo-realistic:1.47), (highly detailed), original, extremely detailed wallpaper, solo, (beautiful detailed eyes), 1girl, lying on a pool at night, (surrounded by the shimmering water), (illuminated by soft and dim pool lights), (blurred background with a mix of vibrant and colorful lights), (wearing stylish swimsuit), (relaxed and content expression), (dramatic and moody atmosphere), (realistic and immersive lighting and background), (sense of tranquility and peace). <lora:japaneseDollLikeness_v10:0.3> <lora:koreanDollLikeness_v10:0.2>
Negative prompt: EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,strange fingers,bad hand,signature, watermark, username, blurry, bad feet,bad leg, duplicate, extra limb, ugly, disgusting, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blurry,mutated hands and fingers,, EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,strange fingers,bad hand,signature, watermark, username, blurry, bad feet, bad leg, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (outdoor:1.6), manboobs, backlight,(ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (more than 2 nipples:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), bad hands, missing fingers, extra digit, (futa:1.1), bad body, NG_DeepNegative_V1_75T,pubic hair, glans,
Size: 720x720, Seed: 2712508824, Model: Chilloutmix-Ni-pruned-fp32-fix, Steps: 30, Sampler: DPM++ 2M Karras, CFG scale: 7, Model hash: fc2511737a, Face restoration: CodeFormer
((film grain:1.3)), (skin spots:1.1), (acnes:1.1), (fantasy breasts), embarrassed, 30yo, 30 years old, ((1 girl)), ((1woman)), ((solo)), (8k, RAW photo, best quality, masterpiece:1.2),(realistic, photo-realistic:1.37), detailed beautiful face,(8k, RAW photo, best quality, masterpiece:1.2), (8k, best quality, masterpiece:1.2), (realistic, photo-realistic:1.37), (photorealistic:1.4), (soft focus:1.4), (sharp focus:1.4), <lora:koreanDollLikeness_v10:0.2>(8k, best quality, masterpiece:1.2), (realistic, photo-realistic:1.37), ultra-detailed, 1 girl,cute, solo,beautiful detailed sky,detailed cafe,night,sitting,dating,(nose blush),(smile:1.15),(closed mouth) small breasts,beautiful detailed eyes,(collared shirt:1.1), night, wet,business attire, rain,black lace, (short hair:1.2),floating hair NovaFrogStyle, cyber, future, <lora:koreanDollLikeness_v15:1>
Negative prompt: :paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, (outdoor:1.6), manboobs, backlight,(ugly:1.331), (duplicate:1.331), (morbid:1.21), (mutilated:1.21), (tranny:1.331), mutated hands, (poorly drawn hands:1.331), blurry, (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (more than 2 nipples:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), bad hands, missing fingers, extra digit, (futa:1.1), bad body, NG_DeepNegative_V1_75T,pubic hair, glans
ENSD: 31337, Size: 512x768, Seed: 1964774414, Model: chilloutmix_Ni, Steps: 35, Sampler: DDIM, CFG scale: 7.5, Clip skip: 2, Model hash: 7234b76e42, Hires steps: 10, Hires upscale: 2, Hires upscaler: R-ESRGAN 4x+ Anime6B, Denoising strength: 0.6
<lora:koreanDollLikeness_v10:0.3>,<lora:taiwanDollLikeness_v10:0.2>(8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.37), ultra-detailed,
1 girl,cute, solo,beautiful detailed sky,detailed tokyo street,night,
medium breasts,beautiful detailed eyes,(collared shirt:1.1), bowtie,pleated skirt,(short hair:1.2),floating hair
Negative prompt: EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,(watermark:1.2),(white letters:1/1)
ENSD: 31337, Size: 448x768, Seed: 2502215021, Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Clip skip: 2, Model hash: 7234b76e42, Hires steps: 15, Hires upscale: 2, Hires upscaler: Latent (nearest), Denoising strength: 0.7