Skip to content

punitda/ComfyRun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyRun

A fully open source and self-hosted solution to run your ComfyUI workflows at blazing fast speeds on cloud GPUs powered by Modal.

Best suited for individuals who want to

  • Run complex workflows in seconds on the powerful GPUs like A10G, A100, and H100 🔋
  • Experiment with any workflows you find across web without worrying about breaking your local ComfyUI environment 😎
  • Edit workflows on the go 📱

App Intro

Video

App Screenshots

Create App Screenshot

Apps Screenshot

Workflow Screenshot

Requirements

Local Dev

  • Node - >=v20.x.x
  • Python - >=3.10.x
  • Docker

For running self hosted solution, please sign-up for following services:

Local Setup

Frontend

Pre-requisites

  • Node >v20.x.x - recommended to install via some node version manager like nvm or n

Once the Node is installed, please run below commands to install and run the app locally

1. Change directory:

cd web/

2. Install dependencies:

npm install

3. Setup Environment variables:

Create .env. file from .env.sample and add required keys(more info in this video)

cp .env.sample .env

4. Run app

npm run dev

Backend

Pre-requisites

  • Install Docker Desktop to avoid messing with Python virtual environment

1. Change directory:

cd backend/

2. Setup Environment variables:

Create .env. file from .env.sample and add required keys(more info in this video)

cp .env.sample .env

3. Run app

docker-compose -f docker-compose.local.yml up --build

Note: Make sure docker desktop is running before running this command

Hosting

Check out this video on how to self host this app

Video

The current implementation hosts both frontend and backend on Fly.io. However, you can use any other service of your choice to host using the Dockerfile for both frontend and backend

Pre-requisites

  1. Clone the repo
  2. Sign up on Modal & set token
  3. Sign up on Clerk & create app
  4. Sign up on Fly.io
  5. Install flyctl

Frontend

1. Change directory:

cd web/

2. Create Fly app:

Create App

3. Setup Environment variables:

You need to add all the environment variables present in your ./web/.env file to Flyio Secrets for Flyio to pick them during the deploy

You can setup via command line using flyctl or use the app dashboard page https://fly.io/apps/<your-app-name>/secrets

4. Deploy app:

Make sure you're in /web directory before running below command

fly deploy

Backend

1. Change directory:

cd backend/

2. Create Fly app:

Create App (Same steps as frontend)

3. Setup Environment variables:

You need to add all the environment variables present in your ./backend/.env file to Flyio Secrets for Flyio to pick them during the deploy

You can setup via command line using flyctl or use the app dashboard page https://fly.io/apps/<your-app-name>/secrets

Note: Make sure to include base url of the deployed frontend app from the above step in the comma separated list of CORS_ALLOWED_ORIGINS variable in your secrets

4. Deploy app:

Make sure you're in /backend directory before running below command

fly deploy

About

Run ComfyUI workflows on powerful cloud GPUs

Resources

Stars

Watchers

Forks

Packages

No packages published