MCPcopy Index your code
hub / github.com/BennyKok/comfyui-deploy

github.com/BennyKok/comfyui-deploy @v2.3.10

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.3.10 ↗ · + Follow
836 symbols 2,381 edges 245 files 25 documented · 3% updated 7mo agov2.0.0 · 2025-03-24★ 1,52024 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ComfyUI Deploy

Open source comfyui deployment platform, a vercel for generative workflow infra. (serverless hosted gpu with vertical intergation with comfyui)

Check out our latest lcoal demo -> https://github.com/comfy-deploy/comfyui-api-comfydeploy

Full backend and frontend is here -> https://github.com/comfy-deploy/comfydeploy

[!NOTE]
Im looking for creative hacker to join ComfyDeploy's core team! DM me on twitter

Join Discord to chat more or visit Comfy Deploy to get started!

Check out our latest nextjs starter kit with Comfy Deploy

63shots_so 1# How it works

  1. Comfy Deploy Dashboard (https://comfydeploy.com) or self-hosted version
  2. Machines (Long running, on-premise ComfyUI machines and serverless)
  3. Supports runpods, modal, and hosted ComfyDeploy machines (powered by modal)

https://github.com/BennyKok/comfyui-deploy/assets/18395202/85f85325-a4bb-446d-aa67-ed225ee03479

Setting up a basic sd txt2img API

https://github.com/BennyKok/comfyui-deploy/assets/18395202/0fb1829b-401a-41f2-b21a-5b77483c6ee2

Comfy Deploy Plugin Installation

Plugin lets you set up the machine as a target machine, and also upload workflow directly from there

  1. cd custom_nodes
  2. git clone https://github.com/BennyKok/comfyui-deploy.git
  3. Go to (https://comfydeploy.com) or a self-hosted version
  4. Machines -> Add Machines
    • Enter a name and the URL of your machines (set up Ngrok for a public URL for your machines)
    • Create a new ComfyDeploy machines (pick any custom nodes).

Usecase

  1. Deploy a complicated comfy workflow with a versioning system
  2. Manage versioning and easily preview different generated versions' output
  3. Persistent API generated for Production and Staging environment
  4. Run the same comfyui workflow across different remote machines

467shots_so 1# Status & Timeline

WIP, welcomes contributors!! Please join Discord -> https://discord.gg/EEYcQmdYZw

Primary goal -> release v0.1.0 of stable Comfy Deploy

Major areas

  • Security enforcement
  • Error handling
  • QOL workflow improvement
  • API usage examples
  • Load balancing
  • Workflow dependencies checking (custom nodes)
  • Remote machines
  • Serverless machines? Possible to set up a clean environment via Salad, Modal, etc
  • LCM realtime web socket image gen

Tech Stack

  • Shadcn UI

  • NextJS

  • Clerk (Auth)

  • Neon / Vercel Postgres (Database)

  • Drizzle (ORM)

  • R2 / S3 (Object Storage)

Development

  1. git clone https://github.com/BennyKok/comfyui-deploy
  2. cd web
  3. bun i
  4. Start docker
  5. cp .env.example .env.local
  6. Replace JWT_SECRET with openssl rand -hex 32
  7. Get a local clerk dev key for NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY
  8. Keep a terminal live for bun run db-dev
  9. Execute the local migration to create the initial data bun run migrate-local
  10. Finally start the next server with bun dev

Schema Changes

  1. bun run generate
  2. bun run migrate-local

Special Thanks

  • comfyui
  • oss/acc

Self Hosting with Vercel

Build command

next build && bun run migrate-production

Install command

npx bun@1.0.16 install

Env key setup

POSTGRES_URL=

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=

SPACES_ENDPOINT="http://localhost:4566"
SPACES_ENDPOINT_CDN="http://localhost:4566"
SPACES_BUCKET="comfyui-deploy"
SPACES_KEY="xyz"
SPACES_SECRET="aaa"

# generate using -> openssl rand -hex 32
JWT_SECRET=

# r2 settings
SPACES_REGION="auto"
SPACES_CDN_FORCE_PATH_STYLE="true"
SPACES_CDN_DONT_INCLUDE_BUCKET="true"

# digital ocean settings
SPACES_REGION="nyc3"
SPACES_CDN_FORCE_PATH_STYLE="false"

# s3 settings
SPACES_REGION="nyc3"
SPACES_CDN_DONT_INCLUDE_BUCKET="false"
SPACES_CDN_FORCE_PATH_STYLE="true"

Extension points exported contracts — how you extend this code

ErrorBoundaryProps (Interface)
(no doc)
web/src/components/ErrorBoundary.tsx
ErrorBoundaryState (Interface)
(no doc)
web/src/components/ErrorBoundary.tsx
CommandDialogProps (Interface)
(no doc)
web/src/components/ui/command.tsx
TextareaProps (Interface)
(no doc)
web/src/components/ui/textarea.tsx
InputProps (Interface)
(no doc)
web/src/components/ui/input.tsx

Core symbols most depended-on inside this repo

get
called by 253
comfy-nodes/external_video.py
cn
called by 111
web/src/lib/utils.ts
ensure_client_session
called by 20
custom_routes.py
getData
called by 17
web-plugin/index.js
callServerPromise
called by 16
web/src/components/callServerPromise.tsx
write
called by 15
prestartup_script.py
send
called by 15
custom_routes.py
withServerPromise
called by 15
web/src/server/withServerPromise.ts

Shape

Function 580
Method 134
Class 70
Route 39
Interface 13

Languages

TypeScript60%
Python40%

Modules by API surface

custom_routes.py132 symbols
web-plugin/index.js77 symbols
comfy-nodes/external_video.py38 symbols
builder/modal-builder/src/main.py26 symbols
web-plugin/machine-manager.js22 symbols
web/src/components/docs/Search.tsx20 symbols
web-plugin/workflow-list.js20 symbols
web-plugin/model-manager.js20 symbols
web/src/components/Section.tsx17 symbols
web/src/components/docs/Code.tsx13 symbols
builder/modal-builder/src/template/app.py13 symbols
web/src/components/VersionSelect.tsx11 symbols

For agents

$ claude mcp add comfyui-deploy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page