Stable Diffusion - StableDiffusion WebUI 软件升级与扩展兼容

欢迎关注我的CSDN:https://spike.blog.csdn.net/
本文地址:https://spike.blog.csdn.net/article/details/134463035

目前,StableDiffusion WebUI 的版本是 1.6.0,同步更新 controlnet、tagcomplete、roop、easy-prompt-selector等插件,解决启动时,遇到的 Warning 信息。

SD-WebUI

与当前工程同步:

Logs

更新 sd-webui-controlnet,将 controlnet 插件升级至最新版本,即:

cd workspace/stable_diffusion_webui/extensions/sd-webui-controlnet
git remote -v
# https://ghproxy.com/ 代理已经失效,需要重新设置
git remote set-url origin https://github.com/Mikubill/sd-webui-controlnet.git
git pull origin main

更新 a1111-sd-webui-tagcomplete 插件:

cd workspace/stable_diffusion_webui/extensions/a1111-sd-webui-tagcomplete
git remote -v
# https://ghproxy.com/ 代理已经失效,需要重新设置
# git remote set-url origin https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
git remote set-url origin git@github.com:DominikDoom/a1111-sd-webui-tagcomplete.git
git pull origin main

提示信息,不需考虑,参考 GitHub - Issues:

"Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu."
标签自动完成:无法定位模型关键字扩展,Lora 触发词补全,将仅限于通过额外网络菜单添加的内容。

更新 sd-webui-roop 插件:

cd workspace/stable_diffusion_webui/extensions/sd-webui-roop
git remote -v
# https://ghproxy.com/ 代理已经失效,需要重新设置
git remote set-url origin git@github.com:s0md3v/sd-webui-roop.git
git pull origin main

Warning 信息,修复参考 Deprecation Warning,替换文件 faceswap.py:

workspace/stable_diffusion_webui/extensions/sd-webui-roop/scripts/faceswap.py:38: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  img = gr.inputs.Image(type="pil")
workspace/stable_diffusion_webui/modules/gradio_extensons.py:25: GradioDeprecationWarning: `optional` parameter is deprecated, and it has no effect
  res = original_IOComponent_init(self, *args, **kwargs)
workspace/stable_diffusion_webui/extensions/sd-webui-roop/scripts/faceswap.py:55: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  upscaler_name = gr.inputs.Dropdown(
workspace/stable_diffusion_webui/extensions/sd-webui-roop/scripts/faceswap.py:74: GradioDeprecationWarning: Usage of gradio.inputs is deprecated, and will not be supported in the future, please import your component from gradio.components
  model = gr.inputs.Dropdown(

更新 sdweb-easy-prompt-selector 插件:

cd workspace/stable_diffusion_webui/extensions
git clone git@github.com:blue-pen5805/sdweb-easy-prompt-selector.git

Warning 信息,参考 emove style() method

workspace/stable_diffusion_webui/extensions/sdweb-easy-prompt-selector/scripts/easy_prompt_selector.py:97: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
reload_button.style(size='sm')

重新启动 sd-webui 工程:

top
nohup python -u launch.py --listen --port 9301 --xformers --no-half-vae --enable-insecure-extension-access --theme dark --gradio-queue > nohup.62.out &
tail -f nohup.62.out

启动日志:

Python 3.9.5 (default, Nov 23 2021, 15:27:38) 
[GCC 9.3.0]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing sd-webui-controlnet requirement: changing opencv-python version from 4.7.0.72 to 4.8.0
Checking roop requirements
Install insightface==0.7.3
Installing sd-webui-roop requirement: insightface==0.7.3
Install onnx==1.14.0
Installing sd-webui-roop requirement: onnx==1.14.0
Install onnxruntime==1.15.0
Installing sd-webui-roop requirement: onnxruntime==1.15.0
Install opencv-python==4.7.0.72
Installing sd-webui-roop requirement: opencv-python==4.7.0.72
Launching Web UI with arguments: --listen --port 9301 --xformers --no-half-vae --enable-insecure-extension-access --theme dark --gradio-queue
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer initialized. version: 23.9.2, num models: 12
dirname:  stable_diffusion_webui/localizations
localizations:  {'zh-Hans (Stable) [vladmandic]': 'stable_diffusion_webui/extensions/stable-diffusion-webui-localization-zh_Hans/localizations/zh-Hans (Stable) [vladmandic].json', 'zh-Hans (Stable)': 'stable_diffusion_webui/extensions/stable-diffusion-webui-localization-zh_Hans/localizations/zh-Hans (Stable).json', 'zh-Hans (Testing) [vladmandic]': 'stable_diffusion_webui/extensions/stable-diffusion-webui-localization-zh_Hans/localizations/zh-Hans (Testing) [vladmandic].json', 'zh-Hans (Testing)': 'stable_diffusion_webui/extensions/stable-diffusion-webui-localization-zh_Hans/localizations/zh-Hans (Testing).json'}
2023-11-16 14:36:48,609 - ControlNet - INFO - ControlNet v1.1.417
ControlNet preprocessor location: stable_diffusion_webui/extensions/sd-webui-controlnet/annotator/downloads
2023-11-16 14:36:48,887 - ControlNet - INFO - ControlNet v1.1.417
sd-webui-prompt-all-in-one background API service started successfully.
2023-11-16 14:36:50,866 - roop - INFO - roop v0.0.2
2023-11-16 14:36:50,941 - roop - INFO - roop v0.0.2
Loading weights [0f1b80cfe8] from stable_diffusion_webui/models/Stable-diffusion/DreamShaper_XL1.0_alpha2.safetensors
Creating model from config: stable_diffusion_webui/repositories/generative-models/configs/inference/sd_xl_base.yaml
Running on local URL:  http://0.0.0.0:9301
Applying attention optimization: xformers... done.
Model loaded in 9.0s (load weights from disk: 2.1s, create model: 0.9s, apply weights to model: 4.7s, apply half(): 0.1s, move model to device: 0.1s, load textual inversion embeddings: 0.3s, calculate empty prompt: 0.6s).
To create a public link, set `share=True` in `launch()`.
Startup time: 372.0s (prepare environment: 263.5s, import torch: 17.0s, import gradio: 3.6s, setup paths: 5.2s, initialize shared: 1.9s, other imports: 4.0s, setup codeformer: 0.7s, setup gfpgan: 0.2s, load scripts: 62.6s, create ui: 4.2s, gradio launch: 5.5s, app_started_callback: 3.7s).

测试图像:

Model

1 girl,(full body:1.3),(standing posture:1.2),portrait,(looking at the viewer:1.2),(asian girl:1.3),beautiful woman,(gothgal,lace,frills,choker,porcelain white skin,dress:1.3),gothgal leather boots,(turtleneck and crewneck:1.2),standing pose with legs apart,gothic style clothing,dark and mysterious and noble and romantic and decadent,combinations of red and black and white,cold and heavy and strong contrast effect,leather and PVC and rubber and latex and gloss and texture,silk and brocade and velvet and lace and luxury and vintage,embroidery and badges and crosses and skulls,tight fitting and poulaine pointed shoes and chausses leggings and hennin conical hat,religious and ornaments and jewelry and pointed shoes and veils and gloves,RAW,analog,Nikon Z 85mm,(best quality:1.2),(masterpiece:1.2),(realistic:1.2),4k,god rays,photorealistic,realistic,photorealism,photography,8k uhd,photography,
Negative prompt: (nsfw:1.2),naked,nipple,(out of frame:1.3),(3d, render, cgi, doll, painting, fake, cartoon, 3d modeling:1.4),(worst quality, low quality:1.4),monochrome,child,deformed,malformed,deformed face,bad teeth,bad hands,bad fingers,bad eyes,long body,blurry,duplicate,cloned,duplicate body parts,disfigured,extra limbs,fused fingers,extra fingers,twisted,distorted,malformed hands,mutated hands and fingers,mutated legs,extra legs,too many legs,conjoined,missing limbs,bad anatomy,bad proportions,logo,watermark,text,copyright,signature,lowres,mutated,mutilated,artifacts,gross,ugly,bad hands,bunch of peoples,lowres,tattoos,panties,bra,big hands,
Steps: 30, Sampler: DPM++ 3M SDE Karras, CFG scale: 7, Seed: 3147550502, Size: 768x1152, Model hash: 0f1b80cfe8, Model: DreamShaper_XL1.0_alpha2, Denoising strength: 0.25, ADetailer model: face_yolov8n.pt, ADetailer prompt: “asian girl,make up,beauty,”, ADetailer confidence: 0.3, ADetailer dilate/erode: 4, ADetailer mask blur: 4, ADetailer denoising strength: 0.4, ADetailer inpaint only masked: True, ADetailer inpaint padding: 32, ADetailer version: 23.9.2, Hires upscale: 2, Hires steps: 10, Hires upscaler: 4x-UltraSharp, Version: v1.6.0

### 如何安装 Stable Diffusion #### 选择操作系统 对于稳定性和兼容性的考虑,Ubuntu系统推荐使用20.04版本,因为该版本具有较高的glibc、gcc版本,这使得软件包的安装更加顺畅[^3]。 #### 准备环境 - **安装Git** - 打开终端并执行命令`sudo apt-get update && sudo apt-get install git`来更新仓库以及安装Git工具。 - **安装Python** - 同样通过终端输入`sudo apt-get install python3.9 python3-pip`完成Python及其pip管理器的获取。为了加速后续依赖库下载速度,建议配置国内镜像源作为默认索引地址,比如阿里云提供的服务:`pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/` - **克隆项目代码** - 利用先前安裝好的Git客户端拉取Stable-Diffusion-WebUI项目的最新副本至本地磁盘指定位置:`git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git` #### 配置运行环境 进入刚创建的工作区(`cd stable-diffusion-webui`)之后,按照官方说明文档指示操作即可初始化虚拟环境并激活它;接着依照提示逐步解决可能出现的各种依赖关系问题直至成功启动应用程序[^1]。 #### 安装模型文件 通常情况下,默认已经包含了必要的预训练权重集,但仍需确认是否需要额外下载特定风格或功能增强型的数据集,并将其放置于适当路径下以便程序调用。 #### 汉化界面 如果希望获得中文支持,则可以访问专门针对此目的而设的GitHub页面[^4],遵循那里给出的方法实现语言转换,例如可以通过扩展机制加载名为"Bilingual"(双语对照)的功能模块来辅助翻译工作[^5]。 ```bash # 更新apt包列表并安装git sudo apt-get update && sudo apt-get install git # 安装python3.9和pip sudo apt-get install python3.9 python3-pip # 设置pip为中国大陆镜像源 pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ # 克隆stable diffusion web ui项目 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git # 进入项目目录 cd stable-diffusion-webui # (假设已按上述指导完成了其余步骤) # 如果要安装bilingual插件, 可以这样做: ./webui.sh --update-all-extensions ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ManonLegrand

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值