[PR #17734] [CLOSED] [Microservice] Add ComfyUI Service with Fal.ai IntegrationFeat/perry comfyui deployment #11326

Closed
opened 2025-11-11 19:28:53 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/17734
Author: @PerryPAN219
Created: 9/25/2025
Status: Closed

Base: mainHead: feat/perry-comfyui-deployment


📝 Commits (2)

  • 3e95e7c Scaffold Setup, setup guide and updated docker-compose configuration:
  • 48cde43 Add ComfyUI service with image-to-image Fal.ai integration

📊 Changes

12 files changed (+1364 additions, -13 deletions)

View changed files

📝 backend/open_webui/config.py (+13 -0)
📝 backend/open_webui/env.py (+1 -0)
comfyui-service/.gitignore (+62 -0)
comfyui-service/Dockerfile (+35 -0)
comfyui-service/README.md (+126 -0)
comfyui-service/api/__init__.py (+7 -0)
comfyui-service/api/routes.py (+571 -0)
comfyui-service/docker-compose.yml (+31 -0)
comfyui-service/main.py (+230 -0)
comfyui-service/requirements.txt (+9 -0)
📝 docker-compose.yaml (+24 -13)
setupguide.md (+255 -0)

📄 Description

Summary

This PR introduces a new ComfyUI Microservice for AI image generation, integrated into the CerebraUI platform.
It provides core workflows (text-to-image, image-to-image, multimodal, and fashion transfer) with FastAPI-based endpoints.

Key Features

  • Independent microservice at port 8001
  • Text-to-image, image-to-image, multimodal, and fashion transfer endpoints
  • File upload validation (JPEG, PNG, WebP, BMP, TIFF, GIF; max 10MB)
  • Rate limiting (15 requests/minute per IP, max 5 concurrent requests)
  • Unified error handling and logging with request tracing
  • Dockerized deployment with environment variable configuration
  • Simulation mode for development without API costs
  • Integrated Hugging Face API for production inference

Technical Highlights

  • Implemented under comfyui-service/ directory to avoid conflicts with other modules
  • Exposes API documentation at:
  • Clear folder structure (api/, utils/, models/, tests/, main.py, Dockerfile)
  • Designed with microservice principles: single responsibility, independent deployment, safe integration
  • Rate limits: 15 requests/minute per IP, 10MB upload limit

Validation

  • Service successfully starts on port 8001
  • All endpoints tested and responding
  • Rate limiting and file validation verified
  • Error handling prevents sensitive information leakage
  • Docker build and run verified

Next Steps

  • Connect this microservice with the CerebraUI main backend
  • Add frontend integration for user-triggered image generation
  • Extend advanced multimodal and fashion transfer workflows

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.

How to Run

# Local
pip install -r requirements.txt
python main.py

# Docker
docker build -t comfyui-service .
docker run -p 8001:8001 -e HUGGINGFACE_API_TOKEN="hf_your_token" comfyui-service

# Docker Compose
docker-compose up



---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/17734 **Author:** [@PerryPAN219](https://github.com/PerryPAN219) **Created:** 9/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/perry-comfyui-deployment` --- ### 📝 Commits (2) - [`3e95e7c`](https://github.com/open-webui/open-webui/commit/3e95e7c40d7039a50462ad56a53f2ec1d9c4f268) Scaffold Setup, setup guide and updated docker-compose configuration: - [`48cde43`](https://github.com/open-webui/open-webui/commit/48cde437701192986baca20d01fa89a52004649b) Add ComfyUI service with image-to-image Fal.ai integration ### 📊 Changes **12 files changed** (+1364 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+13 -0) 📝 `backend/open_webui/env.py` (+1 -0) ➕ `comfyui-service/.gitignore` (+62 -0) ➕ `comfyui-service/Dockerfile` (+35 -0) ➕ `comfyui-service/README.md` (+126 -0) ➕ `comfyui-service/api/__init__.py` (+7 -0) ➕ `comfyui-service/api/routes.py` (+571 -0) ➕ `comfyui-service/docker-compose.yml` (+31 -0) ➕ `comfyui-service/main.py` (+230 -0) ➕ `comfyui-service/requirements.txt` (+9 -0) 📝 `docker-compose.yaml` (+24 -13) ➕ `setupguide.md` (+255 -0) </details> ### 📄 Description ### Summary This PR introduces a new **ComfyUI Microservice** for AI image generation, integrated into the CerebraUI platform. It provides core workflows (text-to-image, image-to-image, multimodal, and fashion transfer) with FastAPI-based endpoints. ### Key Features - Independent microservice at port 8001 - Text-to-image, image-to-image, multimodal, and fashion transfer endpoints - File upload validation (JPEG, PNG, WebP, BMP, TIFF, GIF; max 10MB) - Rate limiting (15 requests/minute per IP, max 5 concurrent requests) - Unified error handling and logging with request tracing - Dockerized deployment with environment variable configuration - Simulation mode for development without API costs - Integrated Hugging Face API for production inference ### Technical Highlights - Implemented under `comfyui-service/` directory to avoid conflicts with other modules - Exposes API documentation at: - Swagger UI: http://localhost:8001/docs - ReDoc: http://localhost:8001/redoc - Clear folder structure (`api/`, `utils/`, `models/`, `tests/`, `main.py`, `Dockerfile`) - Designed with microservice principles: single responsibility, independent deployment, safe integration - Rate limits: 15 requests/minute per IP, 10MB upload limit ### Validation - ✅ Service successfully starts on port 8001 - ✅ All endpoints tested and responding - ✅ Rate limiting and file validation verified - ✅ Error handling prevents sensitive information leakage - ✅ Docker build and run verified ### Next Steps - Connect this microservice with the CerebraUI main backend - Add frontend integration for user-triggered image generation - Extend advanced multimodal and fashion transfer workflows By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. ### How to Run ```bash # Local pip install -r requirements.txt python main.py # Docker docker build -t comfyui-service . docker run -p 8001:8001 -e HUGGINGFACE_API_TOKEN="hf_your_token" comfyui-service # Docker Compose docker-compose up --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-11 19:28:53 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#11326