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

@lmliheng/use-comfyui

v0.3.13

Published

Install ComfyUI on a machine where Adelie owns the only exposed port, serve its UI and API through an Adelie workflow reverse proxy, point it at the model weights already on disk, and verify a real render end to end.

Readme

use-comfyui

ComfyUI 的安装与接入流程,做成 Adelie 插件。

在一台对外只开了 Adelie 自己那个端口的机器上(很常见:容器只映射了 8080),ComfyUI 没法 直接对外监听。这个插件让你把 ComfyUI 只绑在 127.0.0.1,由 Adelie 工作流在服务端反向代理 它的界面和 API,浏览器同源访问——顺带还多一个服务器监控页签(CPU / 内存 / 双卡 / 磁盘 / 出图队列)。

安装到 Agent

Adelie → Plugins 插件库 → 从 npm 导入,填包名:

@lmliheng/use-comfyui

装到某个 Agent 后,它的技能列表里会出现 comfyui。

技能做了什么

skills/comfyui/:

| 文件 | 用途 | | --- | --- | | SKILL.md | 完整流程:定拓扑 → 装 → 起 → 接模型 → 装工作流 → 端到端验证 | | templates/install-comfyui.sh | 装 ComfyUI + 独立 venv + 与驱动匹配的 CUDA torch,可重复执行 | | templates/start.sh | 只监听 127.0.0.1 的启动脚本(COMFYUI_PORT / COMFYUI_LISTEN_HOST 可覆盖) | | templates/extra_model_paths.yaml | 把磁盘上已有的权重目录接进来(只建链接,不复制),附各模型键的含义 | | templates/workflow/ | Adelie 工作流:透明反向代理 + /relay/* WebSocket 桥 + /monitor/stats,并注入子路径垫片 | | templates/workflow/ui/base-path.js | 把 ComfyUI 前端自造的根相对地址掰回本挂载点(资产面板空白那件事) | | templates/base-path-dom-test.js | 假 DOM 真跑上面那个垫片,不需要浏览器 | | reference/architecture.md | 代理为什么这么设计、路由与帧协议 | | reference/pitfalls.md | 13 个真踩过的坑(含「页面一直转圈」「资产面板全白」「监控没有 GPU」「只有一张卡在工作」) | | reference/verification.md | 没有无头浏览器时怎么自证:字节比对、带 Origin 的请求、真实出图/出片、假 DOM 真跑前端 |

最值钱的几个坑

  1. 页面永远停在启动动画:ComfyUI 会拒绝任何带 Origin 头的请求(空体 403,Server: aiohttp), 而浏览器 ES module 请求必带 Origin → 前端 JS 全 403。修法:转发时剥掉 origin / sec-fetch-site, 并去掉 HTML 里的 crossorigin。
  2. POST 只回「服务未就绪 / fetch failed」:代理重写请求体后仍转发原 content-length, 长度对不上 undici 直接失败——任何不是紧凑 JSON 的请求体(带空格、换行)都会中招。
  3. 左侧「资产」面板一片空白:接口回的 preview_url 是根相对的(/api/view?…), 经代理后浏览器会把它解析到 Adelie 的根路径(404)。修法:JSON 里掰成相对挂载点的 api/…, 并注入 ui/base-path.js 改写前端自己拼的根相对地址(要改原型访问器,Vue 用 el.src = … 赋值)。
  4. 工作流编译不过:工作流的 TS 环境没有 Node 内置模块类型,import "node:fs" 会失败——用运行期 拼出来的说明符动态 import。
  5. 监控页没有 GPU:HTML 的 id="g0-card" 与脚本里的 $("g0-card") 差一个字符,getElementById 返回 null 抛错,整个 render() 从这里中断。

要求

  • Linux,Python 3.10+,能访问 github.com 与 pypi(走代理用 https_proxy)。
  • NVIDIA GPU 及与 torch wheel 匹配的驱动(可在脚本里改 TORCH_INDEX)。
  • Adelie 0.3.7 及以上。

许可

Apache-2.0。