🐼 咒语?玄学?Stable Diffusion提示词到底怎么写 prompt语法详解 在SD中用prompt提示词语法 + xyz脚本 实现变脸动画 无需任何插件
TLDR本期教程深入探讨了Stable Diffusion中prompt提示词的编写技巧,通过实例展示了如何仅用prompt和xyz脚本实现变脸动画,无需插件。讲解了提示词顺序的重要性、逗号的分割作用、关键词权重的手动标记以及指定关键词参与作图的百分比或采样步数。还介绍了如何通过负数排除不喜欢的元素,并通过矩阵试词功能测试不同词的排列组合效果,为观众提供了丰富的SD作图知识。
Takeaways
- 🎨 The tutorial focuses on understanding and utilizing prompt words effectively in Stable Diffusion (SD) for creating images and animations without plugins.
- 🌟 The order of words in a prompt significantly affects the output, with different sequences resulting in different images.
- 📝 Commas are used to separate keywords, and their presence or absence can alter the resulting image.
- 🔢 Weighting keywords with parentheses and a colon followed by a value can increase their influence on the image generation.
- 🎯 Holding Ctrl and using the numeric keypad to adjust weights is a quick method to modify keyword influence.
- 🔄 Specifying the percentage or sampling steps a keyword contributes to the image generation can be done using brackets and a double colon followed by a value.
- 🚫 Negative values in brackets for sampling steps can eliminate certain elements from the image entirely.
- 🤹 Using a combination of single and paired keywords with sampling step percentages can create complex image compositions and transitions, such as a transformation or 'face-changing' effect.
- 🧬 The matrix prompt feature in SD allows for testing various keyword combinations and their impact on image generation by separating them with vertical lines.
- 📈 The tutorial provides a foundation for understanding prompt syntax and encourages experimentation for achieving desired image outcomes.
- 📹 The method for creating a stable face-changing animation with SD will be demonstrated in a follow-up video.
Q & A
在Stable Diffusion中,改变提示词的顺序会有什么影响?
-在Stable Diffusion中,改变提示词的顺序会影响图像的生成结果。不同的词语顺序会导致SD分配给关键词的权重不同,从而产生不同的图像。
逗号在提示词中的作用是什么?
-逗号在提示词中用于分割关键词,有逗号分割和没有逗号分割的描述会导致不同的图像生成结果。
如何通过手动标记权重的方式给指定的关键词赋权?
-可以通过将需要赋权的关键词用括号括起来,并在后面加上冒号和需要赋权的数值来进行权重的手动标记。例如,(blue hair):1.5 表示将'blue hair'的权重设为1.5。
在Stable Diffusion中,如何指定关键词参与作图的百分比或采样步数?
-可以使用方括号来指定关键词参与作图的百分比或采样步数。例如,[blue hair]:0.5 表示'blue hair'这个词参与到做图中的步数是总采样步数的50%。
如果使用小括号代替方括号来指定采样步数,会有什么效果?
-使用小括号指定采样步数时,如果给到的数值大于1,SD的出图会崩掉。如果数值是0-1之间的小数,SD可以画出图片,且蓝色头发的明显程度会随着百分比的增加而更加明显。
给出的采样步数大于总步数会导致什么结果?
-如果给出的采样步数大于总步数,最终的出图结果并不会因为步数的增加而变得更复杂,步数超出部分会被忽略。
负数在指定关键词采样步数时有什么作用?
-给出负数作为采样步数时,可以消除不想出现的元素。例如,将'blue hair'的步数设为负数,会消除所有蓝色的元素。
如何使用Stable Diffusion的矩阵试词功能来测试不同词的排列组合?
-可以将试验的词用竖线分隔开,并在脚本中选择提示词矩阵的脚本,以实现不同词的排列组合的测试。
在视频中提到的变脸动画是如何实现的?
-变脸动画是通过分段绘制的语法和指定双词参与作图的步数比例来实现的。通过调整这些数值,可以控制图像生成过程中不同元素的介入时机和占比,从而实现变脸效果。
如何通过提示词排除不喜欢的元素?
-如果不喜欢某个元素,可以使用赋权方法给予该元素负数的采样步数,从而在图像生成过程中排除该元素。
视频中提到的1 girl, Blue hair, Red hat的矩阵图是如何生成的?
-通过将这些关键词用竖线分隔,并启用提示词矩阵脚本,可以生成包含所有这些关键词排列组合可能性的矩阵图。
Outlines
🎨 Introduction to Prompt Techniques in SD Tutorials
This paragraph introduces the viewer to the 25th episode of the SD series tutorials, focusing on the use of prompt words in Stable Diffusion (SD). The creator demonstrates a face-changing animation without any animation plugins, achieved solely through prompt syntax. The video emphasizes the importance of understanding prompt words, even when using controlnet, which is more controllable and intuitive. The creator also mentions their usual approach of copying, modifying, and reflecting on prompt words to achieve satisfactory results.
📝 Understanding Prompt Syntax and Weighting in SD
This section delves into the intricacies of prompt syntax in SD, explaining how the order of words affects the outcome of generated images. It highlights the impact of comma usage and the ability to manually assign weights to specific keywords using parentheses and colons. The paragraph also introduces the concept of specifying the percentage of steps a word participates in the image generation process using brackets and double colons. Various examples are given to illustrate how these techniques can influence the final image, including the effects of changing the position of keywords and the use of negative values for exclusion.
🔍 Advanced Prompt Techniques and Matrix Testing
The final paragraph discusses advanced prompt techniques, including the use of parentheses for step control and the concept of negative values to eliminate certain elements from the generated images. It also introduces the matrix prompt feature in SD, which allows for testing various combinations of prompts to see their effects on the generated images. The creator provides an example of how to use this feature and mentions that the tutorial will continue in the next video with a detailed demonstration of creating a face-changing animation using the techniques discussed.
Mindmap
Keywords
💡Stable Diffusion
💡prompt提示词
💡controlnet
💡权重
💡采样步数
💡变脸动画
💡逗号
💡Ctrl键和上下箭头
💡矩阵试词
💡步数比例
Highlights
本视频是SD系列教程的第25期,专注于讲解prompt提示词的编写技巧。
展示了如何仅使用prompt提示词法和xyz脚本在Stable Diffusion中实现变脸动画,无需任何插件。
为了动画的稳定性,虽然使用了controlnet作为辅助,但这并不是必须的。
提示词的顺序对生成的图像有重要影响,不同的顺序会导致不同的图像结果。
逗号在prompt中的作用是分割关键词,影响最终的图像。
通过手动标记权重的方式,可以给指定的关键词赋权,例如使用括号和冒号。
可以使用Ctrl键和数字键盘的上下箭头给词语赋权,这是一种快捷的操作技巧。
指定关键词参与作图的百分比或采样步数,可以使用方括号和双冒号的语法。
使用小括号而不是中括号,可以控制关键词参与作图的步数,但数值不能大于总步数。
给出的步数如果大于总采样步数,不会使图像更复杂,而是保持不变。
给负数值的采样步数可以消除某些元素在图像中的存在。
通过指定双词参与作图的步数比例,可以实现图像的分段绘制。
SD的矩阵试词功能可以用来测试不同词分别参与作图的效果。
视频最后会演示如何使用这些技巧制作变脸动画,并提供操作注意事项和细节。
通过掌握这些提示词的技巧,每个人都可以制作变脸动画,无需动画插件。
视频旨在帮助观众更好地理解prompt提示词的作用和编写方法。
观众可以通过点赞支持视频,以期待下一期的内容更新。