- image-annotate:plugin/glue.js 的命令与节点操作 icon: layer → pencil-ruler(已重新构建 src/index.js)1.0.2 → 1.0.3 - xianyi-cutout:两条注册 icon: ref → scissors,1.0.2 → 1.0.3 - white-bg-800:两条注册 icon: fit → vector-square,1.2.0 → 1.2.1 - npm run validate:7/7 通过 注:宿主已内置同名图标(pencil-ruler / scissors / vector-square),发布到 KV 后刷新即生效。
鲜艺抠图(插件)
调用本机 鲜艺抠图 服务把节点里的图抠成透明底,写回为新的参考图节点。
服务契约(对齐 iwb-plaus v3.1.3)
POST {apiUrl}/rmbg?crop=true|false # 默认 http://localhost:30092
Content-Type: application/octet-stream # 原始图片字节;无 token、无 JSON
→ 返回原始 PNG 字节
比原扩展多做的:补齐了超时(AbortController + 可配 timeoutMs,原版没有任何超时)。
入口
- 节点漂浮菜单「抠图」(仅 ref 图片输入节点时出现;产图节点先「复制 / 插入为参考图节点」)
- 右键菜单「插件命令 → 抠图:选中节点」
设置
| 键 | 说明 |
|---|---|
apiUrl |
本地服务地址。CSP 仅放行 127.0.0.1 / localhost 的 30092 端口 |
crop |
抠图后裁掉多余透明像素(对应接口 crop 参数) |
timeoutMs |
超时毫秒(默认 120000) |
发布
cd /Users/qiqi/open/github/image-workbench-web
# 两个发布器现在都会写 SRI integrity(.mjs 默认 dry-run,--upload 才写 KV)
cp /Users/qiqi/open/github/iwb-plugins/xianyi-cutout/src/index.js /tmp/plugin-xianyi-cutout.js
node scripts/plugins-publish.mjs /tmp/plugin-xianyi-cutout.js --upload --version xianyi-cutout=1.0.1