Description
n8n-nodes-comfyui-ex
This package provides n8n nodes to integrate with ComfyUI – A powerful and modular stable diffusion GUI with a graph/nodes interface.
Features
- Execute ComfyUI workflows directly from n8n
- Support for workflow JSON import
- Automatic image retrieval from workflow outputs
- Progress monitoring and error handling
- Support for API key authentication
- Configurable timeout settings
- n8n (version 1.0.0 or later)
- ComfyUI instance running and accessible
- Node.js 16 or newer
Prerequisites
Installation
npm install n8n-nodes-comfyui-ex
Node Configuration
ComfyUI Node
This node allows you to execute ComfyUI workflows and retrieve generated images.
#### Settings
#### Outputs
The node outputs an array of generated images with:
filename: Name of the generated image filesubfolder: Subfolder path if anydata: Base64 encoded image dataUsage Example
1. Export your workflow from ComfyUI as JSON
2. Create a new workflow in n8n
3. Add the ComfyUI node
4. Paste your workflow JSON
5. Configure the API URL
6. Execute and retrieve generated images
Error Handling
The node includes comprehensive error handling for:
Development
Install dependencies
pnpm installBuild
pnpm buildTest
pnpm testIntegration test
pnpm test:integrationLint
pnpm lint
pnpm test:integration builds this package, builds an n8n test image with the local node installed, starts n8n plus ComfyUI through Docker Compose, and verifies:
/healthz/readiness/system_statsDefault images:
docker.n8n.io/n8nio/n8n:2.20.6ghcr.io/ai-dock/comfyui:cpu-22.04Overrides:
N8N_IMAGE=docker.n8n.io/n8nio/n8n:2.20.6
COMFYUI_IMAGE=ghcr.io/ai-dock/comfyui:cpu-22.04
pnpm test:integration
First run pulls the ComfyUI CPU image and can take several minutes.