这个扩展专门为整合到 Stable Diffusion WebUI 的 ControlNet 扩展中而设计。
需要预先安装ControlNet 1.1.216
+.
从ControlNet扩展v1.1.411开始,用户不再需要在本地安装此扩展,因为ControlNet扩展现在使用远程端点https://huchenlei.github.io/sd-webui-openpose-editor/,如果未检测到本地编辑器安装。如果您的互联网连接差,或者连接到github.io域名有困难,仍然建议您在本地进行安装。
在 UI 重启后,此扩展将尝试从 Github 下载编译好的 Vue 应用程序。请检查 stable-diffusion-webui\extensions\sd-webui-openpose-editor\dist
是否存在且包含内容。
中国大陆的一些用户报告了使用自动更新脚本下载 dist 时遇到的问题。在这种情况下,用户有两种手动获取 dist 的方法:
确保你已经准备好了 nodeJS 环境并遵循 Development
部分的步骤。运行 npm run build
来编译应用程序。
你可以从 发布 页面下载编译好的应用程序(dist.zip
)。在仓库的根目录解压该包,确保解压后的目录命名为 dist
。
Openpose 编辑器核心是使用 Vue3 构建的。gradio 扩展脚本是一个轻量级的包装器,它将 Vue3 应用程序挂载在 /openpose_editor_index
上。
用户可以直接在 localhost:7860/openpose_editor_index
访问编辑器,如果需要,但主要的入口点是在 ControlNet 扩展中调用编辑器。在 ControlNet 扩展中,选择任何 openpose 预处理器,然后点击运行预处理器按钮。将会生成一个预处理器结果预览。点击生成图像右下角的 Edit
按钮将会在一个模态中打开 openpose 编辑器。编辑后,点击 Send pose to ControlNet
按钮会将姿势发送回 ControlNet。
以下演示展示了基本的工作流程:
(-1, -1)
作为坐标。这种无效的关键点在编辑器中将被设置为不可见。VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
.vue
Imports in TSTypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
Extensions: Show Built-in Extensions
from VSCode's command paletteTypeScript and JavaScript Language Features
, right click and select Disable (Workspace)
Developer: Reload Window
from the command palette.See Vite Configuration Reference.
npm install
npm run dev
npm run build
npm run test:unit
npm run lint
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。