问小白 wenxiaobai
资讯
历史
科技
环境与自然
成长
游戏
财经
文学与艺术
美食
健康
家居
文化
情感
汽车
三农
军事
旅行
运动
教育
生活
星座命理

AI创作利器:负面提示语完全指南

创作时间:
作者:
@小白创作中心

AI创作利器:负面提示语完全指南

引用
CSDN
1.
https://m.blog.csdn.net/trb201013/article/details/142528552

在使用AI进行内容创作时,如何让AI生成的内容更符合我们的预期?除了使用正面提示语(Positive Prompt)告诉AI我们需要什么,还可以通过负面提示语(Negative Prompt)告诉AI不要生成什么。本文将详细介绍什么是负面提示语,以及如何在图像生成和文本生成中使用负面提示语来过滤不需要的内容。

什么是负面提示语

我们平时编写的一般是正面提示语,即要求AI做什么和怎么做,而与正面提示语(Positive Prompt)相反,负面提示语(Negative Prompt)则是要求AI不要做什么以及不需要什么,在创作过程中起到一定的过滤作用

本质上来说,负面提示语与正面提示语一样,也是提供对AI的指导,让AI能够更好地为我们生成符合期望的内容。

比如下面这句提示语:

Autumn streets of Chengdu, ginkgo trees, golden yellow.

如果不加负面提示语,则会得到下面这样的图像:

如果加了

people, text

这样的负面提示语,我们得到的图像就是这样:

提升图像质量

负面提示语可以显著提升生成的图像质量。比如,指定

no bad anatomy

可以避免出现多余的肢体或者扭曲的面部特征,让生成的人物更准确。

通过负面提示语,可以排除掉画面中的某些元素,引导AI产生独特风格或者超现实的内容。

风格引导

除了可以通过负面提示语来提升图像质量以及去除不必要的元素之外,负面提示语还可以起到引导图像风格的作用。技巧性的加入一些通用的负面提示语,就可以直接改变图像的风格。

比如:

Iron Man standing on a golden prairie, with blue sky and white clouds, landscape, high resolution.

我们不想要现实风格的图像,那么可以加入

realistic

这样的负面提示语:

如何编写负面提示语

如果我们需要为Stable Diffusion或者Midjourney这样的图像生成模型编写负面提示语,那么关键就在于需要明确指出不希望模型生成的内容。

以下是一些负面提示语以及适用场景示例:

  1. 排除特定元素:
no people, no animals

可以用于生成没有人物或者动物的风景以及物体等;

  1. 避免某些主题:
no horror, no violence

适用于生成所有用户的内容;

  1. 控制图像基调:
no dark themes, no sad imagery

这些关键词可以让模型生成积极、明亮或者中性基调的图像;

  1. 限制色彩:
no bright colors, no neon

可以让图像的色彩更加柔和;

  1. 排除文本:
no test, no logos

排除图像中的文字或者Logo;

  1. 避免特定的地点:
no urban environments, no buildings

可以引导模型生成自然景观或者抽象构图,避免生成城市景观;

  1. 控制视角和构图:
no close-ups, no aerial views

当然这只是很小一部分示例,而且,负面提示语的使用和我们日常编写提示语一样,也需要多次试验和调整才能达到理想的效果。

文本生成

当然,负面提示语除了应用在图像生成领域,也可以应用于文本生成。负面提示语可以用于排除内容中的特定主题、信息以及控制语调等。

Google有一份指南叫做E-E-A-T(Experience, Expertise, Authoritativeness, Trustworthiness),也就是经验、专业、权威、可信赖性,这份指南的作用是可以帮助文章在搜索引擎上获得更好的排名。

而将负面提示语加入到内容创作策略中,就可以有效地提升文章的相关性和安全性,从而可以生成更符合这份指南的内容。

在文本生成的时候,负面提示语可以有以下这些作用:

  • 精确定位:通过负面提示语来指定不想要的内容,确保内容不会包含敏感主题
  • 提升一致性:使用负面提示语可以帮助我们在使用AI进行内容生成的时候保持内容的风格、语调和信息传递上的一致性
  • 提升相关性:为了保证生成的内容和目标受众的兴趣和需求高度相关,我们可以采用负面提示语来过滤掉不需要的主题或者风格
  • 简化工作流程:通过负面提示语来清晰定义排除的内容,还可以简化我们的工作流程,可以减少修订或者更正的需求,节省时间和资源

以下是一些负面提示语示例:

  • 避免讨论其他产品的缺点
  • 不要包含行业内比较有争议性的话题
  • 不要加入与当下趋势不符的内容
  • 不要使用过于专业的属于让读者感到困惑
  • 不要讨论与我的目标受众兴趣或者需求不相关的主题

常用负面提示语

通用负面提示语

worst quality, normal quality, low quality, low res, blurry, distortion, text, watermark, logo, banner, extra digits, cropped, jpeg artifacts, signature, username, error, sketch, duplicate, ugly, monochrome, horror, geometry, mutation, disgusting, bad anatomy, bad proportions, bad quality, deformed, disconnected limbs, out of frame, out of focus, dehydrated, disfigured, extra arms, extra limbs, extra hands, fused fingers, gross proportions, long neck, jpeg, malformed limbs, mutated, mutated hands, mutated limbs, missing arms, missing fingers, picture frame, poorly drawn hands, poorly drawn face, collage, pixel, pixelated, grainy, color aberration, amputee, autograph, bad illustration, beyond the borders, blank background, body out of frame, boring background, branding, cut off, dismembered, disproportioned, distorted, draft, duplicated features, extra fingers, extra legs, fault, flaw, grains, hazy, identifying mark, improper scale, incorrect physiology, incorrect ratio, indistinct, kitsch, low resolution, macabre, malformed, mark, misshapen, missing hands, missing legs, mistake, morbid, mutilated, off-screen, outside the picture, poorly drawn feet, printed words, render, repellent, replicate, reproduce, revolting dimensions, script, shortened, sign, split image, squint, storyboard, tiling, trimmed, unfocused, unattractive, unnatural pose, unreal engine, unsightly, written language

用于动漫风格的负面提示语

bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, worst face, out of frame double, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, horn, realistic photo, extra eyes, huge eyes, 2girl, 2boy, amputation, disconnected limbs

用于生成真实图像的负面提示语

bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, poorly rendered hands, bad face, fused face, cloned face, worst face, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, bad composition, horn, extra eyes, huge eyes, 2girl, amputation, disconnected limbs, cartoon, cg, 3d, unreal, animate, cgi, render, artwork, illustration, 3d render, cinema 4d, artstation, octane render, mutated body parts, painting, oil painting, 2d, sketch, bad photography, bad photo, deviant art, aberrations, abstract, anime, black and white, collapsed, conjoined, creative, drawing, extra windows, harsh lighting, jpeg artifacts, low saturation, monochrome, multiple levels, overexposed, oversaturated, photoshop, rotten, surreal, twisted, UI, underexposed, unnatural, unreal engine, unrealistic, video game, deformed body features

用于生成面部的负面提示语

poorly drawn face, bad face, fused face, ugly face, worst face, asymmetrical, unrealistic skin texture, bad proportions, out of frame, poorly drawn hands, cloned face, double face

用于生成手部的负面提示语

extra digits, extra arms, extra hands, fused fingers, malformed limbs, mutated hands, poorly drawn hands, extra fingers, missing hands, bad hands, three hands, fused hands, too many fingers, missing fingers, deformed hands

用于生成眼睛的负面提示语

extra eyes, huge eyes, bad eyes, ugly eyes, oversized eyes, imperfect eyes, deformed pupils, deformed iris, cross-eyed

用于生成肖像的负面提示语

bad proportions, asymmetric ears, broken wrist, additional limbs, asymmetric, collapsed eyeshadow, altered appendages, broken finger, bad anatomy, elongated throat, double face, conjoined, bad face, broken hand, out of frame, disconnected limb, 3d, bad ears, amputee, cross-eyed, disfigured, cartoon, bad eyes, cloned face, combined appendages, broken leg,
© 2023 北京元石科技有限公司 ◎ 京公网安备 11010802042949号