免费内容
网盘密匙:Qpipi
允许生成图像/视频商用
允许再次训练
不允许转售AI模型
不允许生成计算服务费
许可证:CreativeML Open RAIL-M
Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用

Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用

为Stable Diffusion建好的提示可能很困难,尤其是当您试图通过反复试验来学习时。Dynamic Prompts 是 Automatic1111 的 webui 的扩展,可让您通过调整基本提示符来同时测试数十或数百个提示。

AUTOMATIC1111/stable-diffusion-webui 的自定义扩展,实现了用于随机或组合提示生成的富有表现力的模板语言,以及支持深度通配符目录结构的功能。

寻找 ComfyUI 通配符节点?点这里找到他们。

让我们看看这是如何工作的。

安装

您可以直接从 Automatic1111 webui 的扩展选项卡轻松安装扩展。

图片[1]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

一旦你安装了它,你将在你的txt2img标签上看到一个部分,看起来像这样。

图片[2]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

您可以通过单击它来查看各种选项:

图片[3]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

开始

假设您想创建钻石戒指的图像;你可以从类似的东西开始:

A diamond ring on a gold band.
图片[4]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

变种

如果我们也想要一张铂金戒指的图片怎么办?我们可以使用 Dynamic Prompts 变体语法,例如

A diamond ring set on a {gold|platinum} band.
图片[5]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

如果我们在安装了动态提示的提示框中输入此内容,则生成的提示将是以下提示之一:

A diamond ring set on a gold band

and

A diamond ring set on a platinum band

嵌套变体

黄金有各种各样的品种,让我们也添加一下:

A diamond ring set on a {{rose|yellow|white} gold|platinum} band.
图片[6]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

请注意我们如何为黄金类型嵌套一个变体,即 在主要变体内部。 所以现在,在生成图像时,会创建以下提示之一:{rose|yellow|white}

A diamond ring set on a rose gold band
A diamond ring set on a yellow gold band
A diamond ring set on a white gold band
A diamond ring set on a platinum band

嵌套变体会很快使您的提示模板难以阅读。幸运的是,动态提示忽略了空格,因此我们可以将提示更改为:

A diamond ring set on a {
    {rose|yellow|white} gold   # you can also add comments
    | platinum                 # which will be ignored by the DP parser
} band

当然,我们并不局限于一种变体;我们可以添加更多变体,如下所示:

A {diamond|ruby|emerald} ring set on a {classic|thin|thick}
{
    {rose|yellow|white} gold
    | platinum
}
band

此模板可能会生成以下任何提示:

A ruby ring set on a classic rose gold band
A emerald ring set on a thin platinum band
etc.

第二个提示在语法上不正确,对 Stable Diffusion 来说无关紧要,但如果你更喜欢正确的语法,你可以写出类似的东西:

{A diamond|A ruby|An emerald} ring set on a {classic|thin|thick}
{
    {rose|yellow|white} gold
    | platinum
}
band

以下是钻石戒指的结果:

图片[7]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

红宝石戒指:

图片[8]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

祖母绿戒指:

图片[9]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

通配符

如果我们有很多宝石想在我们的戒指中使用呢?您当然可以将它们与红宝石和祖母绿一起添加为变体,但对于许多变体来说,这可能会变得很麻烦。在这种情况下,我们可以使用通配符。

首先,我们在通配符文件夹中创建一个名为的文件。默认情况下,这是 。gems.txtextensions/sd-dynamic-prompts/wildcards

在其中,我们每行添加一个变体,例如

diamond
ruby
emerald

现在,我们的提示更改为:

A __gems__ ring set on a {classic|thin|thick}
{
    {rose|yellow|white} gold
    | platinum
}
band

__gems__是一个通配符,将充当使用gems.txt中每个宝石的变体。请注意,通配符的名称与文件名相同,即gems.txt末尾不带.txt。然后,我们在通配符的开头和结尾添加双下划线。__

整洁!

通配符文件可以使用我们在提示符中使用的所有相同语法。为了演示这一点,让我们创建一个名为 的新文件。在里面,我们添加了:precious_metals.txt

{rose|yellow|white} gold
platinum
silver

将文件移动到通配符文件夹中。现在我们的提示如下所示:

A __gems__ ring set on a {classic|thin|thick} __precious_metals__ band

组合生成

默认情况下,动态提示会从我们的模板生成随机提示。每个提示都会选择一个随机宝石、随机乐队类型和随机贵金属。让我们计算一下我们的模板可以生成的可能环的总数:

Assume we have ten different types of gems in our gems.txt file
Three band thicknesses
Three metals, although gold has three variants, so we actually have five metals.

The total number of potential prompts is  10 * 3 * 5 = 150 different prompts.

如果我们想生成所有这些呢?在这种情况下,我们改为组合模式。

图片[10]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

通配符集合

一个精心设计的通配符集合可以用作构建块,用于创建出色的提示,而无需每次都重新发明轮子。

Dynamic Prompts 提供了一个广泛的通配符库,您可以批量使用这些通配符,也可以选择您感兴趣的文件。 您可以在“通配符管理器”选项卡中查看这些集合。当然,您可以创建自己的通配符文件并将它们放在通配符目录中。

图片[11]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

通配符存储在目录层次结构中。单击主题区域以发现更具体的通配符文件:

图片[12]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

您可以从此处复制任何通配符并在提示中使用它,例如:__artists/European Art/renaissance/italian_renaissance__

最有趣的通配符是那些与艺术和艺术家相关的通配符。这是探索不同风格的好方法。

如果您想同时尝试多位艺术家的风格,请尝试以下方法:

surfer in space, intricate detail, airbrush painting, illustration, by __artists/European Art/modern/pointilism__ and __artists/European Art/modern/american_impressionism__

以下是我收到的一些提示:

surfer in space, intricate detail, airbrush painting, illustration, by Vincent van Gogh and Daniel Garber

surfer in space, intricate detail, airbrush painting, illustration, by Maximilien Luce and Wilson Irvine

surfer in space, intricate detail, airbrush painting, illustration, by Jean Metzinger and John Elwood Bundy
图片[13]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

Dynamic Prompts 的语法允许您同时选择两个艺术家:

surfer in space, intricate detail, airbrush painting, illustration, by {2$$__artists/illustrations/childrens_books__}

生成的提示的一些示例:

surfer in space, intricate detail, airbrush painting, illustration, by Todor Dinov,Ray Goossens

surfer in space, intricate detail, airbrush painting, illustration, by Emily Winfield Martin,Kitty Crowther

surfer in space, intricate detail, airbrush painting, illustration, by Fritz Wegner,Dawu Yu

默认分隔符是 – 如果您更喜欢使用,请更改提示符,如下所示:,and

surfer in space, intricate detail, airbrush painting, illustration, by {2$$ and $$__artists/illustrations/childrens_books__}

请注意 . 如果您不添加它们,则您的组合可能如下所示:and

A mech-warrior in a post-apocalyptic settings by artist1andartist2

你不需要在 2 点停下来;组合语法允许您选择任意数量的艺术家。对于四位艺术家,你是这样写的:

surfer in space, intricate detail, airbrush painting, illustration, by {4$$__artists/illustrations/childrens_books__}

您可以提供一个范围,例如

surfer in space, intricate detail, airbrush painting, illustration, by {2-4$$__artists/illustrations/childrens_books__}

在这里,动态提示将选择 2、3 或 4 位艺术家。

激发灵感的工具

魔术提示

当您查看人们在线发布的提示时,您通常会注意到与照明、分辨率、相机类型等相关的几个修饰符。 当你刚开始时,你可能会对这些修饰符感到不知所措。 魔术提示功能是一种有趣的方式,可以自动向提示添加修饰符。 你可以尝试,但一个好的开始方法是使用一个简单的提示,例如

A mech-warrior in a post-apocalyptic setting.
图片[14]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

这些图片有点朴素。让我们用魔术提示让他们兴奋起来。

图片[15]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

启用 Magic Prompt,然后单击 generate。(请注意,Magic Prompt 使用神经网络根据上下文添加这些内容。 首次使用它时,动态提示将需要下载它,这可能需要一些时间,具体取决于您的 Internet 连接速度。

以下是我在使用 Magic Prompt 时收到的一些示例提示:

A mech-warrior in a post-apocalyptic setting. Digital illustration, Artstation. 8k resolution, Concept art, Detailed digital art

A mech-warrior in a post-apocalyptic setting. Detailed digital art by greg rutkowski, Thomas kinkade, Keith Parkinson, artstation, cgsociety, deviantart, 8k, HD

A mech-warrior in a post-apocalyptic setting. realistic shaded lighting poster by Ilya Kuvshinov katsuhiro, magali villeneuve, artgerm, Jeremy Lipkin and Michael Garmash, Rob Rey and Kentar� Miura style, trending on art station
图片[16]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

当我有一个主题,但我还不确定我希望最终图像看起来如何时,我通常会玩弄魔术提示,直到找到我喜欢的东西。然后,我使用生成的提示并从那里进行调整。

我感到很幸运

获得灵感的另一种方法是通过“我感到幸运”功能。我没有使用神经网络,而是感到很幸运,可以在 Lexica.art 上使用搜索引擎来找到与您的输入相匹配的提示。质量可能会有所不同,但这也是探索潜在空间的一种有趣方式。

图片[17]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

作为我的提示,我得到以下内容:mech-warrior

giant oversized battle robot mech in battle pose is giant baby on a village, wooden fence and tree remains in far background, hero pose, Cinematic focus, Polaroid photo, vintage, neutral colors, soft lights, foggy, natural mysterious intricate detailed grainy photo, by Steve Hanks, by Serov Valentin, by lisa yuskavage, by Andrei Tarkovsky

giant oversized battle robot mech as giant baby on a village, Cinematic focus, Polaroid photo, vintage, neutral colors, soft lights, foggy, by Steve Hanks, by Serov Valentin, by lisa yuskavage, by Andrei Tarkovsky

a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, character illustration, full body illustration, cinematic, dramatic lighting
图片[18]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

有两点值得注意。

首先,与 Magic Prompt 相比,我觉得很幸运提示不一定包含我们的搜索字符串。 这是因为 Lexica 在其提示数据库上执行语义搜索。这意味着即使字符串不匹配,提示也应该是相关的。

其次,如果您在 Lexica.art 网站上查找此提示,您将找不到生成的图像。 这是因为您几乎可以肯定使用的设置与最初创建提示的人不同。

吸引注意力

另一种为图像添加变化的方法,通过更改提示中各种术语的强调。 注意力抓取器随机将重点分配给现有提示。

从上一个我感到幸运的提示开始:

a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, character illustration, full body illustration, cinematic, dramatic lighting
图片[19]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

我们随机添加,添加重点。对于这些图像,我保持种子不变,这样你就可以在不改变任何其他设置的情况下看到改变重点的影响。

a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, character illustration, (full body illustration:1.58), cinematic, dramatic lighting

a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, character illustration, (full body illustration:1.49), cinematic, dramatic lighting

a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, (character illustration:1.26), full body illustration, cinematic, dramatic lighting
图片[20]_Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi

这些变化要微妙得多,如果您想探索图像的微小变化,这些变化可能会有所帮助。

结论

本教程介绍了基础知识。一旦您觉得使用该工具很舒服,就可以尝试其他功能。

💡如有问题或建议,🥳请在社区评论告诉我们。🎨享受精彩的AI绘画乐趣!| 使用Qpipi读图提示功能,获取图片TAG Prompt提示 | Stable Diffusion AI绘图软件常见问题解答 | AI绘画新人必备工具指南

⭕ 注意:请勿使用浏览器的"阅读模式",会导致无法显示下载等内容。

© 版权声明
THE END
❤️ 喜欢就支持一下吧!点赞支持作者喔 👍
点赞13分享
Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用_Qpipi
Stable Diffusion WebUI Dynamic Wildcard,SD WebUI 动态通配符安装使用
此内容为免费阅读,请登录后查看
0积分
网盘密匙:Qpipi
允许生成图像/视频商用
允许再次训练
不允许转售AI模型
不允许生成计算服务费
许可证:CreativeML Open RAIL-M
免费阅读
✍️ 评论 抢沙发

请登录后发表评论

    暂无评论内容