* fix(image upload): skip when using the CD_BYPASS_UPLOAD env var * Revert "fix(image upload): skip when using the CD_BYPASS_UPLOAD env var" This reverts commit 384eda63e6fec6977db3f9e9ba655e0db0719578. * fix(upload outputs): skip images/gifs/files/mesh when env var is true The env var is `CD_BYPASS_UPLOAD`. When that variables is `True`, we don't upload the media to our comfy deploy s3 bucket. There are 2 steps. 1. save the file into our s3 bucket 2. save the saving into our database. When `CD_BYPASS_UPLOAD` is True: 1. Skip the save file into our s3 bucket 2. Skip the save into our database Previously we were skipping the step 1, but not the step 2. So that is the reason of why we keep seeing the comfy deploy URL when fetching the run details: ``` outputs: [ { data:{ gifs: [ { url: "https://comfy-deploy-output.s3.amazonaws.com/video.mp4" } ], text: [ "A text that you displayed with show text node" ] } } ] ``` With the new changes we don't save that into our database, and fetching the details of a run will look like this: ``` outputs: [ { data:{ text: [ "A text that you displayed with show text node" ] } } ] ```
ComfyUI Deploy
Open source comfyui deployment platform, a vercel
for generative workflow infra. (serverless hosted gpu with vertical intergation with comfyui)
Join Discord to chat more or visit Comfy Deploy to get started!
Check out our latest nextjs starter kit with Comfy Deploy
- Comfy Deploy Dashboard (https://comfydeploy.com) or self-hosted version
- Machines (Long running, on-premise ComfyUI machines and serverless)
- 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
cd custom_nodes
git clone https://github.com/BennyKok/comfyui-deploy.git
- Go to (https://comfydeploy.com) or a self-hosted version
- 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).
- Machines -> Add Machines
Usecase
- Deploy a complicated comfy workflow with a versioning system
- Manage versioning and easily preview different generated versions' output
- Persistent API generated for Production and Staging environment
- Run the same comfyui workflow across different remote machines
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
git clone https://github.com/BennyKok/comfyui-deploy
cd web
bun i
- Start docker
cp .env.example .env.local
- Replace
JWT_SECRET
withopenssl rand -hex 32
- Get a local clerk dev key for
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
andCLERK_SECRET_KEY
- Keep a terminal live for
bun run db-dev
- Execute the local migration to create the initial data
bun run migrate-local
- Finally start the next server with
bun dev
Schema Changes
bun run generate
bun run migrate-local
Special Thanks
- comfyui
- oss/acc
Self Hosting with Vercel
Tutorial Created by Ross and Syn
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"