1987WEB视界-分享互联网热门产品和行业

您现在的位置是:首页 > 人工智能AI > 正文

人工智能AI

AI绘画StableDiffusion提示词优化心得(八)

1987web2023-09-06人工智能AI108
挑战30天在头条写日记

挑战30天在头条写日记

姊妹会秘仪(成图)

今天来说一说一个我最近常用的大量生图方法。

方法

AI绘画|Stable Diffusion提示词优化心得(六)里面有提到:没有说的东西可能带给你惊喜。这个技巧的意思是指,当AI在填充虚拟空间(Latent Space)时,如果给予的提示词太少,它就会随机填入任意的提示词。而我们为了不让奇怪的畸形结果产生,所以会填入非常多的负面提示词,例如:

canvas frame, cartoon, 3d, ((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((close up)),((b&w)), weird 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))), signature, 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

这种长度的负面提示词大约为300个token的长度。这样可以让生成的图少掉很多问题,但同时也会大大限制图的生成自由度,所以很多惊奇的角度与构图就此无法出现。例如blurry这个字出现在负面提示词,能够避免画面模糊,但也同时让景深与快速动作的模糊这种可能性消失了。detailed eyes可以让眼睛变得好看,但是也阻止模型生成全身图或远景图。

所以,如果反向操作,大量减少正负面提示词,让模型尽量发挥创意,那是否能由少少的提示词来产生非常有创意的图,作为之后精细修改的种子图?

以一个简单的例子开始,使用AI绘画|Stable Diffusion提示词优化心得(五)里面提到的交错提示词,我想要制造一个在七彩世界中生活的巨大单眼生物,它要有藤蔓、花与触手的质感,于是我使用这样的提示词组在一些我爱用的模型下测试:

正面提示词:

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), One-eyed Giant with [tentacle|flowers|vines], extreme detailed, (fractal art:1.4), colorful, highest detailed

负面提示词:

(worst quality, low quality:2), monochrome, watermark, text

在这样简单的提示词下,一些模型的表现:

可以很明显看到,并不是每个模型都能适应这样的用法,所以我们就特别使用表现良好的模型来跑狂野生图。

这个生图方法有几个特点:

  1. 适合在少量提示词发挥良好的模型
  2. 运用少量的负面提示词,以及仅包含最必要的正面提示词
  3. 运用提示词编辑以及交错提示词
  4. 大量的生图
  5. 挑选有感觉图,再加以放大并加入精细的提示词来修饰细节

当我们具备了将图精修再放大的能力,就能用在砂砾里掏珍珠的方法,抽到我们有感觉的构图或角色造型,然后快速生成一系列素材图。

示例

下面列了一些我用这个方法生出的初步素材图

角色

(masterpiece, top quality, best quality, official art:1.2), Cyclops made of [flame|lava|lightning], extreme detailed, (fractal art:1.4), colorful, highest detailed

熔钢漫游者

怒焰刑天

(masterpiece, top quality, best quality, official art:1.2), Skeleton made of [flame|lava|lightning], extreme detailed, (fractal art:1.4), colorful, highest detailed

巨象骷髅与驯象师

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), One-eyed Giant with [tentacle|flowers|vines], extreme detailed, (fractal art:1.4), colorful, highest detailed

开路者化身

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), Skeleton Dragon of [Crinoidea|Moth] with [tentacle|blood], extreme detailed, (fractal art:1.4), colorful, highest detailed

堕落之龙

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), Giant of flowers with [tentacle|claw], extreme detailed, (fractal art:1.4), colorful, highest detailed

百花之主

地点

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), extreme detailed,(fractal art:1.3), colorful, highest detailed, abyss to another universe and a rope extended from the hole

开路者之厅

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), extreme detailed,(fractal art:1.3), colorful, highest detailed,a colorful rope with fractal art stretched from horizon

梦彩树

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), rocky coast, extreme detailed, (fractal art:1.4), colorful, (blue:1.1), purple, highest detailed, starry night, coast

洞穴之外

构图

(masterpiece, top quality, best quality, official art, beautiful and aesthetic:1.2), (5girls:1.2), extreme detailed, (fractal art:1.4), colorful, highest detailed, storyboard

归途

漫画分割示例

姊妹会秘仪

本文一开头的图片「姊妹会秘仪」完成图,即为此草稿构图放大之后,分区以inpaint精修后,再放入修图软件GIMP拼接完成的。