Overview
This node converts images into videos using a ComfyUI workflow. It uploads an input image to the ComfyUI API, injects it into a user-provided JSON workflow, triggers video generation, and waits for the process to complete within a specified timeout. Once done, it retrieves the generated video or animation output.
Common scenarios include:
- Creating animated videos from static images using custom ComfyUI workflows.
- Automating video generation pipelines where input images come from URLs, base64 strings, or binary data.
- Integrating ComfyUI's image-to-video capabilities into larger n8n workflows for media processing.
Practical example:
- A user provides a URL of an image and a ComfyUI workflow JSON that defines how to animate this image into a video. The node uploads the image, runs the workflow, waits for completion, then outputs the resulting video file for further use or storage.
Properties
| Name | Meaning |
|---|---|
| Workflow JSON | The ComfyUI workflow in JSON format defining the nodes and connections for video generation. |
| Input Type | Specifies the type of input image: URL, Base64 string, or Binary data from previous node. |
| Input Image | The image data as a URL or base64 string (shown only if Input Type is URL or Base64). |
| Binary Property | The name of the binary property containing the image (shown only if Input Type is Binary). |
| Timeout | Maximum time in minutes to wait for the video generation process before timing out. |
Output
The node outputs one item with the following structure:
json:mimeType: MIME type of the output media (e.g.,video/mp4,image/webp,image/gif).fileName: The filename of the generated media.data: Base64-encoded string of the video or animation content.status: Status object returned by ComfyUI indicating the generation state.
binary:data: Contains the actual media file encoded in base64 along with metadata:fileName: Filename of the media.fileType: Always"video".fileSize: Approximate size in kilobytes.fileExtension: File extension such asmp4,webp, orgif.mimeType: MIME type matching the media format.
This allows downstream nodes to access the video file either as JSON data or as binary data for saving or further processing.
Dependencies
- Requires access to a ComfyUI API endpoint with an API key credential for authentication.
- The node expects the ComfyUI API to support endpoints for system stats, image upload, prompt submission, and history retrieval.
- Uses HTTP requests to communicate with the ComfyUI API.
- Requires the n8n environment to have internet access if input images are provided via URLs.
Troubleshooting
- Invalid workflow JSON: If the workflow JSON is malformed or not a valid object, the node throws an error. Ensure the JSON syntax is correct and the workflow contains a
LoadImagenode with an image input. - Missing LoadImage node: The workflow must contain a node of class type
LoadImagewith an image input; otherwise, the node will error. - No binary image found: When using binary input type, if the specified binary property does not exist or is not an image, the node tries to find an alternative image property. If none found, it errors.
- Unsupported media type: Only images are supported as input. Providing non-image binary data results in an error.
- Video generation timeout: If the video is not generated within the specified timeout (default 30 minutes), the node throws a timeout error.
- API connection issues: Failure to connect or authenticate with the ComfyUI API will cause errors. Verify API URL and API key correctness.
- Video file not found: If the generated video file cannot be retrieved from the ComfyUI server, an error is thrown.
Links and References
- ComfyUI GitHub Repository (for understanding workflow JSON structure)
- n8n Documentation on Creating Custom Nodes
- General info on Base64 encoding
This summary is based solely on static analysis of the provided source code and property definitions.