Python之AI绘画stable-diffusion
背景
学生突然对ai绘画感兴趣,研究了一下。
GitHub
https://github.com/AUTOMATIC1111/stable-diffusion-webui
安装步骤
安装Python3.10.6
安装Git
git bash之前装过
clone代码
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
下载model.ckpt
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Dependencies
把下载的ckpt重命名然后放入stable-diffusion-webui\models\Stable-diffusion下面.
运行webui-user.bat
首先配置webui-user.bat
然后运行webui-user.bat,自动安装需要的东西
使用
浏览器输出提示的地址
txt2img输入如下提示
NSFW, Prhololive, uruha_rushia, 1girl, bangs, bare shoulders, red eyes, blue dress, blue green hair, blue sleeves, blush, bow, breasts, chick, collarbone, detached collar, detached sleeves, double bun, eyebrows visible through hair, frills, hair orhament, medium hair, off-shoulder dress
遇到的问题
没下载model.ckpt
Torch is not able to use GPU
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1742
修改webui-user.bat,添加--skip-torch-cuda-test
set COMMANDLINE_ARGS= --lowvram --precision full --no-half --skip-torch-cuda-test
AI-chatgpt
如果这篇文章对你有用,可以关注本人微信公众号获取更多ヽ(^ω^)ノ ~
