worker-comfyui  by runpod-workers

RunPod worker for ComfyUI as a serverless API

Created 1 year ago
568 stars

Top 56.6% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a serverless API for ComfyUI, enabling users to run complex Stable Diffusion workflows on demand via RunPod's infrastructure. It targets developers and power users of AI image generation who need scalable, API-driven access to ComfyUI without managing dedicated hardware. The primary benefit is the ability to integrate ComfyUI's advanced features into applications and pipelines through a simple API.

How It Works

The project packages ComfyUI into Docker images, pre-loaded with specific Stable Diffusion models (SDXL, SD3, FLUX.1) or as a base image for custom deployments. These Docker images are deployed as serverless endpoints on RunPod. Users interact with the endpoint via a REST API, submitting ComfyUI workflows as JSON and optionally providing input images. The API handles job queuing, GPU allocation, workflow execution, and returns generated images as base64 strings or uploads them to AWS S3.

Quick Start & Requirements

  • Install/Run: Deploy a serverless endpoint on RunPod using one of the provided Docker images (e.g., runpod/worker-comfyui:3.6.0-sdxl).
  • Prerequisites: NVIDIA GPU (VRAM requirements vary by model, e.g., 8GB for SDXL, 24GB for FLUX.1), Docker, RunPod account.
  • Setup: Creating a RunPod template and endpoint typically takes a few minutes.
  • Docs: RunPod Serverless Endpoints, ComfyUI API

Highlighted Details

  • Supports multiple pre-packaged models including SDXL, SD3, and FLUX.1 variants.
  • Allows custom model and node inclusion via Network Volumes or custom Docker images.
  • Offers options to return images as base64 or upload directly to AWS S3.
  • Provides local testing capabilities with a simulated worker API.

Maintenance & Community

The project is a fork of an earlier RunPod worker and acknowledges contributions from the ComfyUI creator and other RunPod worker projects. GitHub Actions are configured for automatic Docker image deployment.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking would depend on the underlying ComfyUI license and any specific terms imposed by RunPod for serverless deployments.

Limitations & Caveats

The README mentions that local API access via WSL on Windows might not work, recommending direct Docker Desktop usage. Input image size is limited by RunPod's API request body size limits (10MB for /run, 20MB for /runsync).

Health Check
Last Commit

2 weeks ago

Responsiveness

1+ week

Pull Requests (30d)
4
Issues (30d)
4
Star History
31 stars in the last 30 days

Explore Similar Projects

Starred by Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

gpt4free by xtekky

0.1%
65k
API package for multi-provider LLM requests (GPT-4.1, Gemini 2.5, Deepseek R1)
Created 2 years ago
Updated 5 days ago
Feedback? Help us improve.