ComfyUI icon

ComfyUI

Execute ComfyUI workflows

Overview

This node executes ComfyUI workflows by sending a JSON workflow definition to a ComfyUI API endpoint. It queues the workflow for processing, waits for completion within a specified timeout, and then downloads the resulting images in the chosen format (JPEG or PNG). This node is useful for automating image generation workflows using ComfyUI, such as generating AI art or processing images programmatically.

Use Case Examples

  1. Automate generation of AI artwork by providing a ComfyUI workflow JSON and retrieving output images.
  2. Batch process image transformations defined in a ComfyUI workflow and save results in JPEG or PNG format.

Properties

Name Meaning
Workflow JSON The ComfyUI workflow in JSON format to be executed.
Output Format The format of the output images, either JPEG or PNG.
JPEG Quality Quality of JPEG output images, from 1 to 100. Only applicable if output format is JPEG.
Timeout Maximum time in minutes to wait for the workflow to complete before timing out.

Output

Binary

Contains the downloaded image data including filename, file type, file size, file extension, and MIME type.

JSON

  • filename - The filename of the output image.
  • type - The type of image output (e.g., output or temp).
  • subfolder - Optional subfolder where the image is stored.
  • data - Base64 encoded image data.
  • error - Error message if image download failed.

Dependencies

  • Requires an API key credential for ComfyUI API authentication.

Troubleshooting

  • Common issues include failure to connect to the ComfyUI API, which may be due to incorrect API URL or missing/invalid API key.
  • Timeout errors occur if the workflow does not complete within the specified timeout period; increasing the timeout may help.
  • Errors indicating missing prompt ID or outputs suggest issues with the workflow JSON or ComfyUI server processing.
  • Image download failures may be caused by network issues or invalid image references in the workflow output.

Discussion