worker-comfyui  by runpod-workers

RunPod worker for ComfyUI as a serverless API

created 1 year ago
521 stars

Top 61.3% on sourcepulse

GitHubView on GitHub
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

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
5
Star History
78 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), and
13 more.

open-webui by open-webui

0.9%
105k
Self-hosted AI platform for local LLM deployment
created 1 year ago
updated 1 day ago
Feedback? Help us improve.