环境要求:
gpu:12G+
python:3.10
cuda:11.8
注意:如果你的电脑配置达不到要求,可以考虑云GPU,买那种小时计算的比较便宜的。
一、安装stable-diffusion-webui
链接: https://pan.baidu.com/s/1N0czN9ND_TeXpucKWYIrFg 提取码: t4de
选择文件:stable-diffusion-webui.zip和模型文件(kanpiromix_v20.safetensors)
这里面的东西是我用官方最新代码集成的,并且下载了基础的模型,保证启动成功,从网盘中下载stable-webui并且解压到gpu上,开始进行python依赖包安装
pip install -r requirements.txt
这里看网络,时间比较长
开启web服务启动stable-webui
python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --port=8080
进入查看结果:
会出现一些错误:
问题1:libGL.so.1: cannot open shared object file: No such file or directory
sudo apt-get update
sudo apt-get install -y libgl1-mesa-glx
问题2:
decoderF is not supported because:
xFormers wasn't build with CUDA support
attn_bias type is <class 'NoneType'>
operator wasn't built - see python -m xformers.info for more info
flshattF@0.0.0 is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see python -m xformers.info for more info
tritonflashattF is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see python -m xformers.info for more info
triton is not available
Only work on pre-MLIR triton for now
cutlassF is not supported because:
xFormers wasn't build with CUDA support
operator wasn't built - see python -m xformers.info for
解决方式:
pip uninstall xformers
pip install xformers
推荐项目python conda环境安装方式:
//创建conda环境
conda create -n stable python=3.10
//激活conda环境
conda activate stable
这里可以选择指定python环境,而且还能打包python环境,由于我用的云gpu,有的时候关机节省费用,再次开机可能需要换环境
二、使用三方模型
(1)对比tensor模型
KanPiroMix v2 - v2.0 | Stable Diffusion Model - Checkpoint | Tensor.Art
tensorart网站模型
(2)我提供的网盘模型文件kanpiromix_v20.safetensors
將模型文件放置在 stable-diffusion-webui/models/Stable-diffusion 目錄下
参照上面测试:将上面一张图片的prompt和negative prompt作为提示词和反提示词
提示词:masutepiece, Best Quality, {Best Quality}, {{masutepiece}}, {hight resolution}, Illustration, 1girl in, Inoue Takina, Long hair, Bangs, Black hair, (Purple eyes:1.2), blush, Shirt, Long sleeves, Dress, bow ribbon, School uniform, White shirt, Collared shirt, Belt bag, Neck ribbon, Blue Dress, Green Ribbon, pleated dress, grey dress, two-tone dress, Blue belt, Lycoris Uniform, Looking at Viewer
反提示词:verybadimagenegative_v1.3, ng_deepnegative_v1_75t, (ugly face:0.8),cross-eyed,sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, bad anatomy, DeepNegative, facing away, tilted head, {Multiple people}, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worstquality, low quality, normal quality, jpegartifacts, signature, watermark, username, blurry, bad feet, cropped, poorly drawn hands, poorly drawn face, mutation, deformed, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, extra fingers, fewer digits, extra limbs, extra arms,extra legs, malformed limbs, fused fingers, too many fingers, long neck, cross-eyed,mutated hands, polar lowres, bad body, bad proportions, gross proportions, text, error, missing fingers, missing arms, missing legs, extra digit, extra arms, extra leg, extra foot, ((repeating hair))
采样算法:DPM++ SDE 计划类型:Karras
迭代步数:23
提示词相关性(CFG Scale):7
随机种子(Seed):1050641675
尺寸:512x768
参考文章:
Stable Diffusion【真人模型】:全网最真实的亚洲女性大模型(附下载资源)_absolutereality 模型下载-CSDN博客