ComfyUI icon

ComfyUI

Execute ComfyUI workflows

ComfyUI

AI-generated

Overview

This node executes ComfyUI workflows by sending a JSON workflow definition to a ComfyUI API server. It queues the workflow for processing, waits for completion within a specified timeout, and then downloads the resulting images or videos. The node supports outputting images in JPEG, PNG, WebP formats with configurable quality, or raw original files without conversion. It is useful for automating image or video generation workflows using ComfyUI, such as generating AI art or video clips based on complex workflow definitions.

Use Case Examples

  1. An artist automates the generation of AI artwork by defining a ComfyUI workflow JSON and uses this node to execute it, receiving the output images in JPEG format.
  2. A developer integrates ComfyUI into an automation pipeline to generate video clips from workflows, downloading the results as raw files for further processing.

Properties

Name Meaning
Workflow JSON The ComfyUI workflow in JSON format to be executed.
Output Format The format of the output images or videos. Options include JPEG, PNG, WebP, or Raw (original files without conversion).
JPEG Quality Quality setting for JPEG output images (1-100). Only shown if output format is JPEG.
WebP Quality Quality setting for WebP output images (1-100). Only shown if output format is WebP.
Timeout Maximum time in minutes to wait for the workflow to complete before timing out.

Output

Binary

The node outputs binary data representing the downloaded images or videos. Each output item includes the file name, base64-encoded data, file type, file size, file extension, and MIME type.

JSON

  • filename - The name of the output file.
  • type - The type of the output (e.g., image or video).
  • subfolder - Optional subfolder path where the file is stored.
  • mediaType - The media type of the output, such as 'image' or 'video'.
  • error - Error message if the file download failed.

Dependencies

  • Requires an API key credential for authenticating with the ComfyUI API server.

Troubleshooting

  • Common issues include API connection failures, prompt queueing errors, and workflow execution errors indicated by status messages from the ComfyUI server.
  • Timeout errors occur if the workflow does not complete within the specified timeout period.
  • Errors related to missing outputs or prompt disappearance usually indicate server crashes or prompt parsing errors.
  • Authentication errors may occur if the API key is missing or invalid.

Discussion