Stable Diffusion(SD)是什么
Stable Diffusion是2022年发布的深度学习文本到图像生成模型,它是一种潜在扩散模型,它由创业公司Stability AI与多个学术研究者和非营利组织合作开发。目前的SD的源代码和模型都已经开源,在Github上由AUTOMATIC1111维护了一个完整的项目,正在由全世界的开发者共同维护。由于完整版对网络有一些众所周知的需求,国内有多位开发者维护着一些不同版本的封装包。开源社区为SD的普及做出了难以磨灭的贡献。
SD最大的特征,就是由于其开源的特性,可以在电脑本地上离线运行。可以在大多数配备至少8GB显存的适度GPU的消费级硬件上运行。笔者推荐显存线是12G。
由于AI训练和产出的本质是软硬件结合了的深度学习原理,因此常常会用到英伟达公司的显卡,以及相关的诸如CUDA、CUDNN,乃至python相关的深度学习组件如xformer、pytorch等,学习AI想要进阶的话非常容易碰到这些需要大量额外学习编程知识的内容,所以非常容易让小伙伴们感到困难。
效果图
![图片[1]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
![图片[2]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
Stable Diffusion 安装
我们可以先安装启动器的运行依赖,并解压秋叶包本体。
第一步:打开“启动器运行依赖-dotnet-6.0.11.exe”来安装。
![图片[3]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
第二步:解压“sd-webui-aki-v4.zip”。
注意:当我们解压好启动器本体的时候,暂时还不要启动,先一起把模型安装了。
![图片[4]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
第三步:导入核心数据。
1、下载“推荐大模型”文件夹中的模型
![图片[5]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
2、并把文件夹里的所有模型放在这个目录下:\sd-webui-aki-v4\models\Stable-diffusion3、同时,还要下载ControlNet模型。
![图片[6]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
4、ControlNet模型文件夹里的所有内容,放在这个目录下:\sd-webui-aki-v4\models\ControlNet
5、最后,需要单独下载推荐LoRA
![图片[7]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
6、这些LoRA是笔者为了方便小伙伴们取用改了名的,需要全部放在这个目录下:sd-webui-aki-v4\extensions\sd-webui-additional-networks\models\lora
7、当大家上手之后就可以参考这一篇文章,并在【大量模型·LoRA】文件夹中寻找自己想要的LoRA了。
![图片[8]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
Stable Diffusion 使用教程
开启软件运行。
解压并导入完毕上述数据之后,就可以点开启动器了。
1、在安装目录下往下拉,找到这个“A启动器.exe“,双击。
![图片[9]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
2、再点击右下角的一键启动。
![图片[10]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
3、再让这个界面多跑一会儿。
![图片[11]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
4、就可以看到它自动在浏览器中打开了一个新的网页,就算是启动成功了。
![图片[12]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
5、最终的效果。
例如:输入一个关键词“一个美女”,点击“生成”,结果效果图如下:
![图片[13]-火爆全网的Stable Diffusion绘图下载+安装+使用教程-知遇博客](https://www.mezhiyu.com/wp-content/themes/zibll/img/thumbnail-lg.svg)
PHP Warning: mysqli_query(): (HY000/1030): Got error 28 from storage engine in /home/ftp/f/free50623/wwwroot/wp-includes/class-wpdb.php on line 2431
WordPress database error Got error 28 from storage engine for query SELECT * FROM wp_posts LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) WHERE (post_type = 'page' AND post_status = 'publish') AND wp_postmeta.meta_key = '_wp_page_template' AND wp_postmeta.meta_value = 'pages/download.php' ORDER BY wp_posts.post_title ASC made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/zibll/single.php'), zib_single, zib_single_content, zib_single_box_content, zib_single_content_footer, do_action('zib_article_content_after'), WP_Hook->do_action, WP_Hook->apply_filters, zibpay_posts_pay_content, zibpay_posts_paid_box, zib_get_template_page_url, get_pages
WordPress database error Got error 28 from storage engine for query SHOW FULL COLUMNS FROM `wp_posts` made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/zibll/single.php'), zib_single, zib_single_content, zib_single_box_content, zib_single_content_footer, do_action('zib_article_content_after'), WP_Hook->do_action, WP_Hook->apply_filters, zibpay_posts_pay_content, zibpay_posts_paid_box, zib_get_template_page_url, wp_insert_post
WordPress database error Got error 28 from storage engine for query SHOW FULL COLUMNS FROM `wp_posts` made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/zibll/single.php'), zib_single, zib_single_content, zib_single_box_content, zib_single_content_footer, do_action('zib_article_content_after'), WP_Hook->do_action, WP_Hook->apply_filters, zibpay_posts_pay_content, zibpay_posts_paid_box, zib_get_template_page_url, wp_insert_post
WordPress database error Got error 28 from storage engine for query SHOW FULL COLUMNS FROM `wp_posts` made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/zibll/single.php'), zib_single, zib_single_content, zib_single_box_content, zib_single_content_footer, do_action('zib_article_content_after'), WP_Hook->do_action, WP_Hook->apply_filters, zibpay_posts_pay_content, zibpay_posts_paid_box, zib_get_template_page_url, wp_insert_post
WordPress database error Got error 28 from storage engine for query SHOW FULL COLUMNS FROM `wp_posts` made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/zibll/single.php'), zib_single, zib_single_content, zib_single_box_content, zib_single_content_footer, do_action('zib_article_content_after'), WP_Hook->do_action, WP_Hook->apply_filters, zibpay_posts_pay_content, zibpay_posts_paid_box, zib_get_template_page_url, wp_insert_post
暂无评论内容