玩转 Stable Diffusion 制作精美图片提示词理论篇

已收录   阅读次数: 747
2023-07-0319:53:25 发表评论
摘要

在 Stable Diffusion 中,提示词是一种用来描述想要生成的图像的文字,它可以包含或排除一些元素,控制图像的风格、色彩、细节等。提示词的重要性在于它可以影响 Stable Diffusion 的理解和输出,让生成的图像更符合用户的意图和期望,好的提示词能够生成高质量图片,坏的的提示词只能生成低质的图片,本篇文章就来探讨如何独立思考出高质量提示词,带你玩转 Stable Diffusion……

分享至:
玩转 Stable Diffusion 制作精美图片提示词理论篇

开篇寄语

在 Stable Diffusion 中,提示词是一种用来描述想要生成的图像的文字,它可以包含或排除一些元素,控制图像的风格、色彩、细节等。提示词的重要性在于它可以影响 Stable Diffusion 的理解和输出,让生成的图像更符合用户的意图和期望,好的提示词能够生成高质量图片,坏的的提示词只能生成低质的图片,本篇文章就来探讨如何独立思考出高质量提示词,带你玩转 Stable Diffusion。

前情提要

内容详情

Stable Diffusion,简单来说是一个文本扩散模型,可以用来把文字生成为图片。因为它已经经过了大量的数据训练,所以很容易理解你想要生成什么。

可能有读者朋友会说了,我难道不能通过 Google 搜索到大量的高质量图片吗?可以是可以,不过,这项技术的高明之处,在于你可以通过提示词生成以前没有见到过的图片,最重要的是它能够让你自行控制。只要脑洞足够大,可以任性发挥。

想必已经有不少人体验过了 Stable Diffusion 的强大功能,不过,有的时候生成的图片往往不尽人意,或是缺少什么,或者是图片风格不协调等等,这一切的一切从根源来说都是提示词导致的,可见提示词是多么的重要。

所以,本篇文章专门是讲解如何让自己想出高质量的提示词,由浅入深,层层推进,不用再用搜索引擎搜索提示词,自己就能玩转 Stable Diffusion。

以下生成图片都是用的 AUTOMATIC1111 项目 Stable Diffusion Web-gui,具体安装方法,可以参看前情提要伯衡君撰写的离线使用方法。

有关 Stable Diffusion 的提示词,可以从以下几个角度去思考拼接:

目标

尽可能详细介绍你要生成的目标图片,无论是风景,人物还是其他,一定要用英文,生成效果才会是最佳状态。

比如,我想描绘一位头戴遮阳帽,身穿淡蓝色连衣裙的女人正走在沙滩上,提示词如下:

提示词

A woman wearing a sun hat and a light blue dress is walking on the beach with smile face.

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

图片媒介

这种绘画媒介的词可以是 Oil Painting(水彩画),Digital Painting(数字绘画),Abstract Painting(抽象画)等等。

于是,新添加项 Digital Painting,新提示词就变成了如下:

提示词

Digital painting of a woman wearing a sun hat and a light blue dress is walking on the beach with smile face.

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

反义提示词

去除不好的提示词,不让模型过度联想,可以添加下面这些反义提示词在反义提示词输入框:

反义提示词

text, signature, title, heading, watermark, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, out of frame, ugly, extra limbs, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, mutated hands, fused fingers, too many fingers, long neck

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

小技巧,可以用 "()" 增加词重要性,用 "[]" 降低词的重要性,比如:

反义提示词

text, signature, title, heading, watermark, (((((ugly))), duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, out of frame, ugly, extra limbs, gross proportions, malformed limbs, ((((missing arms)))), (((missing legs))), (((extra arms))), (((extra legs))), mutated hands, fused fingers, too many fingers, long neck

细节决定成败

增加描绘图片内容细节,能够让你生成的图片更加丰满,比如加上 4K 画质,8K 画质,我还要大胸妹,于是就有了下面的提示词:

提示词

Digital painting of a woman wearing a sun hat and a light blue dress is walking on the beach with big breast and smile face, 4K

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

万用粘合词

英文中,有一个 “vivid”,这个词汇可以让你的图片显得灵动,提示词如下:

提示词

Digital painting of a woman wearing a sun hat and a light blue dress is walking on the beach with big breast and smile face, 4K, vivid.

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

增加修饰词

想让生成的图片更有质感,像电影一样,可以试试这个 “Ornamented, fancy, motion-picture lighting”,提示词如下:

提示词

Digital painting of a woman wearing a cute sun hat and a light blue dress is walking on the beach with white skin, little mouth, big breast and smile face, ornamented, fancy, motion-picture lighting, 4K, vivid.

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

画家风格

可以模仿一些知名画家的画风,来为生成的图片增加气质,伯衡君推荐下面这些知名画家:

  • Leonardo da Vinci
  • Vincent van Gogh
  • Pablo Picasso
  • Claude Monet
  • Michelangelo
  • Rembrandt
  • Johannes Vermeer
  • Salvador Dali
  • Frida Kahlo
  • Edvard Munch
  • Jackson Pollock
  • Gustav Klimt
  • Wassily Kandinsky
  • Georgia O'Keeffe
  • Edward Hopper
  • Andy Warhol
  • Henri Matisse
  • Paul Cézanne
  • Pierre-Auguste Renoir
  • Paul Gauguin
  • Sandro Botticelli
  • Caravaggio
  • Hieronymus Bosch

于是,提示词可以变成下面这样:

提示词

Digital painting of a woman wearing a cute sun hat and a light blue dress is walking on the beach with white skin, little mouth, big breast and smile face, by Caravaggio, ornamented, fancy, motion-picture lighting, 4K, vivid.

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

神奇的标点符号“[]”

通过在提示词使用符号"[]",可以生成融合脸,公式大概可以概括为[A: B: 0-1之间的数],比如下面这个例子:

提示词

[Donald Trump: Joe Biden: 0.5]

生成效果如下图所示:

玩转 Stable Diffusion 制作精美图片提示词理论篇

控制展示角度

控制图片中的人物视角,可以参考以下词组:

  • looking at the camera
  • look left
  • look right
  • full body

提示词

Photo of 14yr girl, highlight hair, sitting outside restaurant, wearing dress, rim lighting, studio lighting, looking left, dslr, ultra quality, sharp focus, tack sharp, dof, film grain, Fujifilm XT3, crystal clear, 8K UHD, highly detailed glossy eyes, high detailed skin, skin pores

温馨提示

以上就是伯衡君在使用 Stable Diffusion 汇总的一些经验心得,以后如果有更多的理论会汇集在这里,希望能对读者朋友有所帮助。

  • 我的微信
  • 微信扫一扫加好友
  • weinxin
  • 我的微信公众号
  • 扫描关注公众号
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: