Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions .runpod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,42 @@ Run [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflows as a serverle

## What is included?

This worker comes with the **FLUX.1-dev-fp8** (`flux1-dev-fp8.safetensors`) model pre-installed and works only with this model when deployed from the hub. If you want to use a different model, you have to [deploy the endpoint](https://github.com/runpod-workers/worker-comfyui/blob/main/docs/deployment.md) using one of these pre-defined Docker images:
This worker comes with the **FLUX.1-dev-fp8** (`flux1-dev-fp8.safetensors`) model pre-installed and **works only with this specific model** when deployed from the hub.

- `runpod/worker-comfyui:<version>-base` - Clean ComfyUI install with no models
- `runpod/worker-comfyui:<version>-flux1-schnell` - FLUX.1 schnell model
- `runpod/worker-comfyui:<version>-flux1-dev` - FLUX.1 dev model
- `runpod/worker-comfyui:<version>-sdxl` - Stable Diffusion XL model
- `runpod/worker-comfyui:<version>-sd3` - Stable Diffusion 3 medium model
## Want to use a different model?

Replace `<version>` with the latest release version from [GitHub Releases](https://github.com/runpod-workers/worker-comfyui/releases)
**The hub deployment only supports FLUX.1-dev-fp8.** If you need any other model, custom nodes, or LoRAs, you have two options:

If you need a different model or you have a LoRA or need custom nodes, then please follow our [Customization Guide](https://github.com/runpod-workers/worker-comfyui/blob/main/docs/customization.md) to create your own custom worker.
### Option 1: ComfyUI-to-API (Easiest & Recommended)

[**ComfyUI-to-API**](https://comfy.getrunpod.io) automatically converts your ComfyUI workflow into a deployment-ready GitHub repository with all dependencies configured.

**Quick Steps:**

1. Export your workflow from ComfyUI using `Comfy > File > Export` (**not** `Export (API)`)
2. Upload to [comfy.getrunpod.io](https://comfy.getrunpod.io) - It analyzes your workflow
3. Get a custom GitHub repository with everything configured
4. Deploy using RunPod's GitHub integration

**See the full guide:** [ComfyUI-to-API](https://docs.runpod.io/community-solutions/comfyui-to-api/overview)

### Option 2: Manual Customization

Follow the [Customization Guide](https://github.com/runpod-workers/worker-comfyui/blob/main/docs/customization.md) to manually create your own custom worker by editing Dockerfiles and managing dependencies yourself.

## Configuration

For all available environment variables including Comfy.org API key, S3 upload, logging, and debugging options, see the [Configuration Guide](https://github.com/runpod-workers/worker-comfyui/blob/main/docs/configuration.md).

## Usage

The worker accepts the following input parameters:

| Parameter | Type | Default | Required | Description |
| :--------- | :------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflow` | `object` | `None` | **Yes** | The entire ComfyUI workflow in the API JSON format. See the main project [README.md](https://github.com/runpod-workers/worker-comfyui#how-to-get-the-workflow-from-comfyui) for instructions on how to export this from the ComfyUI interface. |
| `images` | `array` | `[]` | No | An optional array of input images. Each image object should contain `name` (string, required, filename to reference in the workflow) and `image` (string, required, base64-encoded image data). |
| Parameter | Type | Default | Required | Description |
| :------------------ | :------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflow` | `object` | `None` | **Yes** | The entire ComfyUI workflow in the API JSON format. See the main project [README.md](https://github.com/runpod-workers/worker-comfyui#how-to-get-the-workflow-from-comfyui) for instructions on how to export this from the ComfyUI interface. |
| `images` | `array` | `[]` | No | An optional array of input images. Each image object should contain `name` (string, required, filename to reference in the workflow) and `image` (string, required, base64-encoded image data). |
| `comfy_org_api_key` | `string` | `None` | No | Optional Comfy.org API key for ComfyUI API Nodes. Overrides the `COMFY_ORG_API_KEY` environment variable if set. |

> [!NOTE]
> The `input.images` array has specific size constraints based on RunPod API limits (10MB for `/run`, 20MB for `/runsync`). See the main [README.md](https://github.com/runpod-workers/worker-comfyui#inputimages) for details.
Expand Down
12 changes: 10 additions & 2 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

This guide covers methods for adding your own models, custom nodes, and static input files into a custom `worker-comfyui`.

There are two primary methods for customizing your setup:
> [!TIP] > **Looking for the easiest way to deploy custom workflows?**
>
> [ComfyUI-to-API](https://comfy.getrunpod.io) automatically generates a custom Dockerfile and GitHub repository from your ComfyUI workflow, eliminating the manual setup described below. See the [ComfyUI-to-API Documentation](https://docs.runpod.io/community-solutions/comfyui-to-api/overview) for details.
>
> Use the manual methods below only if you need fine-grained control or prefer to manage everything yourself.

---

There are two primary methods for **manual** customization:

1. **Custom Dockerfile (recommended):** Create your own `Dockerfile` starting `FROM` one of the official `worker-comfyui` base images. This allows you to bake specific custom nodes, models, and input files directly into your image using `comfy-cli` commands. **This method does not require forking the `worker-comfyui` repository.**
1. **Custom Dockerfile (recommended for manual setup):** Create your own `Dockerfile` starting `FROM` one of the official `worker-comfyui` base images. This allows you to bake specific custom nodes, models, and input files directly into your image using `comfy-cli` commands. **This method does not require forking the `worker-comfyui` repository.**
2. **Network Volume:** Store models on a persistent network volume attached to your RunPod endpoint. This is useful if you frequently change models or have very large models you don't want to include in the image build process.

## Method 1: Custom Dockerfile
Expand Down
4 changes: 4 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ _Note: Container sizes are approximate and might vary slightly. Custom images wi

If you have created a custom environment using the methods in the [Customization Guide](customization.md), here's how to deploy it.

> [!TIP] > **Want to skip the manual setup?**
>
> [ComfyUI-to-API](https://comfy.getrunpod.io) automatically generates a GitHub repository with a custom Dockerfile from your ComfyUI workflow. You can then deploy it using [Method 2: GitHub Integration](#method-2-deploying-via-runpod-github-integration) below with no manual Docker building required. See the [ComfyUI-to-API Documentation](https://docs.runpod.io/community-solutions/comfyui-to-api/overview) for details.

### Method 1: Manual Build, Push, and Deploy

This method involves building your custom Docker image locally, pushing it to a registry, and then deploying that image on RunPod.
Expand Down