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 output video file. This is useful for automating video creation from images with customizable workflows, such as creating animated sequences or slideshows based on AI-driven processing.
Practical examples:
- Converting a single image into a short video clip with effects defined in a ComfyUI workflow.
- Automating batch video generation by feeding different images and workflows.
- Integrating AI-based video synthesis into larger automation pipelines.
Properties
| Name | Meaning |
|---|---|
| Workflow JSON | The ComfyUI workflow definition in JSON format that controls how the image is processed into video. Must contain a LoadImage node. |
| Input Type | Specifies the type of input image: URL (image downloaded from a web address), Base64 (base64-encoded image string), or Binary (image data from binary input). |
| Input Image | The URL or base64 string of the input image. Required if Input Type is url or base64. |
| Binary Property | The name of the binary property containing the image data when Input Type is binary. Defaults to "data". |
| Timeout | Maximum time in minutes to wait for the video generation process before timing out. Default is 30 minutes. |
Output
The node outputs a single item containing:
json:mimeType: MIME type of the generated media (e.g.,video/mp4,image/webp,image/gif).fileName: The filename of the generated video or image.data: Base64-encoded string of the generated video/image content.status: Status object returned from ComfyUI about the generation process.
binary:data: Contains the actual binary data of the generated video/image encoded as base64.- Additional metadata fields like
fileName,fileType(always"video"),fileSize(approximate size in kB),fileExtension(e.g.,mp4,webp,gif), andmimeType.
This allows downstream nodes to access both metadata and raw video/image data for further processing or saving.
Dependencies
- Requires access to a ComfyUI API endpoint with an API URL and an API key credential.
- The node expects the ComfyUI API to support endpoints for system stats, image upload, prompt submission, and history retrieval.
- n8n credentials must be configured with the ComfyUI API URL and API key.
- Uses standard HTTP requests and multipart form-data for uploading images.
Troubleshooting
- Invalid workflow JSON: If the provided workflow JSON is malformed or not a valid object, the node will throw an error. Ensure the JSON syntax is correct and the structure matches ComfyUI expectations.
- Missing LoadImage node: The workflow must include a LoadImage node with an image input. Without this, the node cannot inject the uploaded image and will error.
- Binary property not found: When using binary input, if the specified binary property does not exist or is not an image, the node tries to find an alternative image property. If none is found, it errors.
- Unsupported media type: Only images are supported as input. Providing non-image binary data will cause an error.
- Video generation timeout: If the video is not generated within the specified timeout, the node throws a timeout error. Increase the timeout if needed.
- API connection issues: Failure to connect to the ComfyUI API or invalid API key will cause errors. Verify API URL and credentials.
- No media outputs found: If the ComfyUI response contains no video or image outputs, the node errors. Check the workflow and ComfyUI logs.
Links and References
- ComfyUI GitHub Repository — For understanding workflow structure and capabilities.
- n8n Documentation — For general node development and usage guidance.
- FormData npm package — Used internally for multipart uploads.