News from this site

 Rental advertising space, please contact the webmaster if you need cooperation


+focus
focused

classification  

no classification

tag  

no tag

date  

no datas

AI绘图提示词/咒语/词缀/关键词使用指南(Stable Diffusion Prompt 设计师操作手册)

posted on 2023-06-06 11:39     read(198)     comment(0)     like(10)     collect(5)


Basic knowledge :

Advanced practice :

  1. AI drawing practice (1): making a shopping cart icon icon
  2. AI drawing practice (2): Make a picture book painting of the ocean, beach, boy and dog
  3. AI drawing actual combat (3): hand-drawn mech violent man
  4. AI drawing practice (4): related picture png and icon icon used in making food safety PPT
  5. AI drawing practice (5): Enlarge and restore old photos, mosaic photos, ID photos
  6. AI drawing practice (6): Make a poster to celebrate Labor Day
  7. AI drawing practice (7): interior design line draft rendering, landscape design hand draft modification, architectural photos to line draft
  8. AI drawing practice (8): three views of making game character manuscripts
  9. AI drawing practice (9): Make pictures for popular songs
  10. AI drawing practice (10): line draft vector diagram of a woman with a headscarf
  11. AI drawing practice (11): Modify paper children's drawings into electronic photos

1. Basic overview

If you have mastered the basics and want to directly find Chinese and English affixes, please turn to the prompt list in the fifth part of this article.
insert image description here

  • The prompt word ( prompt) consists of multiple affixes.
  • Prompts are divided into positive prompts ( positive prompt) and reverse prompts ( negative prompt), which are used to tell AI what is needed and what is not.

Reverse cues are descriptions of what we don't want to happen.
Example: NSFW content that is not suitable for watching at work, including restricted ratings, low-quality images, and descriptions of easily deformed body parts.
Note: You can download the file of Easynegative. It has integrated some commonly used reverse prompt words. We only need to input keywords to get better results.
Put it in /enbeddingsthe folder , and enter easynegativeactivation in the reverse prompt when it needs to be triggered.

  • The default value of the weight of the affix is ​​1, which is weakened from left to right, and the weight will affect the screen generation result.
    For example, if the scenery tag is in the front, the character will be small, and on the contrary, the character will become larger or half-length.
    Choosing the correct order and grammar to use the prompt words will show the desired picture better, faster and more efficiently.

Note that because the affixes are in English, we need to study many words in depth.
For example, the word running, running is the default word, and the alias is run, but if the model used in this article uses run, it will be almost invalid. See the first example in the weight article to understand.

  • AI will selectively execute according to probability. If there is a conflict between prompt words, AI will randomly choose which prompt word to execute according to the probability determined by the weight.
  • The size of the generated image will affect the effect of the prompt. The larger the image, the more prompts are needed, otherwise the prompts will pollute each other.
  • Prompt supports the use of emoji, and the expressiveness is better, and the effect can be achieved by adding emoji pictures. If you like the expression, you can repair your hands.

For ease of understanding, unrelated affixes can be distinguished by newlines.

  • This article is mainly to learn the changes in the graphs brought about by the changes of affixes. Different models generate different graphs. When learning, you need to observe the changes in the graphs under the same model.
  • The following are the main parameters for reference. Set a negative word when learning, and the rest can be defaulted.
// 参考
absurdres, 8k, comic, viewfinder, 1male, run, black hair, orange sun, blue sky,
Negative prompt: easynegative, canvas frame, cartoon, 3d, ((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((close up)),((b&w)), wierd colors, blurry, (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy, 3d render
Steps: 20, Sampler: Euler a, CFG scale: 22, Seed: -1, Face restoration: CodeFormer, Size: 720x480, Model hash: 1dceefec07, Model: dreamshaper_331BakedVae, Denoising strength: 0.5, Clip skip: 2, ENSD: 31337, Hires upscale: 2, Hires upscaler: Latent

2. Weight Grammar

weight logic

  • If you want to clarify a certain subject, you should make the generation steps forward, increase the number of generation steps, sort the affixes forward, and increase the weight.
    画面质量主要元素细节

  • If you want to clarify the style, the style affix should be better than the content affix
    画面质量风格元素细节

  • Unconfirmed: The style weight may need to be higher than the picture quality, so that the special style texture will not be polluted by the picture quality.

separator

  • , Comma : divides the affixes, and has a certain weight sorting function. The weight before the comma is high, and the weight after the comma is low, so it is recommended to sort:
  1. Summary (image quality + painting style + lens effects + lighting effects + theme + composition)
  2. Subject (character & object + pose + clothing + props)
  3. Details (scene + environment + accessories + features)

Example 1:

// 超高分辨率, 8k, 漫画风, 相机取景框,一个男子, 奔跑(动词原型), 黑色头发, 橙色太阳, 蓝色天空
absurdres, 8k, comic, viewfinder, 1male, run, black hair, orange sun, blue sky,

insert image description here
根据上面的提示出的图,各元素都出现了,但是并没有实现run这个关键词,除了第一张图左下角几个奔跑的人物外,第三张图更是人物都没有了。


举例二:

// 超高分辨率, 8k, 漫画风, 相机取景框, 一个男子, 奔跑(现在分词), 黑色头发, 橙色太阳, 蓝色天空
absurdres, 8k, comic, viewfinder, 1male, running, black hair, orange sun, blue sky,

insert image description here
而当我们把run改为running时,跑步的姿态就出来了~~。


组合符

  • : 冒号:自定义权重数值
    格式:左圆括号 + 词缀 + 冒号 + 数字 + 右圆括号
// 单人女孩词缀,权重为0.75
(1girl:0.75) 
  • () 仅圆括号:增加权重0.1
    大部分情况用圆括号即可。
// 权重乘以1.1
(1girl) 
  • {} 花括号:增加权重0.05
// 权重乘以1.05
{1girl}
  • [] 方括号:减少权重0.1,也有说是减弱0.05的
    方括号中无法自定义权重数值,自定义权重只能使用(x:0.5)形式。
// 权重除以1.1
[1girl] 
  • (()){{}}[[]] 复用括号:叠加权重
// 权重乘以1.1*1.1,即权重为1.21
((1girl))

一般流程:先把要描述的画面写下生成一次,根据生成结果边试边改不满意或遗漏的描述,要强调的概念用 (xxx: 1.x ) 语法形式来提升权重,其中 xxx 是你要强调的词,1.x 代表要提升的比例,如 1.5 就是提升 150% 的权重。
权重取值范围 0.4-1.6,权重太小容易被忽视,太大容易拟合图像出错。例:(beautiful:1.3)
叠加权重:通过叠加小括号方式提高权重,每加一层相当于提高1.1倍权重,例:((((beautiful eyes))))


举例三:
根据上一个例子的规则,增加跳跃,并且加强其权重,于是图像变了~~

// 跳跃的权重最高
(absurdres),  8k, comic, ((viewfinder)), 1male, running, (jumping:1.5), black hair, orange sun, blue sky,

insert image description here

看得出,人物有跑跳感,但跳感肯定是最强。


连接符

  • AND :将多个词缀聚合在一个提示词顺序位置中,其初始权重一致
// 三个词缀权重一致
bird and dog and pig

// 可使用冒号标记其权重
bird:1.5 and dog:1.2 and pig:0.8

实际使用时发现用and连接词缀,可能会出现物体合并的现象,比如白菜和肉,可能会生成一张白菜里包着肉的诡异图片。


举例四:
好,我们现在再将上面的案例改一下看看会有什么效果:

// 合并了绿色、白色、长发,要求加强绿色头发,橙色和蓝色天空合并,权重一致
absurdres,  8k, comic, [viewfinder], (1male), (running), (green hair:1.5 and white hair and very long hair), orange sun and blue sky,

insert image description here
由上图可以看出,主角头发一定为绿,但可能会有0~2个头发为白的人物出现在画面中,1male这条规则被打破;
橙色太阳和蓝色天空因为权重一致了,所以基本都会同时出现在画面中(看云:似乎AI想把橙色和蓝色都嵌入到其中,第三图似乎更是想生硬地把他们都捏在一起,而这种感觉在前几个例子的图片是没有的)。


  • + 加号
(red hair:1.1)+(yellow hair:1.25)+(green hair:1.4)
  • | 竖线
(red hair:1.1)|(yellow hair:1.25)|(green hair:1.4)
  • _ 下划线
(red hair:1.1)_(yellow hair:1.25)_(green hair:1.4)
  • 什么都不加

and词缀会出现物体合并,但在什么都不加,逗号情况下,这种合体可能性就很低了。

(red hair:1.1)(yellow hair:1.25)(green hair:1.4)
  • , 逗号
    对象一致时,逗号有连接的功能
(red hair:1.1),(yellow hair:1.25),(green hair:1.4)

举例五:

虽然都是连接符,但还是有些微差别的,是更趋向于融合还是更趋向于并列,自行摸索吧~~

// 又跑又跳,红黄绿色头发,橙色太阳和蓝色天空~~
absurdres,  8k, comic, [viewfinder], (1male), running|jumping, (red hair:1.1)(yellow hair:1.25)(green hair:1.4), (orange sun)_(blue sky),

insert image description here

好吧,这个例子彻底把画面搞混乱了~~哈哈,原因之一是:某个元素过高的权重可能会污染其他元素。


三、分布与交替渲染

[] 方括号中使用:| 等符号,则可实现较为复杂的分布与交替渲染的需求。

  • [A:B:step] [元素1:元素2:步骤比例] :渲染元素1到多少进度后开始渲染元素2,实现元素1与元素2的互相叠加,有类似于[from:to:when]的感觉,可用于两个词条的融合
// 渲染蓝色到40%进度后,开始渲染红色
[blue:red:0.4]

// 前12步渲染蓝色后,开始渲染红色
[blue:red:12]

注:
step > 1 时表示该组合在前多少步时做为 A 渲染,之后作为 B 渲染。
step < 1 时表示迭代步数(参与总步骤数)的百分比。

  • [A:step] [元素1:步骤比例] :从多少进度开始渲染元素1
// 在执行40%的步骤后,开始渲染蓝色
[blue:0.4]
// 在执行15步之后,开始渲染蓝色
[blue:15]
  • [A::step] [元素1::步骤比例]:渲染到多少进度的时候停止元素1的渲染(其它元素的渲染继续)
// 在执行了40%的步骤后,停止渲染蓝色
[blue::0.4]
// 在执行了15步后停止渲染蓝色
[blue::15]
  • [A|B] [元素1|元素2]:元素1和元素2的交替混合渲染,意思就是渲染一次A,再渲染一次B,再渲染一次A~~以此往复直至最后
// 融合蓝色与红色,紫色?
[blue|red]
// 某物与某物的交替演算,用于生成融合生物,句中词缀含义为融合牛与马。
[cow|horse] 

[xx|xx|xx|xx|xx…] 本质为一种在平等权重下融合词缀生成单个元素,不限制混合元素的数量。

  • [A|B]C [元素1|元素2]元素3
    括号外加词缀意味着融合过程中的共享元素。

举例七:

// 一个蓝红混色染发的短发女孩
1girl, [blue|red]hair, short hair

insert image description here
果然紫色出来了哦~~


举例八:

// 合成“空中的鸟”与“空中的飞机”
[bird|airplane] in sky

insert image description here

好诡异的合体~~


举例九:

经过学习,现在我们利用第一个例子中的词缀再搞几个画面练手。

// 哇哦哇哦哇哦
absurdres,  8k, comic, [viewfinder], 1male+running, 1female ([red:blue:0.3]hair)(long hair) jumping, [[orange sun]], [blue sky], (bird and horse) in sky, 

insert image description here

注意:
因为加入了动物,所以femalmale可能被AI识别为雌性、雄性。。。
目前发现仅用文字描述同一场景多人物,很难成功生图,看案例中男女混合了,还有很多错误的图我都没放上来。
可能需要加入很多负面提示词来控制污染,并且要把不同人物的位置、状态明确告诉AI,这样成功几率才大。
建议还是利用手稿、controlnet等方式来共同实现。


举例十:

反观单场景单人的实现就特别容易了,这或许也是为什么很多AI图片网站的成图都是单人肖像的原因。

best quality, very detailed, absurdres,  8k, comic, [viewfinder], one lady with long [blue|red]hair is sitting on ground, birds around her, blue sky+[orange sun], 

insert image description here
这里的提示词使用了人类的英文阅读格式~~


四、调取 LoRA & Hypernetworks 模型

  • <> 尖括号:调取LoRA或超网络模型等。
    输入:<lora:filename:multiplier><hypernet:filename:multiplier> 可调取相应模型。
<lora:cuteGirlMix4_v10:0.5>

注:要先确保在【…\models\lora】或【…\models\hypernetworks】文件夹已保存好相关模型文件。

五、资源

词缀获取渠道

tag自动补齐插件

  • 插件名称tagcomplete
    安装完成后按照教程更新翻译库:https://www.bilibili.com/video/BV14Y4y1D7vR

  • 关键词缀Trigger Words
    在使用某些lora模型的时候,需要使用官方提供的trigger words作为词缀,用于在单个lora中准确的导向不同的风格。
    由于没有预览图和备注,词缀很难使用,在复杂环境也很难辨别有没有生效。
    建议安装civitai helper用于自动生成预览图与trigger words

反向提示词插件

使用时在反向提示词中写上:easynegativebadhandv4 即可,但注意,使用后可能导致某些模型风格不对路。

提示词表

  • 反向常用
    ((nsfw)),((ugly))),(((duplicate))),((morbid)),((mutilated)),(((tranny))),(((trans))),((trannsexual))),(((mutation))),(((deformed)))(((long neck))),((bad anatomy))(((bad proportions))),(((extra arms))),(((extra legs))), (((disfigured))),((more than 2 nipples))),malformed,mutated,(hermaphrodite),((extra limbs)).((missing arms)).((missing legs)).((poorly drawn hands))((poorty drawn face)),(mutation,poorly drawn :1.2),(long body :1.3).multiple breasts,cloned face,gross proportions, mutated hands,bad hands,bad feet,long neck,missing limb,(malformed limbs),malformed hands,(fused fingers).(too many fingers),extra fingers,missing fingers,extra digit,fewer digits,(mutated hands and fingers :1.5),low res,text,error,cropped,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,username,blurry,text font ui,futa,yaoi,
  • 画质常用
    masterpiece, best quality, masterpiece,best quality,official art,extremely detailed CG unity 8k wallpaper,
  • 地点常用
    masterpiece, best quality, masterpiece,best quality,official art,extremely detailed CG unity 8k wallpaper, steam, in the cyberpunk city, explosion, underwater, flower field, fireworks, intense shadows, strong rim light, golden hour lighting, sky, sea, mountain, on a hill, the top of the hill, in a meadow, plateau, on a desert, cityscape, in hawaii, landscape, beautiful detailed sky, beautiful detailed water, on the beach, on the ocean, beautiful purple sunset at beach, over the sea, in the ocean, against backlight at dusk,
  • 风格常用
    artbook, game_cg, comic, 4koma, animated_gif, dakimakura, cosplay, dark, crossover, light, night, guro, realistic, photo, real, landscape/scenery, cityscape, science_fiction, original, parody, personification, checkered, highres, lowres, absurdres, column_lineup, everyone, expressions, profile, bust, back, sample, album, covr, silhouette, what, artist_request, tagme, bad_id, watercolor_(medium), traditional_media, translation_request, Japanese, sketch, fine_art_parody, French, optical_illusion, zoom_layer, colorful, monochrome, gradient_background, pixel_art, wallpaper, simple_background, huge_filesize, incredibly_absurdres, transparent_background,
  • 角色常用
    girl, little boy, shota, loli, kawaii, mesugaki, adorable girl, bishoujo, sisters, gyaru, ojousama, mature female, mature, female pervert, milf, harem, angel, cheerleader, chibi, crossdressing, devil, doll, elf, fairy, female, furry, orc, giantess, harem, idol, kemonomimi_mode, loli, magical_girl, male, maid, mermaid, miko, milf, minigirl, monster, multiple_girls, no_humans, ninja, nun, nurse, shota, stewardess, student, trap, vampire, waitress, witch, yaoi, yukkuri_shiteitte_ne, yuri,
  • 自考虑
    easynegative,toony,dated,line art,flat colors

中英文对照

- 常用的反向提示词

反向提示词描述
nsfwNot Safe/Suitable For Work不适合公开场合出现的图
mutated hands and fingers变异的手和手指
deformed畸形的
bad anatomy解剖不良
disfigured毁容
poorly drawn face脸部画得不好
mutated变异的
extra limb多余的肢体
ugly丑陋
poorly drawn hands手部画得很差
missing limb缺少的肢体
floating limbs漂浮的四肢
disconnected limbs肢体不连贯
malformed hands畸形的手
out of focus脱离焦点
long neck长颈
long body身体长

- 提高图像质量的正向提示词

正向提示词描述
HDR, UHD, 8K (HDR、UHD、4K、8K和64K)这样的质量词可以带来巨大的差异提升照片的质量
best quality最佳质量
masterpiece杰作
Highly detailed画出更多详细的细节
Studio lighting添加演播室的灯光,可以为图像添加一些漂亮的纹理
ultra-fine painting超精细绘画
sharp focus聚焦清晰
physically-based rendering基于物理渲染
extreme detail description极其详细的刻画
Professional加入该词可以大大改善图像的色彩对比和细节
Vivid Colors给图片添加鲜艳的色彩,可以为你的图像增添活力
Bokeh虚化模糊了背景,突出了主体,像 iPhone 的人像模式
(EOS R8, 50mm, F1.2, 8K, RAW photo:1.2)摄影师对相机设置的描述
High resolution scan让你的照片具有老照片的样子赋予年代感
Sketch素描
Painting绘画

- 艺术风格代表

加入对应类型画家的风格,提升我们的照片效果。

艺术风格艺术家
肖像画(Portraits)Derek Gores, Miles Aldridge, Jean Baptiste-Carpeaux, Anne-Louis Girodet
风景画(Landscape)Alejandro Bursido, Jacques-Laurent Agasse, Andreas Achenbach, Cuno Amiet
恐怖画(Horror)H.R.Giger, Tim Burton, Andy Fairhurst, Zdzislaw Beksinski
动漫画(Anime)Makoto Shinkai, Katsuhiro Otomo, Masashi Kishimoto, Kentaro Miura
科幻画(Sci-fi)Chesley Bonestell, Karel Thole, Jim Burns, Enki Bilal
摄影(Photography)Ansel Adams, Ray Earnes, Peter Kemp, Ruth Bernhard
概念艺术家(视频游戏)(Concept artists (video game))Emerson Tung, Shaddy Safadi, Kentaro Miura

- 视角

多试,有些不一定有效

提示词描述
dynamic angle动态角度
from the left从左侧视角
from the right从右侧视角
from above从上方
from below从下面
looking up从下往上看
looking down从上往下看
top down从正上方往下看
side view up从侧面往上看
side view down从侧面往下看
subject look up从人物的角度往上看
subject look down从人物的角度往下看
ground view up在地面往上看
ground view down在地面往下看
panoramic view全景
wide shot广角宽景
wide-angle view广角
aerial view空中俯瞰视图
bird view在高处往下看
bird’s-eye view鸟瞰视角
worm’s eye view蚯蚓视角
angled带有角度的视角
low-angle view低角度视角
top-down俯视视角
zoomed in放大镜效果
zoomed out缩小镜效果
top-down view俯视
high-angle view高角度视角
eye level view/level gaze/straight gaze平视
close-up view特写
extreme close-up view极端特写
微距(macro)放大画面中的细节,让物体看起来更加清晰和详细
高空俯瞰(aerial)从高空向下俯瞰场景,可以呈现出不同的地形和建筑物的分布
多角度(multi-angle)从多个角度捕捉场景,可以在一个图像中显示多个视图
夜景(night)将场景呈现为黑暗中的亮点和阴影,营造出一种神秘的氛围
人物特写(portrait)突出人物的面部特征,使他们的表情和个性更加鲜明
模糊(blur)在图像中使用模糊效果,可以产生一种柔和和梦幻的效果
扭曲(distort)通过扭曲场景中的物体来创造出一种独特的视觉效果
高速运动(motion blur)通过捕捉高速运动物体的轨迹来呈现出一种动态的效果

- 主体远近

提示词描述
full body / full body shot全身
bust / upper body / half body / cowboy shot半身
close-up shot接近

- 光线

提示词描述
cinematic lighting电影光
dynamic lighting动感光

- 视线

提示词描述
looking at viewer画面中的物体或人物在直接面对画面或观众
looking at another两个角色正在相互交流或对视
looking away看着别的方向,不直视对方
looking back回头看
looking up摄像机或观察者的视角调整为向上看

- 画风

提示词描述
(draw a simple black and white sketch of an object or scene, with bold outlines and no shading) / sketch / one-hour drawing challenge素描、草图、速写、手绘风(用第一句话是可行的)
photograph, photorealistic照片
flat design style扁平风
monochrome单色
duotone双色,1.5版本就是黑白色,而xl版则可有其它颜色的双色~~
chinese Shadow Puppets皮影戏
silhouette style剪影
black and white style黑白照,只有把剪影和黑白照同时使用才能出现期望的剪影风格,如果不对的话,扁平化和单色也可以结合进来

- 身体指定

表情

提示词描述
blush脸红
wet sweat大汗
flying sweatdrops飞汗

- 衣服指定

制服

提示词描述
china dress旗袍
sailor dress水手服
school uniform校服
sailor senshi uniform《美少女战士》中战士们穿着的制服,水手服
不多说了。。。

- 风景指定

提示词描述
underwater水下
shinto shrine神社

- 姿势指定

提示词描述
hands on例hands on own face, hands on feet, hands on breast
kneeling跪下
hand between legs腿夹手
hair flip将头发向后或向一侧甩动的动作
skirt flip裙子甩起来

- 通用风格(Midjourney)

使用及样稿可参考置顶文章《AI绘图风格对照表/画风样稿详细研究记录及经验总结》

提示词描述SD可用
holographic iridescent全息彩虹色holographic iridescent
Cyberpunk赛博朋克
Ukiyoe浮世绘
Blender 3d搅拌机3d渲染
Knolling摆拍
isometric 3d cube等距3D模型
8bit/16bit pixel像素风pixel art
stick figure简笔画风格
Design a Sticker贴纸化
fluorescent荧光颜料
Embroidery Art刺绣艺术
paper cut craft剪纸艺术
Layered Paper折纸艺术
plasticine橡皮泥风格
Chinese ink style水墨画
chinese Shadow Puppets皮影戏艺术
Tilt-shift photography移轴摄影风格
Graffiti art, 2d, illustration平面涂鸦风格
Fairy Kei fashion仙女系
surrealism超现实主义
GENESISGenesis
subconsciousnesssubconscious
romanticromanticism
Gothic Architecture and LandscapeGothic landscape and architecture
studio ghibliHayao Miyazaki style
MARIO-STYLEmario style
pixel stylePixar style
minecraftminecraft style
out of LEGOLego blocks
multiple viewsMulti-view/Three-view

insert image description here

Reference:
Stable Diffusion Prompt Usage
AI Painting Keywords Website Recommendation: Get Millions of Prompt Words Easily! Completely free
Stable Diffusion Affix Usage Specifications / Spell Chanting Guide (personal note sharing)
[Stable Diffusion] Prompt
(Getting Started) How to write Stable Diffusion prompt?
Official website: InstructPix2Pix
35 pictures, intuitive understanding of Stable Diffusion



Category of website: technical article > Blog

Author:evilangel

link:http://www.pythonblackhole.com/blog/article/80255/1b95f1719a5c37f87880/

source:python black hole net

Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.

10 0
collect article
collected

Comment content: (supports up to 255 characters)