n8n-nodes-comfyui-all 2.4.5 → 2.4.6

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.
Files changed (2) hide show
  1. package/README.md +504 -185
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,17 +4,32 @@
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/n8n-nodes-comfyui-all.svg)](https://www.npmjs.com/package/n8n-nodes-comfyui-all)
6
6
 
7
- ## Features
7
+ ## 📖 Table of Contents
8
+
9
+ - [Overview](#-overview)
10
+ - [Installation](#-installation)
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)
18
+
19
+ ## 🎯 Overview
20
+
21
+ This package provides two specialized nodes for integrating ComfyUI with n8n:
22
+
23
+ ### 🌟 Key Features
8
24
 
9
25
  - 🎨 **Universal Workflow Support** - Works with any ComfyUI workflow in API format
10
- - 🔄 **Dynamic Parameters** - Override workflow parameters dynamically
26
+ - 🔄 **Dynamic Parameters** - Override workflow parameters at runtime
11
27
  - 🎬 **Multi-Modal Support** - Supports images and videos for both input and output
12
- - 🤖 **AI Agent Ready** - Two specialized nodes for different use cases:
13
- - **ComfyUI Tool** - Optimized for AI Agent workflows (URL-based image input)
14
- - **ComfyUI** - Full-featured node for standard workflows (binary & URL support)
28
+ - 🤖 **AI Agent Ready** - Optimized nodes for AI Agent and standard workflows
15
29
  - 📊 **Flexible Configuration** - JSON mode or single parameter mode
16
- - 🔗 **Multiple Image Input Methods** - URL, binary data
17
- - 🏷️ **Customizable Output** - Customize binary output property names
30
+ - 🏷️ **Customizable Output** - Flexible output format (URLs or binary data)
31
+
32
+ ---
18
33
 
19
34
  ## 📦 Installation
20
35
 
@@ -34,286 +49,590 @@ npm install n8n-nodes-comfyui-all
34
49
 
35
50
  Or via n8n interface: **Settings** → **Community Nodes** → **Install** → `n8n-nodes-comfyui-all`
36
51
 
37
- > Restart n8n after installation.
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
+ ---
38
106
 
39
107
  ## 🚀 Quick Start
40
108
 
41
- ### 1. Prerequisites
109
+ ### Prerequisites
110
+
111
+ - ✅ ComfyUI server running (default: `http://127.0.0.1:8188`)
112
+ - ✅ n8n instance (version 2.x or higher)
113
+ - ✅ Basic understanding of ComfyUI workflows
42
114
 
43
- - ComfyUI server running (default: `http://127.0.0.1:8188`)
44
- - n8n instance (version 2.x or higher)
115
+ ### 3-Step Setup
45
116
 
46
- ### 2. Create Your Workflow in ComfyUI
117
+ #### 1. Create Your Workflow in ComfyUI
47
118
 
48
- 1. Design your workflow in ComfyUI
49
- 2. Click **Save (API Format)** to export
119
+ ```
120
+ In ComfyUI:
121
+ 1. Design your workflow
122
+ 2. Click "Save (API Format)"
50
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
134
+ ```
51
135
 
52
- ### 3. Configure n8n Node
136
+ #### 3. Execute
53
137
 
54
- 1. Add **ComfyUI** node to your n8n workflow
55
- 2. Set **ComfyUI URL**: `http://127.0.0.1:8188`
56
- 3. Paste your **Workflow JSON**
57
- 4. Optionally configure **Node Parameters**
138
+ ```
139
+ Run your workflow and enjoy! 🎉
140
+ ```
58
141
 
59
- ## 📖 Usage
142
+ ---
60
143
 
61
- ### Basic Example: Text to Image
144
+ ## 🤖 ComfyUI Tool Node
62
145
 
63
- **Node Configuration:**
64
- - **ComfyUI URL**: `http://127.0.0.1:8188`
65
- - **Workflow JSON**: Your ComfyUI workflow in API format
146
+ ### Overview
66
147
 
67
- **Optional Node Parameters (Single Parameter Mode):**
68
- - Node ID: `6` (your CLIP text node)
69
- - Parameter Name: `text`
70
- - Type: `Text`
71
- - Value: `a beautiful landscape, high quality`
148
+ **Optimized for AI Agent workflows** - URL-based image input, simple configuration, LLM-friendly.
72
149
 
73
- ### Parameter Configuration Modes
150
+ ### Why URL-Based Input?
74
151
 
75
- #### 1. Multiple Parameters Mode (JSON)
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
+ ```
163
+
164
+ ### Configuration
76
165
 
77
- Configure multiple parameters at once using JSON:
166
+ #### Basic Setup
167
+
168
+ ```
169
+ ┌─────────────────────────────────────────────────┐
170
+ │ ComfyUI Tool │
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
+ └─────────────────────────────────────────────────┘
179
+ ```
180
+
181
+ #### Parameters
182
+
183
+ | Parameter | Description | Example |
184
+ |-----------|-------------|---------|
185
+ | **ComfyUI URL** | ComfyUI server address | `http://127.0.0.1:8188` |
186
+ | **Workflow JSON** | ComfyUI workflow in API format | `{ "3": {...} }` |
187
+ | **Timeout** | Max wait time (seconds) | `300` (5 min) |
188
+ | **Load Image Node ID** | LoadImage node ID for image workflows | `107` |
189
+ | **Image URL** | URL of image to process | `https://...` |
190
+ | **Parameter Overrides** | Override workflow parameters | See below |
191
+
192
+ ### Output Format
78
193
 
79
194
  ```json
80
195
  {
81
- "width": 1024,
82
- "height": 1024,
83
- "batch_size": 1,
84
- "seed": 12345
196
+ "success": true,
197
+ "imageUrls": [
198
+ "http://127.0.0.1:8188/view?filename=ComfyUI_00001.png"
199
+ ],
200
+ "videoUrls": [],
201
+ "imageCount": 1,
202
+ "videoCount": 0
85
203
  }
86
204
  ```
87
205
 
88
- #### 2. Single Parameter Mode
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:**
89
222
 
90
- Configure one parameter at a time with type validation:
223
+ ```
224
+ User: Transform this image (https://example.com/photo.png)
225
+ to oil painting style
91
226
 
92
- - **Parameter Name**: `steps`
93
- - **Type**: `Number`
94
- - **Value**: `25`
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
+ ```
95
235
 
96
- ### Image Input Options
236
+ ---
97
237
 
98
- The node supports two methods for uploading images to ComfyUI:
238
+ ## 🔧 ComfyUI Node
99
239
 
100
- #### Method 1: Binary Data
240
+ ### Overview
101
241
 
102
- Upload images from n8n binary data:
242
+ **Full-featured node for standard workflows** - Supports binary and URL inputs with advanced configuration.
103
243
 
104
- - **Type**: `Image`
105
- - **Image Input Type**: `Binary`
106
- - **Value**: Binary property name (e.g., `data`, `image`, `file`)
244
+ ### Configuration
107
245
 
108
- #### Method 2: URL
246
+ #### Basic Setup
109
247
 
110
- Download and upload images from a URL:
248
+ ```
249
+ ┌─────────────────────────────────────────────────┐
250
+ │ ComfyUI │
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
+ └─────────────────────────────────────────────────┘
260
+ ```
261
+
262
+ #### Parameters
263
+
264
+ | Parameter | Description | Example |
265
+ |-----------|-------------|---------|
266
+ | **ComfyUI URL** | ComfyUI server address | `http://127.0.0.1:8188` |
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 |
271
+
272
+ ### Image Input Methods
273
+
274
+ #### Method 1: Binary Data
111
275
 
112
- - **Type**: `Image`
113
- - **Image Input Type**: `URL`
114
- - **Image URL**: Full URL of the image (e.g., `https://example.com/image.png`)
276
+ ```
277
+ Node Parameters:
278
+ Node ID: 107
279
+ Parameter Mode: Single Parameter
280
+ Parameter Name: image
281
+ Type: Image
282
+ Image Input Type: Binary ← Binary mode
283
+ Value: data
284
+ ```
115
285
 
116
- The node will automatically download the image from the URL and upload it to ComfyUI.
286
+ **Use when:** Previous node outputs binary data (HTTP Request, Webhook, etc.)
117
287
 
118
- ### Custom Output Binary Key
288
+ #### Method 2: URL
119
289
 
120
- By default, the first output image/video uses `data` as the binary property name. You can customize this:
290
+ ```
291
+ Node Parameters:
292
+ Node ID: 107
293
+ Parameter Mode: Single Parameter
294
+ Parameter Name: image
295
+ Type: Image
296
+ Image Input Type: URL ← URL mode
297
+ Image URL: https://example.com/image.png
298
+ ```
299
+
300
+ **Use when:** Downloading from web or using URL
121
301
 
122
- - **Output Binary Key**: Property name for the first output (e.g., `image`, `output`, `result`)
123
- - Default: `data`
302
+ ### Output Format
124
303
 
125
- **Example:**
126
304
  ```json
127
305
  {
306
+ "json": {
307
+ "success": true,
308
+ "imageCount": 1,
309
+ "imageUrls": ["http://..."],
310
+ "data": { ... }
311
+ },
128
312
  "binary": {
129
- "myImage": { "data": "...", "mimeType": "image/png" }
313
+ "data": {
314
+ "data": "base64...",
315
+ "mimeType": "image/png",
316
+ "fileName": "ComfyUI_00001.png"
317
+ }
130
318
  }
131
319
  }
132
320
  ```
133
321
 
134
- ## 🤖 AI Agent Integration
322
+ ---
135
323
 
136
- Use ComfyUI as a tool in AI Agent workflows.
324
+ ## 📚 Advanced Usage
137
325
 
138
- ### Quick Setup
326
+ ### 1. Text-to-Image with Dynamic Prompts
139
327
 
140
- **Step 1: Create AI Agent**
141
- 1. Add **OpenAI Conversational Agent** node
142
- 2. Configure Chat Model (GPT-4/GPT-3.5)
143
- 3. Add Memory (optional but recommended)
328
+ **ComfyUI Node Setup:**
144
329
 
145
- **Step 2: Add ComfyUI Tool**
146
- 1. Click AI Agent node
147
- 2. In **Tools** section, click **+ Add Tool**
148
- 3. Search and select **ComfyUI**
149
- 4. Configure:
150
- - **ComfyUI URL**: `http://127.0.0.1:8188`
151
- - **Workflow JSON**: Your ComfyUI workflow (API format)
152
- - **Node Parameters**: Configure text parameter override
330
+ ```
331
+ Node Parameters:
332
+ Node ID: 6 (CLIP Text Encode)
333
+ Parameter Mode: Single Parameter
334
+ Parameter Name: text
335
+ Type: Text
336
+ Value: {{ $json.prompt }}
337
+ ```
153
338
 
154
- **Step 3: Start Chatting**
155
- Execute workflow and start conversing!
339
+ **Input:**
340
+ ```json
341
+ {
342
+ "prompt": "a beautiful landscape at sunset"
343
+ }
344
+ ```
156
345
 
157
- ### Example Conversations
346
+ ### 2. Image-to-Image Processing
158
347
 
159
- **Basic Image Generation:**
348
+ **ComfyUI Tool Setup:**
160
349
 
161
- **User:**
162
350
  ```
163
- Generate a picture of a cute cat sitting on a fence
351
+ Load Image Node ID: 107
352
+ Image URL: {{ $json.imageUrl }}
353
+ Parameter Overrides:
354
+ - Node ID: 6
355
+ Param Path: inputs.text
356
+ Value: {{ $json.prompt }}
164
357
  ```
165
358
 
166
- **AI:**
167
- ```
168
- I'll generate that for you.
169
- [Executes ComfyUI with prompt: "a cute cat sitting on a fence"]
170
- Done! Here's the image.
359
+ **Input:**
360
+ ```json
361
+ {
362
+ "imageUrl": "https://example.com/input.png",
363
+ "prompt": "Transform to oil painting style"
364
+ }
171
365
  ```
172
366
 
173
- **With Parameters:**
367
+ ### 3. Multiple Parameters Override
368
+
369
+ **ComfyUI Node Setup:**
174
370
 
175
- **User:**
176
371
  ```
177
- Create a cyberpunk city, size:1024x768, steps:30
372
+ Node Parameters:
373
+ Node ID: 3
374
+ Parameter Mode: Multiple Parameters
375
+ Parameters JSON:
376
+ {
377
+ "width": 1024,
378
+ "height": 1024,
379
+ "steps": 30,
380
+ "cfg": 7.5,
381
+ "seed": 123456
382
+ }
178
383
  ```
179
384
 
180
- **Supported Parameters:**
181
- - `size:WIDTHxHEIGHT` - Image dimensions
182
- - `steps:N` - Sampling steps
183
- - `cfg:N` - CFG strength
184
- - `seed:N` - Random seed
185
- - `negative:TEXT` - Negative prompt
385
+ ### 4. Video Generation
186
386
 
187
- **Negative Prompts:**
387
+ **Setup:** Similar to image generation, just use a video workflow in ComfyUI.
188
388
 
189
- **User:**
190
- ```
191
- Draw a beautiful sunset, negative: blurry, low quality
389
+ **Output:**
390
+ ```json
391
+ {
392
+ "videoUrls": ["http://127.0.0.1:8188/view?filename=video.mp4"],
393
+ "videoCount": 1
394
+ }
192
395
  ```
193
396
 
194
- ### Configuring Node Parameters for AI Agent
397
+ ---
195
398
 
196
- In the ComfyUI node, configure parameter overrides:
399
+ ## 🤖 AI Agent Workflows
197
400
 
198
- - **Node ID**: `6` (your CLIP text node)
199
- - **Parameter Mode**: Single Parameter
200
- - **Parameter Name**: `text`
201
- - **Type**: Text
202
- - **Value**: [Leave empty - AI Agent will fill this]
401
+ ### Example 1: Image Generation Chat
203
402
 
204
- ### Tool Mode Output Format
403
+ ```
404
+ Workflow:
405
+ [Chat Interface] → [AI Agent] → [ComfyUI Tool]
406
+
407
+ Configuration:
408
+ - Model: GPT-4
409
+ - Tools: ComfyUI Tool
410
+ - Workflow: Text-to-Image
411
+
412
+ Conversation:
413
+ User: "Generate a picture of a cute cat"
414
+ AI: [Calls ComfyUI Tool]
415
+ AI: "Here's your image! 😊"
416
+ ```
205
417
 
206
- When used as an AI Agent tool, ComfyUI returns both binary data and URL information:
418
+ ### Example 2: Image Editing
207
419
 
208
- **Binary Output:**
209
- - Images are returned as binary data (base64-encoded) in the `binary` object
210
- - First image: `binary.data`
211
- - Additional images: `binary.image_1`, `binary.image_2`, etc.
212
- - Videos: `binary.video_0`, `binary.video_1`, etc.
420
+ ```
421
+ Workflow:
422
+ [Chat Interface] [AI Agent] → [ComfyUI Tool]
423
+
424
+ Configuration:
425
+ - ComfyUI Tool:
426
+ - Workflow: Image-to-Image
427
+ - Load Image Node ID: 107
428
+ - Image URL: {{ $json.imageUrl }}
429
+
430
+ Conversation:
431
+ User: "Transform this image (URL) to watercolor style"
432
+ AI: [Extracts URL, downloads image, processes in ComfyUI]
433
+ AI: "Done! Here's the watercolor version 🎨"
434
+ ```
213
435
 
214
- **JSON Output (with URLs):**
215
- - `json.images`: Array of image paths
216
- - `json.imageUrls`: Array of complete image URLs (e.g., `http://127.0.0.1:8188/view?filename=...`)
217
- - `json.videos`: Array of video paths
218
- - `json.videoUrls`: Array of complete video URLs
219
- - `json.imageCount`: Number of images generated
220
- - `json.videoCount`: Number of videos generated
436
+ ### Example 3: Multi-Modal Workflow
221
437
 
222
- This ensures compatibility with both workflow mode (binary data) and tool mode (URLs for AI Agent).
438
+ ```
439
+ Workflow:
440
+ [Chat Input] → [AI Agent] → [ComfyUI Tool] → [Chat Model]
441
+ ↓ ↓
442
+ Generate Image Write Poem
443
+ ↓ ↓
444
+ Return Combined Result
445
+
446
+ Conversation:
447
+ User: "Create an image of a futuristic city
448
+ and write a poem about it"
449
+
450
+ AI: [1. Generates image via ComfyUI Tool]
451
+ [2. Writes poem about the image]
452
+ [3. Returns both to user]
453
+ ```
223
454
 
224
- ### Best Practices
455
+ ---
225
456
 
226
- **1. Clear Prompts**
457
+ ## ⚙️ Best Practices
227
458
 
228
- **Good:** "Generate a landscape painting of mountains at sunset"
459
+ ### 1. URL Selection
229
460
 
230
- **Bad:** "Make a picture"
461
+ **Good:**
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
466
+ ```
231
467
 
232
- **2. Use Specific Parameters**
468
+ **Avoid:**
469
+ ```
470
+ file:///local/path/image.png ← Not accessible
471
+ http://localhost:8080/image.png ← Private network
472
+ ```
233
473
 
234
- **Good:** "Create a portrait, size:512x768, steps:25"
474
+ ### 2. Parameter Naming
235
475
 
236
- **Bad:** "Create a high-quality portrait"
476
+ **Use Clear Names:**
477
+ ```
478
+ Node ID: 6
479
+ Parameter Name: text ← Matches ComfyUI node input
480
+ ```
237
481
 
238
- **3. Negative Prompts**
482
+ **Vague Names:**
483
+ ```
484
+ Node ID: node_6
485
+ Parameter Name: param1 ← Unclear what it does
486
+ ```
239
487
 
240
- Always use negative prompts for better quality:
488
+ ### 3. Timeout Settings
241
489
 
242
490
  ```
243
- A beautiful landscape, negative: blurry, distorted, low quality
491
+ Simple workflows: 60-120 seconds
492
+ Complex workflows: 300-600 seconds
493
+ Video generation: 600-1800 seconds
244
494
  ```
245
495
 
246
- ### Advanced Usage
496
+ ### 4. Error Handling
247
497
 
248
- **Style Transfer:**
498
+ ```javascript
499
+ // Always validate inputs
500
+ if (!workflowJson) {
501
+ throw new Error('Workflow JSON is required');
502
+ }
249
503
 
250
- **User:**
251
- ```
252
- Transform this image to oil painting style
504
+ // Check ComfyUI server availability
505
+ // Use appropriate timeouts
506
+ // Handle network errors gracefully
253
507
  ```
254
508
 
255
- Setup:
256
- - Upload input image as binary data
257
- - Configure style parameters
509
+ ---
258
510
 
259
- **Multi-Modal Workflows:**
511
+ ## 🔧 Troubleshooting
260
512
 
261
- Combine ComfyUI with other tools:
513
+ ### Common Issues
262
514
 
263
- **User:**
264
- ```
265
- Generate an image of a futuristic city, then write a poem about it
266
- ```
515
+ #### ❌ "Invalid ComfyUI URL"
267
516
 
268
- AI Agent:
269
- 1. Calls ComfyUI to generate image
270
- 2. Calls Chat Model to write poem
271
- 3. Returns both results
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
529
+
530
+ #### ❌ "Node ID not found in workflow"
272
531
 
273
- ### Troubleshooting
532
+ **Solutions:**
533
+ - Open workflow JSON
534
+ - Find the correct node ID
535
+ - Note: IDs are strings like "6", "13", not numbers
274
536
 
275
- **AI Agent Doesn't Call ComfyUI**
537
+ #### "Failed to download image from URL"
276
538
 
277
- **Check:**
278
- 1. ComfyUI tool added to Tools list?
279
- 2. Workflow JSON configured?
280
- 3. ComfyUI server running?
539
+ **Solutions:**
540
+ - Verify URL is publicly accessible
541
+ - Check URL doesn't require authentication
542
+ - Ensure URL returns image (not HTML)
543
+ - Test URL in browser first
281
544
 
282
- **Images Don't Match Prompts**
545
+ #### ❌ "AI Agent doesn't call ComfyUI"
283
546
 
284
- **Check:**
285
- 1. Correct node ID (e.g., `6` for CLIP text)
286
- 2. Parameter name matches workflow (`text`)
287
- 3. Workflow uses dynamic text input
547
+ **Solutions:**
548
+ - Ensure ComfyUI Tool is added to Agent's tools
549
+ - Check tool description is clear
550
+ - Verify workflow JSON is configured
551
+ - Check Agent logs
288
552
 
289
- ## 🔧 Configuration Reference
553
+ ---
290
554
 
291
- | Field | Description |
292
- |-------|-------------|
293
- | **ComfyUI URL** | URL of your ComfyUI server |
294
- | **Workflow JSON** | ComfyUI workflow in API format |
295
- | **Timeout** | Maximum wait time in seconds (default: 300) |
296
- | **Output Binary Key** | Property name for first output binary data (default: `data`) |
297
- | **Node Parameters** | Override workflow parameters |
555
+ ## 📖 Configuration Reference
298
556
 
299
- #### Node Parameter Fields
557
+ ### ComfyUI Tool Node
300
558
 
301
- | Field | Description |
302
- |-------|-------------|
303
- | **Node ID** | The node ID in your workflow (e.g., `6`, `13`) |
304
- | **Parameter Mode** | Single Parameter or Multiple Parameters (JSON) |
305
- | **Type** | Data type: Text, Number, Boolean, or Image |
306
- | **Image Input Type** | (When Type=Image) Binary or URL |
307
- | **Image URL** | (When Image Input Type=URL) URL to download image from |
308
- | **Parameter Name** | (Single mode) Parameter name to override |
309
- | **Parameters JSON** | (Multiple mode) JSON object with parameters |
310
- | **Value** | Value to set (varies by Type) |
559
+ | Field | Type | Required | Default | Description |
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
569
+
570
+ | Field | Type | Required | Default | Description |
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
+ ---
311
591
 
312
592
  ## 💡 Tips
313
593
 
314
- - **First time**: Start with a simple text-to-image workflow
315
- - **Parameter overrides**: Use Node Parameters instead of modifying workflow JSON
316
- - **Seed control**: Fixed seeds produce reproducible results
317
- - **Optimization**: 20-30 sampling steps are usually sufficient
318
- - **Image input**: Use Image type with Binary source for n8n binary data, or URL source to download from web
319
- - **Output naming**: Customize Output Binary Key to match your workflow's expected property names
594
+ ### 🎯 Performance
595
+
596
+ - Start with simple workflows to test setup
597
+ - Use appropriate timeout values
598
+ - Monitor ComfyUI resource usage
599
+ - Use specific prompts for better results
600
+
601
+ ### 🔒 Security
602
+
603
+ - Don't expose ComfyUI server publicly
604
+ - Use secure URLs for images
605
+ - Validate user inputs in production
606
+ - Keep workflow JSON private if needed
607
+
608
+ ### 📝 Workflow Design
609
+
610
+ - Document your ComfyUI workflows
611
+ - Use consistent node IDs
612
+ - Test workflows in ComfyUI first
613
+ - Keep workflows simple and modular
614
+
615
+ ---
616
+
617
+ ## 🤝 Contributing
618
+
619
+ Contributions are welcome! Please feel free to submit issues or pull requests.
620
+
621
+ ## 📄 License
622
+
623
+ MIT License - see LICENSE file for details
624
+
625
+ ## 🙏 Acknowledgments
626
+
627
+ - [ComfyUI](https://github.com/comfyanonymous/ComfyUI) - Powerful UI for Stable Diffusion
628
+ - [n8n](https://n8n.io) - Workflow automation tool
629
+
630
+ ---
631
+
632
+ **Need Help?**
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! 🚀**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-comfyui-all",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "n8n community nodes for ComfyUI workflow execution with dynamic parameter support",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",