Description
n8n-nodes-comfyui-image-to-image
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
- Transform images using stable diffusion models
- Process two input images into one output image (dual image processing)
- Generate videos from two input images
- Generate audio from text prompts using ACE Step Audio models
- Support for workflow JSON import
- Automatic output retrieval from workflow outputs
- Progress monitoring and error handling
- Support for API key authentication
- Configurable timeout settings
- Multiple input types: URL, Base64, Binary
- Support for various video formats (MP4, WebM, GIF)
- Support for various audio formats (MP3, WAV, OGG)
- n8n (version 1.0.0 or later)
- ComfyUI instance running and accessible
- Node.js 16 or newer
- For video generation: ComfyUI with AnimateDiff, SVD, or other video generation extensions
- For audio generation: ComfyUI with ACE Step Audio models and extensions
Prerequisites
Installation
Standard Installation
Install from npm package (recommended)
npm install n8n-nodes-comfyui-image-to-image@1.0.0Or install from git repository
npm install github:StudioExitt/n8n-nodes-comfyui-image-to-image
Docker Installation
For Docker installations, you can use one of the following methods:
#### Method 1: Volume Mount
Create a directory for custom nodes
mkdir -p /path/to/custom/nodesClone the repository
git clone https://github.com/StudioExitt/n8n-nodes-comfyui-image-to-image.git /tmp/custom-nodes
cd /tmp/custom-nodesInstall dependencies and build
npm install
npm run buildCopy the built files to your custom nodes directory
cp -r dist/* /path/to/custom/nodes/n8n-nodes-comfyui-image-to-image/Run n8n with the custom nodes directory mounted
docker run -d
--name n8n
-p 5678:5678
-v /path/to/custom/nodes:/home/node/.n8n/custom/nodes
n8nio/n8n
#### Method 2: Custom Docker Image
Dockerfile
FROM n8nio/n8nInstall the custom nodes package from GitHub
RUN cd /tmp &&
npm install github:StudioExitt/n8n-nodes-comfyui-image-to-image &&
cp -r /tmp/node_modules/n8n-nodes-comfyui-image-to-image /home/node/.n8n/custom/nodes/ &&
chown -R node:node /home/node/.n8n
Build and run:
docker build -t n8n-with-comfyui .
docker run -d --name n8n -p 5678:5678 n8n-with-comfyui
#### Method 3: Docker Compose
version: '3'services:
n8n:
image: n8nio/n8n
container_name: n8n
ports:
- "5678:5678"
volumes:
- n8n_data:/home/node/.n8n
- ./custom-nodes:/home/node/.n8n/custom/nodes
environment:
- N8N_PORT=5678
- N8N_PROTOCOL=http
- NODE_ENV=production
volumes:
n8n_data:
Then:
Clone the repository
git clone https://github.com/StudioExitt/n8n-nodes-comfyui-image-to-image.git /tmp/custom-nodes
cd /tmp/custom-nodesInstall dependencies and build
npm install
npm run buildCopy the built files to your custom nodes directory
mkdir -p ./custom-nodes/n8n-nodes-comfyui-image-to-image
cp -r dist/* ./custom-nodes/n8n-nodes-comfyui-image-to-image/Start the docker-compose setup
docker-compose up -d
Node Types
ComfyUI Image Transformer Node
This node allows you to transform and enhance images using ComfyUI’s image-to-image capabilities.
ComfyUI Dual Image Transformer Node
This node processes two input images and generates one output image using ComfyUI workflows. Perfect for image blending, comparison, fusion, and other dual-image operations.
#### Settings
#### Input
The node accepts an image input in three ways:
1. URL: Provide a direct URL to an image
2. Base64: Provide a base64-encoded image string
3. Binary: Use an image from a binary property in the workflow (e.g., from an HTTP Request node)
#### Outputs
The node outputs the transformed image:
binary.data property with proper MIME type and file informationfileName: Name of the transformed image filedata: Base64 encoded image datafileType: The type of image file (e.g., ‘image’)fileSize: Size of the image in KBfileExtension: File extension (png, jpg, webp)mimeType: MIME type of the imageComfyUI Video Generator Node
This node generates videos from two input images using ComfyUI’s video generation capabilities.
#### Settings
#### Input
The node accepts two image inputs, each can be provided in three ways:
1. URL: Provide direct URLs to images
2. Base64: Provide base64-encoded image strings
3. Binary: Use images from binary properties in the workflow
#### Outputs
The node outputs the generated video:
binary.data property with proper MIME type and file informationfileName: Name of the generated video filedata: Base64 encoded video datafileType: The type of file (‘video’ or ‘image’ for GIF)fileSize: Size of the video in KBfileExtension: File extension (mp4, webm, gif, mov)mimeType: MIME type of the videoframeCount: Number of frames in the videoframeRate: Frame rate of the videoduration: Duration of the video in secondsComfyUI Audio Generator Node
This node generates audio from text prompts using ComfyUI’s ACE Step Audio models.
#### Settings
#### Input
The node accepts a text prompt describing the desired audio output.
#### Outputs
The node outputs the generated audio:
binary.data property with proper MIME type and file informationfileName: Name of the generated audio filedata: Base64 encoded audio datafileType: The type of file (‘audio’)fileSize: Size of the audio in KBfileExtension: File extension (mp3, wav, ogg, m4a)mimeType: MIME type of the audioprompt: The original text prompt usedduration: Duration setting used for generationquality: Quality setting used for generationUsage Examples
Using the ComfyUI Image Transformer Node
1. Create a workflow in ComfyUI for image transformation (e.g., img2img, inpainting, style transfer)
2. Export the workflow as JSON (API)
3. Add the ComfyUI Image Transformer node
4. Paste your workflow JSON
5. Select the appropriate Input Type:
– For URL: Enter the image URL
– For Base64: Provide a base64 string
– For Binary: Specify the binary property containing the image (default: “data”)
6. Configure timeout as needed
7. Execute the workflow to generate a transformed image from your input image
Using the ComfyUI Dual Image Transformer Node
1. Create a workflow in ComfyUI for dual image processing (e.g., image blending, comparison, fusion)
2. Ensure your workflow contains at least 2 LoadImage nodes
3. Export the workflow as JSON (API)
4. Add the ComfyUI Dual Image Transformer node
5. Paste your workflow JSON
6. Configure both image inputs:
– Set input types for each image (URL, Base64, or Binary)
– Provide image sources for both images
– Specify binary property names if using Binary input type
7. Configure timeout as needed
8. Execute the workflow to generate a single output image from your two input images
#### Dual Image Workflow Requirements
Your ComfyUI workflow should include:
LoadImage nodes (the first two will be used automatically)ImageBlend, ControlNet, IPAdapter)SaveImage or PreviewImageCommon use cases:
Using the ComfyUI Video Generator Node
1. Create a workflow in ComfyUI with video generation capabilities:
– Install AnimateDiff, SVD, or other video generation extensions
– Create a workflow with two LoadImage nodes (IDs: “loadimage1″ and “loadimage2″)
– Add video generation nodes (AnimateDiffSampler, VHS_VideoCombine, etc.)
– Export the workflow as JSON (API)
2. Add the ComfyUI Video Generator node
3. Paste your workflow JSON
4. Configure both image inputs:
– Set input types (URL, Base64, or Binary)
– Provide image sources
– Verify node IDs match your workflow
5. Set video parameters:
– Frame count (how many frames to generate)
– Frame rate (FPS)
– Timeout (video generation takes longer than images)
6. Execute the workflow to generate a video transitioning between your two input images
#### Example Video Workflow Requirements
Your ComfyUI workflow should include:
LoadImage nodes with specific IDs – AnimateDiffLoader + AnimateDiffSampler
– SVDimg2vidConditioning for Stable Video Diffusion
– VHS_VideoCombine for video output
– LatentInterpolate for smooth transitions between images
See imagetovideo_example.json for a complete workflow example.
Using the ComfyUI Audio Generator Node
1. Create or obtain a workflow in ComfyUI for audio generation:
– Install ACE Step Audio models and extensions
– Create a workflow with text encoding and audio generation nodes
– Include nodes like TextEncodeAceStepAudio, EmptyAceStepLatentAudio, VAEDecodeAudio, SaveAudioMP3
– Export the workflow as JSON (API)
2. Add the ComfyUI Audio Generator node
3. Paste your workflow JSON
4. Configure audio generation parameters:
– Enter your text prompt describing the desired audio
– Set audio duration (in seconds)
– Choose audio quality/bitrate
– Adjust sampling parameters (seed, steps, CFG scale)
– Set appropriate timeout (audio generation can take several minutes)
5. Execute the workflow to generate audio from your text prompt
#### Example Audio Workflow Requirements
Your ComfyUI workflow should include:
TextEncodeAceStepAudio node for text prompt encodingEmptyAceStepLatentAudio node for latent audio space initializationCheckpointLoaderSimple with ACE Step Audio model (e.g., acestepv1_3.5b.safetensors)KSampler for the generation processVAEDecodeAudio for decoding latent audio to actual audioSaveAudioMP3 (or other audio save nodes) for outputSee texttoaudio_example.json for a complete workflow example.
Error Handling
The node includes comprehensive error handling for:
Development
Install dependencies
npm installBuild
npm run buildTest
npm run testLint
npm run lint
License
—
한국어 문서
n8n-nodes-comfyui-image-to-image
이 패키지는 ComfyUI와 통합하는 n8n 노드를 제공합니다 – 그래프/노드 인터페이스가 있는 강력하고 모듈식 안정적인 확산 GUI입니다.
기능
사전 요구 사항
설치
표준 설치
Install from npm package (recommended)
npm install n8n-nodes-comfyui-image-to-image@1.0.0Or install from git repository
npm install github:StudioExitt/n8n-nodes-comfyui-image-to-image
도커 설치
도커 설치의 경우 다음 방법 중 하나를 사용할 수 있습니다:
#### 방법 1: 볼륨 마운트
커스텀 노드를 위한 디렉토리 생성
mkdir -p /path/to/custom/nodes저장소 복제
git clone https://github.com/StudioExitt/n8n-nodes-comfyui-image-to-image.git /tmp/custom-nodes
cd /tmp/custom-nodes의존성 설치 및 빌드
npm install
npm run build빌드된 파일을 커스텀 노드 디렉토리로 복사
cp -r dist/* /path/to/custom/nodes/n8n-nodes-comfyui-image-to-image/커스텀 노드 디렉토리를 마운트하여 n8n 실행
docker run -d
--name n8n
-p 5678:5678
-v /path/to/custom/nodes:/home/node/.n8n/custom/nodes
n8nio/n8n
#### 방법 2: 커스텀 도커 이미지
Dockerfile
FROM n8nio/n8nGitHub에서 커스텀 노드 패키지 설치
RUN cd /tmp &&
npm install github:StudioExitt/n8n-nodes-comfyui-image-to-image &&
cp -r /tmp/node_modules/n8n-nodes-comfyui-image-to-image /home/node/.n8n/custom/nodes/ &&
chown -R node:node /home/node/.n8n
빌드 및 실행:
docker build -t n8n-with-comfyui .
docker run -d --name n8n -p 5678:5678 n8n-with-comfyui
#### 방법 3: 도커 컴포즈
version: '3'services:
n8n:
image: n8nio/n8n
container_name: n8n
ports:
- "5678:5678"
volumes:
- n8n_data:/home/node/.n8n
- ./custom-nodes:/home/node/.n8n/custom/nodes
environment:
- N8N_PORT=5678
- N8N_PROTOCOL=http
- NODE_ENV=production
volumes:
n8n_data:
그리고:
저장소 복제
git clone https://github.com/StudioExitt/n8n-nodes-comfyui-image-to-image.git /tmp/custom-nodes
cd /tmp/custom-nodes의존성 설치 및 빌드
npm install
npm run build빌드된 파일을 커스텀 노드 디렉토리로 복사
mkdir -p ./custom-nodes/n8n-nodes-comfyui-image-to-image
cp -r dist/* ./custom-nodes/n8n-nodes-comfyui-image-to-image/도커 컴포즈 설정 시작
docker-compose up -d
노드 유형
ComfyUI Image Transformer Node
이 노드를 사용하면 ComfyUI의 이미지-이미지 변환 기능을 사용하여 이미지를 변환하거나 개선할 수 있습니다.
#### Settings
#### Input
The node accepts an image input in three ways:
1. URL: Provide a direct URL to an image
2. Base64: Provide a base64-encoded image string
3. Binary: Use an image from a binary property in the workflow (e.g., from an HTTP Request node)
#### Outputs
The node outputs the transformed image:
binary.data property with proper MIME type and file informationfileName: Name of the transformed image filedata: Base64 encoded image datafileType: The type of image file (e.g., ‘image’)fileSize: Size of the image in KBfileExtension: File extension (png, jpg, webp)mimeType: MIME type of the imageComfyUI Video Generator Node
This node generates videos from two input images using ComfyUI’s video generation capabilities.
#### Settings
#### Input
The node accepts two image inputs, each can be provided in three ways:
1. URL: Provide direct URLs to images
2. Base64: Provide base64-encoded image strings
3. Binary: Use images from binary properties in the workflow
#### Outputs
The node outputs the generated video:
binary.data property with proper MIME type and file informationfileName: Name of the generated video filedata: Base64 encoded video datafileType: The type of file (‘video’ or ‘image’ for GIF)fileSize: Size of the video in KBfileExtension: File extension (mp4, webm, gif, mov)mimeType: MIME type of the videoframeCount: Number of frames in the videoframeRate: Frame rate of the videoduration: Duration of the video in seconds사용 예제
ComfyUI Image Transformer Node 사용하기
1. ComfyUI에서 이미지 변환을 위한 워크플로우 생성(예: img2img, inpainting, style transfer)
2. 워크플로우를 JSON으로 내보내기(API)
3. ComfyUI Image Transformer node 추가
4. 워크플로우 JSON 붙여넣기
5. 적절한 입력 유형 선택:
– For URL: Enter the image URL
– For Base64: Provide a base64 string
– For Binary: Specify the binary property containing the image (default: “data”)
6. 필요에 따라 타임아웃 구성
7. 워크플로우를 실행하여 입력 이미지에서 변환된 이미지 생성
ComfyUI Dual Image Transformer Node 사용하기
1. ComfyUI에서 듀얼 이미지 처리를 위한 워크플로우 생성(예: 이미지 블렌딩, 비교, 융합)
2. 워크플로우에 최소 2개의 LoadImage 노드가 포함되어 있는지 확인
3. 워크플로우를 JSON으로 내보내기(API)
4. ComfyUI Dual Image Transformer node 추가
5. 워크플로우 JSON 붙여넣기
6. 두 이미지 입력 구성:
– 각 이미지의 입력 유형 설정(URL, Base64, 또는 Binary)
– 두 이미지의 소스 제공
– Binary 입력 유형 사용 시 바이너리 속성 이름 지정
7. 필요에 따라 타임아웃 구성
8. 워크플로우를 실행하여 두 입력 이미지에서 하나의 출력 이미지 생성
#### 듀얼 이미지 워크플로우 요구 사항
ComfyUI 워크플로우는 다음을 포함해야 합니다:
LoadImage 노드 (처음 두 개가 자동으로 사용됨)ImageBlend, ControlNet, IPAdapter)SaveImage 또는 PreviewImage와 같은 출력 노드일반적인 사용 사례:
ComfyUI Video Generator Node 사용하기
1. ComfyUI에서 비디오 생성 기능을 포함한 워크플로우 생성:
– AnimateDiff, SVD, 또는 기타 비디오 생성 확장 기능 설치
– 두 개의 LoadImage 노드(IDs: “loadimage1″ 및 “loadimage2″)를 포함한 워크플로우 생성
– 비디오 생성 노드(AnimateDiffSampler, VHS_VideoCombine 등) 추가
– 워크플로우를 JSON으로 내보내기(API)
2. ComfyUI Video Generator node 추가
3. 워크플로우 JSON 붙여넣기
4. 두 이미지 입력 구성:
– 입력 유형(URL, Base64, 또는 Binary) 설정
– 이미지 소스 제공
– 워크플로우 노드 ID 확인
5. 비디오 파라미터 설정:
– 프레임 수(생성할 프레임 수)
– 프레임 속도(FPS)
– 타임아웃(이미지보다 비디오 생성이 더 오래 걸림)
6. 워크플로우를 실행하여 두 입력 이미지 사이를 전환하는 비디오 생성
#### 예제 비디오 워크플로우 요구 사항
ComfyUI 워크플로우는 다음을 포함해야 합니다:
LoadImage 노드 – AnimateDiffLoader + AnimateDiffSampler
– SVDimg2vidConditioning for Stable Video Diffusion
– VHS_VideoCombine for video output
– LatentInterpolate for smooth transitions between images
imagetovideo_example.json을 참조하여 완전한 워크플로우 예제 확인