Overview
This node enables image-to-image conversion using a ComfyUI workflow. It takes an input image, uploads it to the ComfyUI API, runs a specified workflow on it, and returns the processed output image(s). This is useful for automating image transformations such as style transfer, enhancement, or other AI-driven modifications defined by the ComfyUI workflow.
Typical use cases include:
- Applying artistic filters or effects to images.
- Enhancing or modifying photos programmatically.
- Integrating AI-based image processing into automated workflows.
Properties
| Name | Meaning |
|---|---|
| Workflow JSON | The ComfyUI workflow definition in JSON format that specifies how the image will be processed. |
| Input Type | The type of input image provided. Options: URL (image fetched from a web address), Base64 (image data encoded in base64), 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. Required if Input Type is Binary. |
| Timeout | Maximum time in minutes to wait for the image generation process before timing out. Default is 30 minutes. |
Output
The node outputs an array of items where each item contains:
jsonobject with:mimeType: MIME type of the output image (e.g.,image/png,image/jpeg).fileName: The filename of the generated image.data: Base64-encoded string of the image data.status: Status information returned from the ComfyUI API about the generation process.
binaryobject with:data: The actual image file data in base64 encoding.- Additional metadata fields such as
fileName,fileType(always"image"),fileSize(human-readable size),fileExtension(e.g.,png,jpg), andmimeType.
This structure allows downstream nodes to easily access both the raw image data and metadata for further processing or saving.
Dependencies
- Requires connection to a ComfyUI API endpoint.
- Needs an API key credential for authentication with the ComfyUI service.
- Uses HTTP requests to interact with the ComfyUI API for uploading images, submitting workflows, and retrieving results.
- Relies on n8n's helper methods for HTTP requests and binary data handling.
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 structure includes a
LoadImagenode. - Missing LoadImage node: The workflow must contain a
LoadImagenode with an image input; otherwise, the node will fail. - 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 out.
- Unsupported media type: Only image MIME types are supported for binary input. Other media types cause an error.
- Timeouts: If image generation exceeds the specified timeout, the node throws a timeout error.
- API connection issues: Failure to connect or authenticate with the ComfyUI API results in errors. Verify API URL and credentials.
- Image not found after generation: If the generated image cannot be retrieved from the ComfyUI server, an error is thrown.
Links and References
- ComfyUI GitHub Repository — For understanding workflow structure and capabilities.
- n8n Documentation — For general guidance on creating and using custom nodes and handling binary data.