提示语法
Easy Diffusion 使用compel(提示解析库)来支持用于图像的提示中的权重和强调。
强调
将单词或短语加上-
或+
,或加上0
和2
之间的权重(默认值为“1”),以减少或增加该单词/短语在生成的图像中的重要性。例如:man picking apricots+
.男人 摘 杏子+
。
您可以使用括号为多个单词指定权重。例如a man (picking apricots)1.5
或a man (picking apricots)++
您可以添加更多的+
或-
符号来进一步增加/减少权重。例如,apricots++
比apricots+
更重要,而apricots--
的重要性比apricots-
低。你可以使用多少个+
或-
符号是没有限制的。
您还可以使用数字为单词/短语分配准确的权重:
- A weight between
0
and1.0
reduces the importance of the token. For e.g.(apricots)0.5
reduces the importance of apricots to half. - A weight between
1.0
and2
increases the importance of the token. For e.g.(apricots)1.5
increases the importance of apricots by 1.5 times. - 权重介于
0
和1.0
之间的会降低令牌(token:实际大概是分词处理后文本标记)的重要性。例如,(apricots)0.5
将杏子的重要性降低一半。 - 权重介于
1.0
和2
之间的会会增加令牌的重要性。例如,(apricots)1.5
杏子的重要性提高了 1.5 倍。
+
本质上是 的权重1.1
,并且-
本质上是 的权重0.9
。
更多示例
- 嵌套:
a tall thin man (picking apricots+)++
(apricots
effectively gets+++
) - 不带括号的单个单词:
a tall thin man picking apricots+
- 带括号的单个或多个单词:
a tall thin man (picking apricots)+
a tall thin man picking (apricots)-
a tall thin man (picking apricots)-
- 更多符号带来更多效果:
a tall thin man (picking apricots)++
, 和a tall thin man (picking apricots)+++
- 以上所有内容均带有明确的数字:
a tall thin man picking (apricots)1.1
a tall thin man (picking (apricots)1.3)1.1
. (+
相当于 1.1、++
is1.1 x 1.1
、+++
is1.1 x 1.1 x 1.1
等;-
表示 0.9、--
mean0.9 x 0.9
等)
提示之间的混合
您可以使用该函数在提示中混合概念.blend()
。
例如:("blue sphere", "red cube").blend(0.25,0.75)
这将告诉采样器将 25% 的蓝色球体概念与 75% 的红色立方体概念混合。混合权重可以使用整数和浮点数的任意组合。
转义括号 () 和语音标记 ""
如果您使用的提示在其语法中包含括号()
或语音标记""
,您将需要使用反斜杠“转义”它们,以便(my_keyword)
成为\(my_keyword\)
. 否则,提示解析器将尝试将括号解释为提示语法的一部分,并且会感到困惑。
哇!又赚了一天人民币
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· 清华大学推出第四讲使用 DeepSeek + DeepResearch 让科研像聊天一样简单!
· 实操Deepseek接入个人知识库
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库