本文へスキップ
Skillpedia
APIとサーバー(バックエンド)48k · #4210

comfyui-gateway

できること

このサービスは、テキストから画像を作成するプログラムであるComfyUIの門番の役割を果たします。画像作成の作業を整理し、ComfyUIに負荷がかかりすぎないようにするとともに、他のプログラムがComfyUIと安全にやり取りできるようにします。

使う場面

  • ✓プログラムで大量の画像を自動的に作成したいとき。
  • ✓画像作成の作業を整理し、優先順位をつけたいとき。
  • ✓ComfyUIで画像の作成が終わったら、他のプログラムに知らせたいとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/comfyui-gateway/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/comfyui-gateway/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“猫の画像を「cute_cat」モデルを使って10枚作成し、完成したら知らせてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このサービスは画像作成のリクエストを受け取り、ComfyUIに負荷がかかりすぎないようキューに並べてから、処理のためにComfyUIへ送ります。作成された画像を保存し、他のプログラムに通知することもできます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

ComfyUI Gateway

Overview

REST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).

When to Use This Skill

  • When the user mentions "comfyui" or related topics
  • When the user mentions "comfy ui" or related topics
  • When the user mentions "stable diffusion api gateway" or related topics
  • When the user mentions "gateway comfyui" or related topics
  • When the user mentions "api gateway imagens" or related topics
  • When the user mentions "queue imagens" or related topics

Do Not Use This Skill When

  • The task is unrelated to comfyui gateway
  • A simpler, more specific tool can handle the request
  • The user needs general-purpose assistance without domain expertise

How It Works

A production-grade REST API gateway that transforms any ComfyUI server into a universal, secure, and scalable service. Supports workflow templates with placeholders, job queuing with priorities, webhook callbacks, result caching, and multiple storage backends.

Architecture Overview

┌─────────────┐     ┌──────────────────────────────────┐     ┌──────────┐
│   Clients    │────▶│        ComfyUI Gateway           │────▶│ ComfyUI  │
│ (curl, n8n,  │     │                                  │     │ Server   │
│  Claude,     │     │  ┌─────────┐  ┌──────────────┐  │     │ (local/  │
│  Lovable,    │     │  │ Fastify │  │ BullMQ Queue │  │     │  remote) │
│  Supabase)   │     │  │ API     │──│ (or in-mem)  │  │     └──────────┘
│              │◀────│  └─────────┘  └──────────────┘  │
│              │     │  ┌─────────┐  ┌──────────────┐  │     ┌──────────┐
│              │     │  │ Auth +  │  │ Storage      │  │────▶│ S3/MinIO │
│              │     │  │ RateL.  │  │ (local/S3)   │  │     │(optional)│
│              │     │  └─────────┘  └──────────────┘  │     └──────────┘
└─────────────┘     └──────────────────────────────────┘

Components

Component Purpose File(s)
API Gateway REST endpoints, validation, CORS src/api/
Worker Processes jobs, talks to ComfyUI src/worker/
ComfyUI Client HTTP + WebSocket to ComfyUI src/comfyui/
Workflow Manager Template storage, placeholder rendering src/workflows/
Storage Provider Local disk + S3-compatible src/storage/
Cache Hash-based deduplication src/cache/
Notifier Webhook with HMAC signing src/notifications/
Auth API key + JWT + rate limiting src/auth/
DB SQLite (better-sqlite3) or Postgres src/db/
CLI Init, add-workflow, run, worker src/cli/

Quick Start


## 1. Install

cd comfyui-gateway
npm install

## 2. Configure

cp .env.example .env

## 3. Initialize

npx tsx src/cli/index.ts init

## 4. Add A Workflow

npx tsx src/cli/index.ts add-workflow ./workflows/sdxl_realism_v1.json \
  --id sdxl_realism_v1 --schema ./workflows/sdxl_realism_v1.schema.json

## 5. Start (Api + Worker In One Process)

npm run dev

## Or Separately:

npm run start:api   # API only
npm run start:worker # Worker only

Environment Variables

All configuration is via .env — nothing is hardcoded:

Variable Default Description
PORT 3000 API server port
HOST 0.0.0.0 API bind address
COMFYUI_URL http://127.0.0.1:8188 ComfyUI server URL
COMFYUI_TIMEOUT_MS 300000 Max wait for ComfyUI (5min)
API_KEYS "" Comma-separated API keys (key:role)
JWT_SECRET "" JWT signing secret (empty = JWT disabled)
REDIS_URL "" Redis URL (empty = in-memory queue)
DATABASE_URL ./data/gateway.db SQLite path or Postgres URL
STORAGE_PROVIDER local local or s3
STORAGE_LOCAL_PATH ./data/outputs Local output directory
S3_ENDPOINT "" S3/MinIO endpoint
S3_BUCKET "" S3 bucket name
S3_ACCESS_KEY "" S3 access key
S3_SECRET_KEY "" S3 secret key
S3_REGION us-east-1 S3 region
WEBHOOK_SECRET "" HMAC signing secret for webhooks
WEBHOOK_ALLOWED_DOMAINS * Comma-separated allowed callback domains
MAX_CONCURRENCY 1 Parallel jobs per GPU
MAX_IMAGE_SIZE 2048 Maximum dimension (width or height)
MAX_BATCH_SIZE 4 Maximum batch size
CACHE_ENABLED true Enable result caching

…

よくある質問

ComfyUIとは何ですか?

テキストによる説明から、AIを使って画像を作成するプログラムです。

この「ゲートウェイ」は何のためのものですか?

画像作成のリクエストを管理・整理し、他のプログラムを通じてComfyUIを使う人にとって、処理をより効率的かつ安全にする役割を担います。

どのような種類の画像でも作成できますか?

はい。ただし、作りたい画像の種類に必要なモデルやツールがComfyUIに設定されている必要があります。

詳細

作者による元の説明

REST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#4210
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル