n8n-nodes-comfyui-all 2.4.6 â 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +215 -471
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,373 +1,200 @@
|
|
|
1
1
|
# n8n-nodes-comfyui-all
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Execute ComfyUI workflows in n8n - Generate images, videos, and more with AI!
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/n8n-nodes-comfyui-all)
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Video Tutorials
|
|
8
8
|
|
|
9
|
-
- [
|
|
10
|
-
- [
|
|
11
|
-
- [Nodes Comparison](#-nodes-comparison)
|
|
12
|
-
- [Quick Start](#-quick-start)
|
|
13
|
-
- [ComfyUI Tool Node](#-comfyui-tool-node)
|
|
14
|
-
- [ComfyUI Node](#-comfyui-node)
|
|
15
|
-
- [Advanced Usage](#-advanced-usage)
|
|
16
|
-
- [Troubleshooting](#-troubleshooting)
|
|
17
|
-
- [Configuration Reference](#-configuration-reference)
|
|
9
|
+
- đş [YouTube Tutorial](https://youtu.be/wsbo3hBKsPM)
|
|
10
|
+
- đş [ĺĺŠĺĺŠćç¨](https://www.bilibili.com/video/BV1ffrFBTEdQ/?vd_source=6485fe2fae664d8b09cb2e2fd7df5ef7)
|
|
18
11
|
|
|
19
|
-
##
|
|
12
|
+
## What This Does
|
|
20
13
|
|
|
21
|
-
This package
|
|
14
|
+
This package adds **two nodes** to n8n that let you run ComfyUI workflows:
|
|
22
15
|
|
|
23
|
-
|
|
16
|
+
1. **ComfyUI Tool** - For AI Agents (URL-based image input)
|
|
17
|
+
2. **ComfyUI** - For standard workflows (supports binary & URL)
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
19
|
+
You can use these nodes to:
|
|
20
|
+
- Generate images from text prompts
|
|
21
|
+
- Process and edit images
|
|
22
|
+
- Generate videos
|
|
23
|
+
- Use AI Agents to create images automatically
|
|
24
|
+
- And much more with any ComfyUI workflow!
|
|
31
25
|
|
|
32
26
|
---
|
|
33
27
|
|
|
34
|
-
##
|
|
28
|
+
## Quick Setup
|
|
35
29
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
1. Go to **Settings** â **Community Nodes**
|
|
39
|
-
2. Click **Install**
|
|
40
|
-
3. Enter: `n8n-nodes-comfyui-all`
|
|
41
|
-
4. Click **Install**
|
|
42
|
-
|
|
43
|
-
### Self-Hosted n8n
|
|
30
|
+
### 1. Install
|
|
44
31
|
|
|
45
32
|
```bash
|
|
33
|
+
# n8n Cloud: Settings â Community Nodes â Install â n8n-nodes-comfyui-all
|
|
34
|
+
|
|
35
|
+
# Self-hosted:
|
|
46
36
|
cd ~/.n8n
|
|
47
37
|
npm install n8n-nodes-comfyui-all
|
|
48
38
|
```
|
|
49
39
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
> â ď¸ **Restart n8n after installation**
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## đ Nodes Comparison
|
|
57
|
-
|
|
58
|
-
### Quick Reference
|
|
59
|
-
|
|
60
|
-
| Feature | ComfyUI Tool đ¤ | ComfyUI đ§ |
|
|
61
|
-
|---------|----------------|------------|
|
|
62
|
-
| **Primary Use Case** | AI Agent Workflows | Standard Workflows |
|
|
63
|
-
| **Image Input** | URL only | Binary or URL |
|
|
64
|
-
| **Binary Output** | â No | â
Yes |
|
|
65
|
-
| **URL Output** | â
Yes | â
Yes |
|
|
66
|
-
| **Parameter Overrides** | â
Yes | â
Yes (Advanced) |
|
|
67
|
-
| **LLM Context** | â
Lightweight (URLs only) | â ď¸ Not optimized |
|
|
68
|
-
| **Node Configuration** | Simple | Advanced |
|
|
69
|
-
|
|
70
|
-
### Which Node Should I Use?
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
74
|
-
â Your Scenario â
|
|
75
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
76
|
-
â
|
|
77
|
-
âââââââââââââââââ´ââââââââââââââââ
|
|
78
|
-
â â
|
|
79
|
-
Using AI Agent? Standard Workflow?
|
|
80
|
-
â â
|
|
81
|
-
âź âź
|
|
82
|
-
âââââââââââââââââ ââââââââââââââââ
|
|
83
|
-
â ComfyUI Tool â â ComfyUI â
|
|
84
|
-
âââââââââââââââââ ââââââââââââââââ
|
|
85
|
-
â â
|
|
86
|
-
Image Input: URL Image Input:
|
|
87
|
-
⢠Binary
|
|
88
|
-
⢠URL
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
#### Use ComfyUI Tool When:
|
|
92
|
-
- â
Building AI Agent workflows
|
|
93
|
-
- â
Integrating with chat interfaces
|
|
94
|
-
- â
Processing images from URLs
|
|
95
|
-
- â
Minimizing LLM token usage
|
|
96
|
-
- â
Need simple URL-based configuration
|
|
97
|
-
|
|
98
|
-
#### Use ComfyUI Node When:
|
|
99
|
-
- â
Building standard n8n workflows
|
|
100
|
-
- â
Processing binary data from previous nodes
|
|
101
|
-
- â
Working with file uploads/webhooks
|
|
102
|
-
- â
Need advanced parameter configuration
|
|
103
|
-
- â
Want binary output for further processing
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## đ Quick Start
|
|
40
|
+
### 2. Run ComfyUI
|
|
108
41
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- â
n8n instance (version 2.x or higher)
|
|
113
|
-
- â
Basic understanding of ComfyUI workflows
|
|
114
|
-
|
|
115
|
-
### 3-Step Setup
|
|
116
|
-
|
|
117
|
-
#### 1. Create Your Workflow in ComfyUI
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
In ComfyUI:
|
|
121
|
-
1. Design your workflow
|
|
122
|
-
2. Click "Save (API Format)"
|
|
123
|
-
3. Copy the generated JSON
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
#### 2. Add Node to n8n
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
In n8n:
|
|
130
|
-
1. Add either "ComfyUI Tool" or "ComfyUI" node
|
|
131
|
-
2. Paste your Workflow JSON
|
|
132
|
-
3. Configure ComfyUI URL
|
|
133
|
-
4. (Optional) Set up parameters
|
|
42
|
+
Make sure ComfyUI is running:
|
|
43
|
+
```bash
|
|
44
|
+
# Default: http://127.0.0.1:8188
|
|
134
45
|
```
|
|
135
46
|
|
|
136
|
-
|
|
47
|
+
### 3. Use in n8n
|
|
137
48
|
|
|
138
|
-
|
|
139
|
-
Run your workflow and enjoy! đ
|
|
140
|
-
```
|
|
49
|
+
Add either **ComfyUI Tool** or **ComfyUI** node to your workflow!
|
|
141
50
|
|
|
142
51
|
---
|
|
143
52
|
|
|
144
|
-
##
|
|
145
|
-
|
|
146
|
-
### Overview
|
|
147
|
-
|
|
148
|
-
**Optimized for AI Agent workflows** - URL-based image input, simple configuration, LLM-friendly.
|
|
149
|
-
|
|
150
|
-
### Why URL-Based Input?
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
â Base64 Image:
|
|
154
|
-
- Size: ~100KB - 1MB per image
|
|
155
|
-
- Tokens: ~130K - 1.3M tokens
|
|
156
|
-
- Result: đĽ Explodes LLM context
|
|
157
|
-
|
|
158
|
-
â
Image URL:
|
|
159
|
-
- Size: ~100 bytes
|
|
160
|
-
- Tokens: ~30 tokens
|
|
161
|
-
- Result: â
Lightweight and efficient
|
|
162
|
-
```
|
|
53
|
+
## ComfyUI Tool vs ComfyUI Node
|
|
163
54
|
|
|
164
|
-
###
|
|
55
|
+
### ComfyUI Tool đ¤
|
|
165
56
|
|
|
166
|
-
|
|
57
|
+
**Use for: AI Agent workflows**
|
|
167
58
|
|
|
168
59
|
```
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââ¤
|
|
172
|
-
â ComfyUI URL: http://127.0.0.1:8188 â
|
|
173
|
-
â Workflow JSON: [Your ComfyUI workflow] â
|
|
174
|
-
â Timeout: 300 â
|
|
175
|
-
â Load Image Node ID: â
|
|
176
|
-
â (for image workflows) â
|
|
177
|
-
â Image URL: [URL or {{ $json.imageUrl }}] â
|
|
178
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
60
|
+
Example:
|
|
61
|
+
[Chat Input] â [AI Agent] â [ComfyUI Tool]
|
|
179
62
|
```
|
|
180
63
|
|
|
181
|
-
|
|
64
|
+
**Features:**
|
|
65
|
+
- â
Simple URL-based image input
|
|
66
|
+
- â
Works great with AI Agents
|
|
67
|
+
- â
Doesn't bloat LLM context (URLs are small!)
|
|
68
|
+
- â
Automatic image download
|
|
182
69
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
| **Image URL** | URL of image to process | `https://...` |
|
|
190
|
-
| **Parameter Overrides** | Override workflow parameters | See below |
|
|
191
|
-
|
|
192
|
-
### Output Format
|
|
70
|
+
**How to use:**
|
|
71
|
+
1. Add to AI Agent as a tool
|
|
72
|
+
2. Set ComfyUI URL
|
|
73
|
+
3. Paste your ComfyUI workflow JSON
|
|
74
|
+
4. Set Load Image Node ID (if using images)
|
|
75
|
+
5. Pass image URL: `{{ $json.imageUrl }}`
|
|
193
76
|
|
|
77
|
+
**Example:**
|
|
194
78
|
```json
|
|
195
79
|
{
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"http://127.0.0.1:8188/view?filename=ComfyUI_00001.png"
|
|
199
|
-
],
|
|
200
|
-
"videoUrls": [],
|
|
201
|
-
"imageCount": 1,
|
|
202
|
-
"videoCount": 0
|
|
80
|
+
"imageUrl": "https://example.com/image.png",
|
|
81
|
+
"prompt": "Transform to oil painting"
|
|
203
82
|
}
|
|
204
83
|
```
|
|
205
84
|
|
|
206
|
-
### AI Agent Integration Example
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
Workflow:
|
|
210
|
-
[Chat Input] â [AI Agent] â [ComfyUI Tool]
|
|
211
|
-
â
|
|
212
|
-
Passes imageUrl
|
|
213
|
-
â
|
|
214
|
-
Downloads image
|
|
215
|
-
â
|
|
216
|
-
Processes in ComfyUI
|
|
217
|
-
â
|
|
218
|
-
Returns result URLs
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
**Chat Example:**
|
|
222
|
-
|
|
223
|
-
```
|
|
224
|
-
User: Transform this image (https://example.com/photo.png)
|
|
225
|
-
to oil painting style
|
|
226
|
-
|
|
227
|
-
AI Agent:
|
|
228
|
-
1. Extracts URL from message
|
|
229
|
-
2. Calls ComfyUI Tool
|
|
230
|
-
3. ComfyUI Tool downloads image
|
|
231
|
-
4. Processes in ComfyUI
|
|
232
|
-
5. Returns result URLs
|
|
233
|
-
6. AI Agent shows result to user
|
|
234
|
-
```
|
|
235
|
-
|
|
236
85
|
---
|
|
237
86
|
|
|
238
|
-
|
|
87
|
+
### ComfyUI Node đ§
|
|
239
88
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
**Full-featured node for standard workflows** - Supports binary and URL inputs with advanced configuration.
|
|
243
|
-
|
|
244
|
-
### Configuration
|
|
245
|
-
|
|
246
|
-
#### Basic Setup
|
|
89
|
+
**Use for: Standard n8n workflows**
|
|
247
90
|
|
|
248
91
|
```
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââ¤
|
|
252
|
-
â ComfyUI URL: http://127.0.0.1:8188 â
|
|
253
|
-
â Workflow JSON: [Your ComfyUI workflow] â
|
|
254
|
-
â Timeout: 300 â
|
|
255
|
-
â Output Binary Key: data â
|
|
256
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââ¤
|
|
257
|
-
â Node Parameters: â
|
|
258
|
-
â [Multiple parameter configurations] â
|
|
259
|
-
âââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
92
|
+
Example:
|
|
93
|
+
[HTTP Request] â [ComfyUI] â [Save File]
|
|
260
94
|
```
|
|
261
95
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
| **Workflow JSON** | ComfyUI workflow in API format | `{ "3": {...} }` |
|
|
268
|
-
| **Timeout** | Max wait time (seconds) | `300` (5 min) |
|
|
269
|
-
| **Output Binary Key** | First output binary property name | `data`, `image` |
|
|
270
|
-
| **Node Parameters** | Override workflow parameters | See below |
|
|
96
|
+
**Features:**
|
|
97
|
+
- â
Supports binary data (from previous nodes)
|
|
98
|
+
- â
Supports URL download
|
|
99
|
+
- â
Advanced parameter configuration
|
|
100
|
+
- â
Binary output for further processing
|
|
271
101
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
#### Method 1: Binary Data
|
|
102
|
+
**How to use:**
|
|
275
103
|
|
|
104
|
+
**Option 1: Binary Input**
|
|
276
105
|
```
|
|
106
|
+
ComfyUI URL: http://127.0.0.1:8188
|
|
107
|
+
Workflow JSON: [Your workflow]
|
|
108
|
+
|
|
277
109
|
Node Parameters:
|
|
278
110
|
Node ID: 107
|
|
279
|
-
Parameter Mode: Single Parameter
|
|
280
|
-
Parameter Name: image
|
|
281
111
|
Type: Image
|
|
282
|
-
Image Input Type: Binary
|
|
112
|
+
Image Input Type: Binary
|
|
283
113
|
Value: data
|
|
284
114
|
```
|
|
285
115
|
|
|
286
|
-
**
|
|
287
|
-
|
|
288
|
-
#### Method 2: URL
|
|
289
|
-
|
|
116
|
+
**Option 2: URL Input**
|
|
290
117
|
```
|
|
118
|
+
ComfyUI URL: http://127.0.0.1:8188
|
|
119
|
+
Workflow JSON: [Your workflow]
|
|
120
|
+
|
|
291
121
|
Node Parameters:
|
|
292
122
|
Node ID: 107
|
|
293
|
-
Parameter Mode: Single Parameter
|
|
294
|
-
Parameter Name: image
|
|
295
123
|
Type: Image
|
|
296
|
-
Image Input Type: URL
|
|
124
|
+
Image Input Type: URL
|
|
297
125
|
Image URL: https://example.com/image.png
|
|
298
126
|
```
|
|
299
127
|
|
|
300
|
-
**
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
{
|
|
306
|
-
"json": {
|
|
307
|
-
"success": true,
|
|
308
|
-
"imageCount": 1,
|
|
309
|
-
"imageUrls": ["http://..."],
|
|
310
|
-
"data": { ... }
|
|
311
|
-
},
|
|
312
|
-
"binary": {
|
|
313
|
-
"data": {
|
|
314
|
-
"data": "base64...",
|
|
315
|
-
"mimeType": "image/png",
|
|
316
|
-
"fileName": "ComfyUI_00001.png"
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
128
|
+
**Option 3: Text Input**
|
|
129
|
+
```
|
|
130
|
+
Node Parameters:
|
|
131
|
+
Node ID: 6
|
|
132
|
+
Type: Text
|
|
133
|
+
Value: {{ $json.prompt }}
|
|
320
134
|
```
|
|
321
135
|
|
|
322
136
|
---
|
|
323
137
|
|
|
324
|
-
##
|
|
138
|
+
## Common Workflows
|
|
325
139
|
|
|
326
|
-
### 1.
|
|
327
|
-
|
|
328
|
-
**ComfyUI Node Setup:**
|
|
140
|
+
### 1. Generate Image from Text
|
|
329
141
|
|
|
142
|
+
**Setup:**
|
|
330
143
|
```
|
|
331
|
-
Node
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
144
|
+
ComfyUI Node:
|
|
145
|
+
ComfyUI URL: http://127.0.0.1:8188
|
|
146
|
+
Workflow JSON: [Text-to-Image workflow]
|
|
147
|
+
|
|
148
|
+
Node Parameters:
|
|
149
|
+
Node ID: 6 (your CLIP Text node)
|
|
150
|
+
Type: Text
|
|
151
|
+
Value: {{ $json.prompt }}
|
|
337
152
|
```
|
|
338
153
|
|
|
339
154
|
**Input:**
|
|
340
155
|
```json
|
|
156
|
+
{ "prompt": "a beautiful sunset over mountains" }
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Output:**
|
|
160
|
+
```json
|
|
341
161
|
{
|
|
342
|
-
"
|
|
162
|
+
"imageUrls": ["http://127.0.0.1:8188/view?filename=image.png"]
|
|
343
163
|
}
|
|
344
164
|
```
|
|
345
165
|
|
|
346
|
-
|
|
166
|
+
---
|
|
347
167
|
|
|
348
|
-
|
|
168
|
+
### 2. Process Image with AI Agent
|
|
349
169
|
|
|
170
|
+
**Workflow:**
|
|
350
171
|
```
|
|
172
|
+
[Chat Interface] â [AI Agent] â [ComfyUI Tool]
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**ComfyUI Tool Setup:**
|
|
176
|
+
```
|
|
177
|
+
ComfyUI URL: http://127.0.0.1:8188
|
|
178
|
+
Workflow JSON: [Image-to-Image workflow]
|
|
351
179
|
Load Image Node ID: 107
|
|
352
180
|
Image URL: {{ $json.imageUrl }}
|
|
353
|
-
Parameter Overrides:
|
|
354
|
-
- Node ID: 6
|
|
355
|
-
Param Path: inputs.text
|
|
356
|
-
Value: {{ $json.prompt }}
|
|
357
181
|
```
|
|
358
182
|
|
|
359
|
-
**
|
|
360
|
-
```json
|
|
361
|
-
{
|
|
362
|
-
"imageUrl": "https://example.com/input.png",
|
|
363
|
-
"prompt": "Transform to oil painting style"
|
|
364
|
-
}
|
|
183
|
+
**Chat:**
|
|
365
184
|
```
|
|
185
|
+
You: Transform this image https://example.com/photo.png
|
|
186
|
+
to watercolor style
|
|
366
187
|
|
|
367
|
-
|
|
188
|
+
AI: I'll transform that image for you!
|
|
189
|
+
[Downloads image, processes in ComfyUI]
|
|
190
|
+
Done! Here's your watercolor image đ¨
|
|
191
|
+
```
|
|
368
192
|
|
|
369
|
-
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### 3. Edit Image with Parameters
|
|
370
196
|
|
|
197
|
+
**ComfyUI Node Setup:**
|
|
371
198
|
```
|
|
372
199
|
Node Parameters:
|
|
373
200
|
Node ID: 3
|
|
@@ -376,15 +203,15 @@ Node Parameters:
|
|
|
376
203
|
{
|
|
377
204
|
"width": 1024,
|
|
378
205
|
"height": 1024,
|
|
379
|
-
"steps": 30
|
|
380
|
-
"cfg": 7.5,
|
|
381
|
-
"seed": 123456
|
|
206
|
+
"steps": 30
|
|
382
207
|
}
|
|
383
208
|
```
|
|
384
209
|
|
|
385
|
-
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### 4. Generate Video
|
|
386
213
|
|
|
387
|
-
|
|
214
|
+
Same as image generation, just use a video workflow in ComfyUI!
|
|
388
215
|
|
|
389
216
|
**Output:**
|
|
390
217
|
```json
|
|
@@ -396,243 +223,160 @@ Node Parameters:
|
|
|
396
223
|
|
|
397
224
|
---
|
|
398
225
|
|
|
399
|
-
##
|
|
400
|
-
|
|
401
|
-
### Example 1: Image Generation Chat
|
|
402
|
-
|
|
403
|
-
```
|
|
404
|
-
Workflow:
|
|
405
|
-
[Chat Interface] â [AI Agent] â [ComfyUI Tool]
|
|
226
|
+
## How to Get Your Workflow JSON
|
|
406
227
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
228
|
+
1. Open ComfyUI
|
|
229
|
+
2. Create or load your workflow
|
|
230
|
+
3. Click **"Save (API Format)"** (not "Save")
|
|
231
|
+
4. Copy the JSON
|
|
232
|
+
5. Paste it in the node's **Workflow JSON** field
|
|
411
233
|
|
|
412
|
-
|
|
413
|
-
User: "Generate a picture of a cute cat"
|
|
414
|
-
AI: [Calls ComfyUI Tool]
|
|
415
|
-
AI: "Here's your image! đ"
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
### Example 2: Image Editing
|
|
234
|
+
---
|
|
419
235
|
|
|
420
|
-
|
|
421
|
-
Workflow:
|
|
422
|
-
[Chat Interface] â [AI Agent] â [ComfyUI Tool]
|
|
236
|
+
## Parameters Explained
|
|
423
237
|
|
|
424
|
-
|
|
425
|
-
- ComfyUI Tool:
|
|
426
|
-
- Workflow: Image-to-Image
|
|
427
|
-
- Load Image Node ID: 107
|
|
428
|
-
- Image URL: {{ $json.imageUrl }}
|
|
238
|
+
### ComfyUI Tool Node
|
|
429
239
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
240
|
+
| Parameter | What It Does | Example |
|
|
241
|
+
|-----------|--------------|---------|
|
|
242
|
+
| **ComfyUI URL** | Where ComfyUI is running | `http://127.0.0.1:8188` |
|
|
243
|
+
| **Workflow JSON** | Your ComfyUI workflow (API format) | `{...}` |
|
|
244
|
+
| **Timeout** | Max wait time (seconds) | `300` |
|
|
245
|
+
| **Load Image Node ID** | Which LoadImage node to use | `107` |
|
|
246
|
+
| **Image URL** | URL of image to process | `https://...` |
|
|
247
|
+
| **Parameter Overrides** | Change workflow values | See below |
|
|
435
248
|
|
|
436
|
-
###
|
|
249
|
+
### ComfyUI Node
|
|
437
250
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
251
|
+
| Parameter | What It Does | Example |
|
|
252
|
+
|-----------|--------------|---------|
|
|
253
|
+
| **ComfyUI URL** | Where ComfyUI is running | `http://127.0.0.1:8188` |
|
|
254
|
+
| **Workflow JSON** | Your ComfyUI workflow (API format) | `{...}` |
|
|
255
|
+
| **Timeout** | Max wait time (seconds) | `300` |
|
|
256
|
+
| **Output Binary Key** | Name for output binary | `data` |
|
|
257
|
+
| **Node Parameters** | Configure workflow parameters | See below |
|
|
445
258
|
|
|
446
|
-
|
|
447
|
-
User: "Create an image of a futuristic city
|
|
448
|
-
and write a poem about it"
|
|
259
|
+
### Node Parameters
|
|
449
260
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
261
|
+
| Field | What It Does |
|
|
262
|
+
|-------|--------------|
|
|
263
|
+
| **Node ID** | The ComfyUI node to change (e.g., "6", "13") |
|
|
264
|
+
| **Parameter Mode** | "Single" for one parameter, "Multiple" for JSON |
|
|
265
|
+
| **Type** | Text, Number, Boolean, or Image |
|
|
266
|
+
| **Value** | The value to set |
|
|
454
267
|
|
|
455
268
|
---
|
|
456
269
|
|
|
457
|
-
##
|
|
270
|
+
## Tips & Tricks
|
|
458
271
|
|
|
459
|
-
###
|
|
272
|
+
### â
Use URLs with AI Agents
|
|
460
273
|
|
|
461
|
-
|
|
462
|
-
```
|
|
463
|
-
https://cdn.example.com/images/photo.png
|
|
464
|
-
https://storage.googleapis.com/bucket/image.jpg
|
|
465
|
-
https://s3.amazonaws.com/bucket/photo.png
|
|
274
|
+
URLs are much smaller than base64 images:
|
|
466
275
|
```
|
|
276
|
+
Base64: ~100KB - 1MB per image
|
|
277
|
+
URL: ~100 bytes
|
|
467
278
|
|
|
468
|
-
|
|
469
|
-
```
|
|
470
|
-
file:///local/path/image.png â Not accessible
|
|
471
|
-
http://localhost:8080/image.png â Private network
|
|
279
|
+
Better for LLM context and costs!
|
|
472
280
|
```
|
|
473
281
|
|
|
474
|
-
###
|
|
282
|
+
### â
Find Your Node ID
|
|
475
283
|
|
|
476
|
-
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
Node ID: node_6
|
|
485
|
-
Parameter Name: param1 â Unclear what it does
|
|
284
|
+
Open your workflow JSON and look for:
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"6": {
|
|
288
|
+
"inputs": {...},
|
|
289
|
+
"class_type": "KSampler"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
486
292
|
```
|
|
293
|
+
The `"6"` is your Node ID!
|
|
487
294
|
|
|
488
|
-
###
|
|
489
|
-
|
|
490
|
-
```
|
|
491
|
-
Simple workflows: 60-120 seconds
|
|
492
|
-
Complex workflows: 300-600 seconds
|
|
493
|
-
Video generation: 600-1800 seconds
|
|
494
|
-
```
|
|
295
|
+
### â
Test First
|
|
495
296
|
|
|
496
|
-
|
|
297
|
+
Always test your workflow in ComfyUI before using it in n8n!
|
|
497
298
|
|
|
498
|
-
|
|
499
|
-
// Always validate inputs
|
|
500
|
-
if (!workflowJson) {
|
|
501
|
-
throw new Error('Workflow JSON is required');
|
|
502
|
-
}
|
|
299
|
+
### â
Use Appropriate Timeouts
|
|
503
300
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
301
|
+
```
|
|
302
|
+
Simple workflows: 60-120 seconds
|
|
303
|
+
Complex workflows: 300-600 seconds
|
|
304
|
+
Video generation: 600-1800 seconds
|
|
507
305
|
```
|
|
508
306
|
|
|
509
307
|
---
|
|
510
308
|
|
|
511
|
-
##
|
|
512
|
-
|
|
513
|
-
### Common Issues
|
|
514
|
-
|
|
515
|
-
#### â "Invalid ComfyUI URL"
|
|
516
|
-
|
|
517
|
-
**Solution:**
|
|
518
|
-
- Check ComfyUI is running
|
|
519
|
-
- Verify URL format: `http://127.0.0.1:8188`
|
|
520
|
-
- Try accessing ComfyUI in browser first
|
|
521
|
-
|
|
522
|
-
#### â "Workflow execution timeout"
|
|
523
|
-
|
|
524
|
-
**Solutions:**
|
|
525
|
-
- Increase timeout value
|
|
526
|
-
- Check workflow complexity
|
|
527
|
-
- Verify ComfyUI server performance
|
|
528
|
-
- Check ComfyUI logs for errors
|
|
309
|
+
## Troubleshooting
|
|
529
310
|
|
|
530
|
-
|
|
311
|
+
### "Invalid ComfyUI URL"
|
|
312
|
+
Make sure ComfyUI is running and URL is correct: `http://127.0.0.1:8188`
|
|
531
313
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
- Find the correct node ID
|
|
535
|
-
- Note: IDs are strings like "6", "13", not numbers
|
|
314
|
+
### "Workflow execution timeout"
|
|
315
|
+
Increase the timeout value in node settings
|
|
536
316
|
|
|
537
|
-
|
|
317
|
+
### "Node ID not found"
|
|
318
|
+
Check your workflow JSON - Node IDs are strings like "6", not numbers
|
|
538
319
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
- Check URL doesn't require authentication
|
|
542
|
-
- Ensure URL returns image (not HTML)
|
|
543
|
-
- Test URL in browser first
|
|
320
|
+
### "Failed to download image"
|
|
321
|
+
Make sure the URL is public and accessible (not localhost or file://)
|
|
544
322
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
-
|
|
549
|
-
- Check tool description is clear
|
|
550
|
-
- Verify workflow JSON is configured
|
|
551
|
-
- Check Agent logs
|
|
323
|
+
### "AI Agent doesn't call ComfyUI"
|
|
324
|
+
- Make sure ComfyUI Tool is added to Agent's tools
|
|
325
|
+
- Check the workflow JSON is set
|
|
326
|
+
- Try being more specific in your chat
|
|
552
327
|
|
|
553
328
|
---
|
|
554
329
|
|
|
555
|
-
##
|
|
556
|
-
|
|
557
|
-
### ComfyUI Tool Node
|
|
330
|
+
## Examples
|
|
558
331
|
|
|
559
|
-
|
|
560
|
-
|-------|------|----------|---------|-------------|
|
|
561
|
-
| **ComfyUI URL** | String | â
| `http://127.0.0.1:8188` | ComfyUI server address |
|
|
562
|
-
| **Workflow JSON** | String | â
| - | ComfyUI workflow in API format |
|
|
563
|
-
| **Timeout** | Number | â | `300` | Max wait time (seconds) |
|
|
564
|
-
| **Load Image Node ID** | String | â | - | LoadImage node ID for image workflows |
|
|
565
|
-
| **Image URL** | String | â | - | URL of image to process |
|
|
566
|
-
| **Parameter Overrides** | Collection | â | - | Override workflow parameters |
|
|
567
|
-
|
|
568
|
-
### ComfyUI Node
|
|
332
|
+
### Example 1: Simple Text to Image
|
|
569
333
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
| **ComfyUI URL** | String | â
| `http://127.0.0.1:8188` | ComfyUI server address |
|
|
573
|
-
| **Workflow JSON** | String | â
| - | ComfyUI workflow in API format |
|
|
574
|
-
| **Timeout** | Number | â | `300` | Max wait time (seconds) |
|
|
575
|
-
| **Output Binary Key** | String | â | `data` | First output binary property name |
|
|
576
|
-
| **Node Parameters** | Collection | â | - | Override workflow parameters |
|
|
577
|
-
|
|
578
|
-
### Node Parameter Fields
|
|
579
|
-
|
|
580
|
-
| Field | Description | Options |
|
|
581
|
-
|-------|-------------|---------|
|
|
582
|
-
| **Node ID** | Node ID from workflow JSON | e.g., `6`, `13`, `107` |
|
|
583
|
-
| **Parameter Mode** | How to configure parameters | Single / Multiple |
|
|
584
|
-
| **Type** | Parameter data type | Text / Number / Boolean / Image |
|
|
585
|
-
| **Image Input Type** | How to input image (when Type=Image) | Binary / URL |
|
|
586
|
-
| **Parameter Name** | Parameter to override (single mode) | e.g., `text`, `seed`, `steps` |
|
|
587
|
-
| **Parameters JSON** | JSON object with parameters (multiple mode) | `{"width": 1024}` |
|
|
588
|
-
| **Value** | Value to set | Text / Number / Boolean |
|
|
589
|
-
|
|
590
|
-
---
|
|
334
|
+
```
|
|
335
|
+
[Manual Trigger] â [ComfyUI] â [Save to File]
|
|
591
336
|
|
|
592
|
-
|
|
337
|
+
ComfyUI Node:
|
|
338
|
+
Workflow: Text-to-Image
|
|
339
|
+
Node ID: 6
|
|
340
|
+
Type: Text
|
|
341
|
+
Value: a cute cat in a garden
|
|
342
|
+
```
|
|
593
343
|
|
|
594
|
-
###
|
|
344
|
+
### Example 2: AI Image Generator
|
|
595
345
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
- Monitor ComfyUI resource usage
|
|
599
|
-
- Use specific prompts for better results
|
|
346
|
+
```
|
|
347
|
+
[Chat Trigger] â [AI Agent + ComfyUI Tool] â [Display Image]
|
|
600
348
|
|
|
601
|
-
|
|
349
|
+
Agent says: "Generate a picture of..."
|
|
350
|
+
Calls: ComfyUI Tool
|
|
351
|
+
Returns: Image URL
|
|
352
|
+
Shows: Result to user
|
|
353
|
+
```
|
|
602
354
|
|
|
603
|
-
|
|
604
|
-
- Use secure URLs for images
|
|
605
|
-
- Validate user inputs in production
|
|
606
|
-
- Keep workflow JSON private if needed
|
|
355
|
+
### Example 3: Batch Process Images
|
|
607
356
|
|
|
608
|
-
|
|
357
|
+
```
|
|
358
|
+
[Spreadsheet] â [Loop] â [ComfyUI] â [Save]
|
|
609
359
|
|
|
610
|
-
|
|
611
|
-
-
|
|
612
|
-
-
|
|
613
|
-
-
|
|
360
|
+
For each row:
|
|
361
|
+
- Get image URL
|
|
362
|
+
- Process in ComfyUI
|
|
363
|
+
- Save result
|
|
364
|
+
```
|
|
614
365
|
|
|
615
366
|
---
|
|
616
367
|
|
|
617
|
-
##
|
|
368
|
+
## Need Help?
|
|
618
369
|
|
|
619
|
-
|
|
370
|
+
- đ [n8n Documentation](https://docs.n8n.io)
|
|
371
|
+
- đŹ [n8n Community](https://community.n8n.io)
|
|
372
|
+
- đ [Report Issues](https://github.com/your-repo/issues)
|
|
620
373
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
MIT License - see LICENSE file for details
|
|
374
|
+
---
|
|
624
375
|
|
|
625
|
-
##
|
|
376
|
+
## License
|
|
626
377
|
|
|
627
|
-
|
|
628
|
-
- [n8n](https://n8n.io) - Workflow automation tool
|
|
378
|
+
MIT
|
|
629
379
|
|
|
630
380
|
---
|
|
631
381
|
|
|
632
|
-
**
|
|
633
|
-
|
|
634
|
-
- đ Check the [Documentation](https://docs.n8n.io)
|
|
635
|
-
- đŹ Join the [Community](https://community.n8n.io)
|
|
636
|
-
- đ Report [Issues](https://github.com/your-repo/issues)
|
|
637
|
-
|
|
638
|
-
**Happy Automating! đ**
|
|
382
|
+
**Happy automating with ComfyUI! đ**
|