Skip to content

Commit d29f0bc

Browse files
authored
Merge pull request #179 from runpod-workers/docs/comfyui-to-api
docs: comfyui to api
2 parents e7c259e + 8ade7f6 commit d29f0bc

3 files changed

Lines changed: 42 additions & 14 deletions

File tree

.runpod/README.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,42 @@ Run [ComfyUI](https://github.com/comfyanonymous/ComfyUI) workflows as a serverle
1212

1313
## What is included?
1414

15-
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:
15+
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.
1616

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

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

25-
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.
21+
### Option 1: ComfyUI-to-API (Easiest & Recommended)
22+
23+
[**ComfyUI-to-API**](https://comfy.getrunpod.io) automatically converts your ComfyUI workflow into a deployment-ready GitHub repository with all dependencies configured.
24+
25+
**Quick Steps:**
26+
27+
1. Export your workflow from ComfyUI using `Comfy > File > Export` (**not** `Export (API)`)
28+
2. Upload to [comfy.getrunpod.io](https://comfy.getrunpod.io) - It analyzes your workflow
29+
3. Get a custom GitHub repository with everything configured
30+
4. Deploy using RunPod's GitHub integration
31+
32+
**See the full guide:** [ComfyUI-to-API](https://docs.runpod.io/community-solutions/comfyui-to-api/overview)
33+
34+
### Option 2: Manual Customization
35+
36+
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.
37+
38+
## Configuration
39+
40+
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).
2641

2742
## Usage
2843

2944
The worker accepts the following input parameters:
3045

31-
| Parameter | Type | Default | Required | Description |
32-
| :--------- | :------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33-
| `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. |
34-
| `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). |
46+
| Parameter | Type | Default | Required | Description |
47+
| :------------------ | :------- | :------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48+
| `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. |
49+
| `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). |
50+
| `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. |
3551

3652
> [!NOTE]
3753
> 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.

docs/customization.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

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

5-
There are two primary methods for customizing your setup:
5+
> [!TIP] > **Looking for the easiest way to deploy custom workflows?**
6+
>
7+
> [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.
8+
>
9+
> Use the manual methods below only if you need fine-grained control or prefer to manage everything yourself.
10+
11+
---
12+
13+
There are two primary methods for **manual** customization:
614

7-
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.**
15+
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.**
816
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.
917

1018
## Method 1: Custom Dockerfile

docs/deployment.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ _Note: Container sizes are approximate and might vary slightly. Custom images wi
5353

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

56+
> [!TIP] > **Want to skip the manual setup?**
57+
>
58+
> [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.
59+
5660
### Method 1: Manual Build, Push, and Deploy
5761

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

0 commit comments

Comments
 (0)