文章主题:stable diffusion, controlnet, image generation, artistic design
【Stable Diffusion教程】ControlNet的安装使用
part1 初步介绍ControlNet的原理、功能
尊敬的观众们,你们好!我在此荣幸地邀请大家共同参与我们Stable Diffusion系列教程的第11期。本次教程的主题是实现从视频到动漫风格的转变,带领大家探索这个充满创意与挑战的领域。让我们一起跟随教程的步骤,逐步掌握这一技术,创造出令人惊艳的作品。
我们现在正式引入ControlNet这个概念。在此之前,我们已经向您展示了如何构建基本环境和安装普通插件的方法。对于那些仍然不太了解的朋友,建议您浏览我们的主页并观看播放列表中的相关视频,以便更好地理解这个主题。
在过去,当我们使用SD进行图像生成时,其过程往往是不可预测的,如同天马行空一般。然而,这种情况自从引入了ControlNet技术以来,得到了显著的改善。现在,我们可以按照预期的样子来生成图片了,这在很大程度上提高了图像生成的质量和效率。
在这期的视频中,我们将重点讨论ControlNet技术,这也是我们ControlNet系列的第一期内容。
好 ,那么我们废话不多说,马上开始今天的内容。
说到这个ControlNet,还是要提出三个灵魂的拷问!
①这个ControlNet是什么?
②这个ControlNet到底能做什么?
③这个ControlNet到底怎么用?
那么,作为我们这个跳跃性教学的”无厘头”大师
首先回答第一个问题(ControlNet是什么):
ControlNet是一种针对条件生成对抗神经网络(如Stable Diffusion等)的改进方法,其主要思路是通过额外的输入来操控预训练的大模型。这种方法可以视为端到端的训练策略。简单来说,ControlNet的安装和使用的基本步骤如下:ControlNet旨在解决文生图大模型中存在的问题,即单纯依赖关键词控制难以实现对细节的精确控制。通过引入一或多个参考图,AI可以更接近地生成符合我们期望的图片。借助ControlNet的帮助,我们可以在很大程度上减少对提示词的依赖,从而避免采用碰运气的方式进行抽卡式创作。
第二个问题(ControlNet到底能做什么):
ControlNet的边缘检测模型或线稿模型能够提取线稿,然后结合提示词和风格模型,对图像进行着色和风格化处理。这样一来,用户就能够通过ControlNet精确地操控AI图像的生成过程,比如上传线稿让AI自动上色和渲染,或者调整人物姿态来生成相应的线稿等。正因如此,ControlNet得以在艺术设计、插画制作、广告设计等领域发挥广泛的作用,满足各种精细控制图像生成的需求。
part2 ControlNet的安装和基本使用
【首先controlnet的安装】
Controlnet的部署过程可以分为以下几个主要步骤:首先,打开SD接口(网址:http://127.0.0.1:7860),然后点击“扩展”按钮。接下来,选择“可用”选项并点击“加载”。在搜索框中输入“Controlnet”,最后点击“重启界面”完成安装。
【检查control是否安装好】
方法一:已安装界面出现controlnet的版本信息
方法二:文生图界面出现Controlnet的一栏
【Controlnet模型下载】
要下载并使用Hugging Face提供的预训练模型,您需要遵循以下几个简单步骤。首先,访问作者主页(网址:https://huggingface.co/lllyasviel)。在该页面上,找到您想要下载的模型,然后点击相应的模型界面。接下来,选择“Files and versions”选项卡,以便您可以下载模型的最新版本。完成下载后,将所得到的文件移动到您的计算机上。然后,找到保存模型的目录文件夹——SD-Webui/extensions/SD-webui-controlnet/models。将下载好的文件放入该文件夹中,以便在未来的使用中方便地找到和使用该模型。
【Controlnet初阶使用】
步骤:将选择好的引导图拖拽入Controlnet的图片上传处→点击下方的启用;若显存低于6g,则选择低缓存;勾选预览和像素完美→controlnet的类型,可以初步选择openpose(姿态控制),点击旁边类似于小爆炸的图标
本期所写的提示词(可复制):
(masterpiece, best quality:1. 4), solo, outdoor, lake,sunnyday, yoga pose,Palms pressed together, (tight yoga pants, white yoga pants:1. 4), (realistic, hyperrealistic:1. 4), 4k hdr,
(worst quality, low quality, normal quality:1.4), lowres, bad anatomy, ((bad hands)), text, error, missing fingers, extra digit, fewer digits,head out of frame, cropped, letterboxed, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, censored, letterbox, blurry, monochrome, fused clothes, nail polish, boring, extra legs, fused legs, missing legs, missing arms, extra arms, fused arms, missing limbs, mutated limbs, dead eyes, empty eyes, 2girls, multiple girls, 1boy, 2boys, multiple boys, multiple views, jpeg artifacts, text, signature, watermark, artist name, logo, low res background, low quality background, missing background, white background
【没有合适姿势引导图片的解决方案】
方法一:自己摆pose拍照,让Controlnet识别
方法二:编辑右边的图形,使用Openpose Editor
方法三:第三方网站(网址:https://app.posemy.art/)截选3D人形,直接生成openpose
part3 结尾
可能是因为我讲得太详细了,所以这一集的时间有点长。那接下来呢,我们会详细介绍关于controlnet的type,比如openpose、canny、depth等等。敬请期待哦!返回搜狐,查看更多
责任编辑:
AI时代,拥有个人微信机器人AI助手!AI时代不落人后!
免费ChatGPT问答,办公、写作、生活好得力助手!
搜索微信号aigc666aigc999或上边扫码,即可拥有个人AI助手!