這篇要來談談一個我最近常用的大量生圖方法。
方法
在
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可以讓眼睛變得好看,但是也阻止模型生成全身圖或遠景圖。
所以,如果反向操作,大量減少正負面提示詞,讓模型盡量發揮創意,那是否能由少少的提示詞來產生非常有創意的圖,作為之後精細修改的種子圖?
正面提示詞:
(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
在這樣簡單的提示詞下,一些模型的表現:
可以很明顯看到,並不是每個模型都能適應這樣的用法,所以我們就特別使用表現良好的模型來跑狂野生圖。
這個生圖方法有幾個特點:
- 適合在少量提示詞發揮良好的模型
- 運用少量的負面提示詞,以及僅包含最必要的正面提示詞
- 運用提示詞編輯以及交錯提示詞
- 大量的生圖
- 挑選有感覺圖,再加以放大並加入精細的提示詞來修飾細節
當我們具備了將圖精修再放大的能力,就能用在砂礫裡掏珍珠的方法,抽到我們有感覺的構圖或角色造型,然後快速生成一系列素材圖。
範例
下面列了一些我用這個方法生出的初步素材圖
角色
(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拼接完成的。
提示詞訣竅列表:
參照