comfyui-aio

n8n community nodes for ComfyUI workflow execution with dynamic parameter support (All-In-One: images, videos, and audios)

Package Information

Downloads: 98 weeklyΒ /Β 98 monthly
Latest Version: 2.5.2
Author: wwrs

Documentation

n8n-nodes-comfyui-aio

Execute ComfyUI workflows in n8n - Generate images, videos, audios and more with AI! (All-In-One)

npm version

Video Tutorials

Platform Link Description
πŸ“Ί YouTube Watch Tutorial English tutorial
πŸ“Ί Bilibili θ§‚ηœ‹ζ•™η¨‹ 中文教程

What This Does

This package adds one intelligent node to n8n that automatically detects how it's being used:

ComfyUI Node - Universal ComfyUI workflow executor (All-In-One)

  • βœ… Auto-detects execution mode (Tool for AI Agents or Action for workflows)
  • βœ… Manual mode override available
  • βœ… Works with AI Agents as a tool
  • βœ… Works in regular workflows with full binary support
  • βœ… Supports image, video and audio input (URL and binary)
  • βœ… Generate images, videos, and audios
  • βœ… Dynamic parameter overrides

You can use this node to:

  • Generate images from text prompts
  • Process and edit images
  • Generate videos
  • Generate and process audio
  • Use AI Agents to create images/videos/audios automatically
  • And much more with any ComfyUI workflow!

Quick Setup

1. Install

# n8n Cloud: Settings β†’ Community Nodes β†’ Install β†’ n8n-nodes-comfyui-aio
# Self-hosted:
cd ~/.n8n
npm install n8n-nodes-comfyui-aio

2. Run ComfyUI

Option A: Local ComfyUI

# Default: http://127.0.0.1:8188

Option B: RunningHub Cloud (Recommended for AI Agents)

3. Configure n8n Workflow

  1. Add a ComfyUI node
  2. Set ComfyUI URL (e.g., http://127.0.0.1:8188)
  3. Paste your ComfyUI workflow JSON (API format)
  4. Run!

Features

Execution Modes

The node automatically detects how it's being executed:

Mode When Used Returns
Tool Mode Called by AI Agents URLs only (no binary data)
Action Mode Regular workflow Full binary data + URLs

You can also manually override the mode in node settings.

Dynamic Parameters

Override any workflow node parameter dynamically:

Parameters:

  • βœ… Text - Prompt text, seeds, etc.
  • βœ… Number - Steps, dimensions, batch size
  • βœ… Boolean - Toggle options
  • βœ… File - Images, videos, or audios (URL or binary)

Example:

{
  "nodeId": "6",
  "parameterMode": "single",
  "paramName": "width",
  "type": "number",
  "numberValue": 1024
}

File Input

Supports multiple input methods:

From URL:

  • Downloads from HTTP/HTTPS URLs
  • Validates file type (image/video/audio)
  • Uploads to ComfyUI automatically

From Binary:

  • Uses binary data from previous nodes
  • Auto-detects file type
  • Validates MIME type and size

Supported Formats

Images: PNG, JPG, JPEG, WEBP, GIF, BMP, SVG
Videos: MP4, WEBM, AVI, MOV, MKV, GIF
Audios: MP3, WAV, OGG, FLAC, AAC, M4A, WMA, OPUS

Size Limits

  • Images: Up to 50MB
  • Videos: Up to 500MB
  • Audios: Up to 100MB

Getting ComfyUI Workflow JSON

ComfyUI workflows are exported in API format:

  1. Open ComfyUI (http://127.0.0.1:8188)
  2. Design your workflow
  3. Click Save (API Format) button
  4. Copy the generated JSON
  5. Paste it in the n8n ComfyUI node

Examples

Image Generation

{
  "3": {
    "inputs": {
      "seed": 123456789,
      "steps": 20,
      "cfg": 8,
      "sampler_name": "euler",
      "scheduler": "normal",
      "denoise": 1
    },
    "class_type": "KSampler"
  },
  "6": {
    "inputs": {
      "text": "a beautiful sunset over the ocean",
      "clip": ["4", 1]
    },
    "class_type": "CLIPTextEncode"
  }
}

Video Generation

Use the same format with video-specific nodes in ComfyUI.

Audio Generation

Use the same format with audio-specific nodes in ComfyUI.


Development

# Build
npm run build

# Lint
npm run lint

# Test
npm test

# Watch mode
npm run dev

Contributing

Contributions are welcome! Please read the contributing guidelines.


License

MIT License - see LICENSE for details.


Links


Changelog

v2.5.2

  • ✨ Added audio support (input/output)
  • πŸ› Fixed TypeScript compilation issues
  • πŸ“ Updated documentation

v2.5.1

  • ✨ Video and GIF support
  • ✨ Auto-detection for execution mode
  • πŸ› Bug fixes

v2.5.0

  • ✨ AI Agent tool mode support
  • ✨ Dynamic parameter overrides
  • πŸ› Various improvements

Related Projects

  • ComfyUI - Powerful UI for Stable Diffusion
  • n8n - Workflow automation tool
  • RunningHub - ComfyUI cloud service

Support


Star History

Star History Chart

Discussion