Table of Contents
ComfyUI was designed as a desktop tool. Production deployment requires extra discipline.
Production ComfyUI: systemd unit, FastAPI wrapper translating OpenAI image format → ComfyUI workflow JSON, Redis queue for async, Caddy + auth in front, S3 for output storage.
Production setup
- ComfyUI under systemd, bind to localhost only
- FastAPI wrapper exposes /v1/images/generations OpenAI-compatible
- Redis queue buffers incoming requests
- Worker picks queue, calls ComfyUI, uploads result to S3
- Webhook callback or polling for client
- Caddy + auth (per-key API tokens via LiteLLM)
API patterns
- Synchronous: blocks until image ready. Simple, holds connection 5-15s.
- Async with webhook: returns job ID, calls webhook on completion. Better for high concurrency.
- Async with polling: returns job ID, client polls for status. Simplest if no webhook infra.
Verdict
ComfyUI is production-ready with the right wrapper. Don't expose ComfyUI's native UI to end users.
Bottom line
Wrap ComfyUI properly. See image generation API guide.