npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

koishi-plugin-comfyui-hub

v0.1.1

Published

Koishi 插件:调用 ComfyUI 工作流实现文生图 / 图生图 / Tagger。

Readme

Koishi ComfyUI Hub 插件

为 Koishi 提供 ComfyUI API 调用能力的插件,基于 ComfyUI 导出的 API 工作流 JSON 实现:

  • 文生图 draw
  • 图生图 img2img
  • 图片打标 tagger(需要你准备对应工作流)

功能特性

  • ✅ 文生图指令 /draw(别名:绘图、文生图、画图)
  • ✅ 多种参数格式支持
  • ✅ 分辨率控制(宽/高)
  • ✅ 超分倍率控制
  • ✅ 合并转发发送
  • ✅ 智能节点识别

安装

在 Koishi 项目中安装(本仓库为本地插件示例):

pnpm i
pnpm build

然后在 Koishi 控制台中启用插件 comfyui-hub 并配置 serverUrl

配置

在 Koishi 插件配置中设置:

{
{
  "serverUrl": "http://127.0.0.1:8188",
  "timeout": 300,
  "defaultNegativePrompt": "bad hands, low quality, blurry",
  "defaultChain": false,
  "txt2imgWorkflow": "example_text2img.json",
  "txt2imgPositiveNode": "6",
  "txt2imgNegativeNode": "7",
  "resolutionNode": "",
  "resolutionWidthField": "width",
  "resolutionHeightField": "height",
  "upscaleNode": "",
  "upscaleScaleField": "resize_scale"
}

配置说明

  • server_url: ComfyUI 服务器地址
  • timeout: 生成超时时间(秒)
  • default_negative_prompt: 默认负面提示词
  • default_chain: 是否默认使用合并转发
  • txt2img_workflow: 工作流文件名(需放在 data/astrbot_plugin_comfyui_hub/workflows/
  • txt2img_positive_node: 正面提示词节点 ID
  • txt2img_negative_node: 负面提示词节点 ID
  • resolution_node: 分辨率节点 ID(留空自动查找 EmptyLatentImage)
  • resolution_width_field: 宽度字段名
  • resolution_height_field: 高度字段名
  • upscale_node: 超分节点 ID(可选)
  • upscale_scale_field: 超分倍率字段名

使用方法

基础用法(文生图)

draw 1girl, solo, smile

指定负面提示词

draw 1girl, solo | bad hands, low quality

高级格式(支持任意顺序)

draw 正面[1girl, solo] 负面[bad hands, low quality]

支持的标记:

  • 正面:正面正向正面提示词正向提示词
  • 负面:负面反向负面提示词反向提示词

支持的括号:[]{}

分辨率控制

draw 1girl, solo 宽1024 高768

支持的参数:

  • 宽度:宽度wwidthx
  • 高度:高度hheighty

超分倍率控制

draw 1girl, solo 放大2

支持的参数:

  • scale倍率超分放大

合并转发

draw 1girl, solo 转发=true

支持的参数:

  • chain转发合并转发
  • 值:true/false/

组合使用

draw 正面[1girl, solo] 负面[bad hands] 宽1024 高768 放大2 转发=是

工作流配置

  1. 插件启动后会在 data/comfyui-hub/workflows/ 初始化示例工作流文件(如 example_text2img.json
  2. 在配置中指定工作流文件名和节点 ID
  3. 插件会自动:
    • 设置正面/负面提示词
    • 修改分辨率(如果指定了宽高)
    • 修改超分倍率(如果指定了倍率)
    • 随机化种子

注意事项

  • 需要先启动 ComfyUI 服务器
  • 确保工作流文件中包含指定的节点 ID
  • 超分功能需要工作流中包含对应的超分节点
  • 生成时间取决于 ComfyUI 服务器性能和图片复杂度