Overview
This node integrates with ComfyUI, a system for managing AI model resources and workflow queues. It allows users to interact programmatically with ComfyUI's API to manage workflows, queue tasks, and retrieve or manipulate model-related data.
Common scenarios where this node is beneficial include:
- Monitoring and controlling the execution queue of ComfyUI workflows.
- Managing historical task records such as clearing or deleting specific history entries.
- Retrieving system information about the ComfyUI instance.
- Listing available AI models, samplers, schedulers, extensions, and embeddings managed by ComfyUI.
- Filtering models by type to integrate specific AI components into automated pipelines.
Practical examples:
- Automatically clearing the current workflow queue before starting a new batch of tasks.
- Fetching the latest 5 history records to analyze recent processing results.
- Querying all available models or only those of a certain type (e.g., checkpoints or LoRA) to dynamically select models for generation.
- Interrupting a currently running task if needed from an external automation.
Properties
| Name | Meaning |
|---|---|
| ComfyUI 服务器地址 | The URL address of the ComfyUI server (e.g., http://localhost:8188 or https://example.com). This is the base endpoint for all API requests. |
| 手动指定 Header Key | Optional manual input for the authentication header key (e.g., Authorization). If provided, it overrides the default or credential-based header key used for API requests. |
| 手动指定 Header Value | Optional manual input for the authentication header value (password type). If provided, it overrides the default or credential-based header value used for API requests. |
| 操作类别 | Operation category to execute: either "队列管理" (queue management) or "模型管理" (model management). Determines which set of operations will be available. |
When 操作类别 = 队列管理 (queue)
| Name | Meaning |
|---|---|
| 队列操作 | Queue operation to perform: |
| - 获取最近5条历史记录 (Get recent 5 history records) | |
| - 获取队列状态 (Get current queue status) | |
| - 清空队列 (Clear all tasks in the queue) | |
| - 中断当前执行 (Interrupt the currently running task) | |
| - 清空历史记录 (Clear all history records) | |
| - 删除历史记录项 (Delete a specific history record by Prompt ID) | |
| - 获取系统信息 (Get ComfyUI system information) | |
| Prompt ID | Required when deleting a history item; specifies the Prompt ID of the history record to delete. |
When 操作类别 = 模型管理 (models)
| Name | Meaning |
|---|---|
| 模型操作 | Model operation to perform: |
| - 获取所有模型 (Get all available models) | |
| - 获取特定类型模型 (Get models filtered by type) | |
| - 获取采样器列表 (Get list of available samplers) | |
| - 获取调度器列表 (Get list of available schedulers) | |
| - 获取扩展列表 (Get list of installed extensions) | |
| - 获取嵌入向量列表 (Get list of available embeddings) | |
| 模型类型 | When filtering models by type, choose the model type: |
| - 检查点模型 (checkpoints) | |
| - VAE | |
| - LoRA | |
| - ControlNet | |
| - CLIP | |
| - CLIP Vision | |
| - 扩散器 (diffusers) | |
| - 正则化图像 (regularization images) | |
| - 升频器 (upscale models) |
Output
The node outputs an array of JSON objects corresponding to the results of the selected operation. Each output item contains a json field with the data returned from the ComfyUI API.
For queue operations, the output may include:
- Recent history records (array of history items).
- Current queue status details.
- Confirmation messages for actions like clearing queue/history or interrupting execution.
- System information data structure.
For model operations, the output includes:
- Lists of models, samplers, schedulers, extensions, or embeddings depending on the chosen operation.
- When filtering by model type, only the relevant subset of models is returned.
The node does not output binary data.
Dependencies
- Requires access to a running ComfyUI server reachable at the specified
serverUrl. - Optionally requires an API authentication token or header configured either via credentials or manual header key/value inputs.
- Uses HTTP requests (via axios) to communicate with ComfyUI's REST API endpoints.
- Timeout for API calls is set to 10 seconds.
Troubleshooting
Common Issues
- Connection refused or timeout errors usually indicate that the ComfyUI server is not running, the URL/port is incorrect, or network connectivity issues exist.
- 403 Forbidden errors suggest authentication problems or access restrictions on the ComfyUI server.
- 404 Not Found errors may occur if the ComfyUI version does not support the requested API endpoint or if the URL path is incorrect.
- 500 Internal Server Errors indicate server-side problems within ComfyUI, possibly due to resource exhaustion or internal bugs.
Error Messages and Resolutions
403 Forbidden:
Check if the ComfyUI server is running and accessible. Verify the server URL and port. Confirm that any required authentication tokens or headers are correctly configured. Ensure firewall or security settings allow access.404 Not Found:
Confirm the ComfyUI version supports the API endpoint being called. Double-check the server URL and path correctness.500 Internal Server Error:
Review ComfyUI server logs for detailed error information. Restart the ComfyUI service if necessary. Check server resource usage.Connection Refused / ECONNREFUSED:
Make sure the ComfyUI server is started and listening on the specified address and port. Verify network connectivity.Request Timeout / ETIMEDOUT:
Network latency or server overload might cause slow responses. Increase timeout settings if possible or check server health.
If the node is set to continue on failure, error details including suggestions are returned in the output JSON for easier debugging.
Links and References
- ComfyUI GitHub Repository — Official source and documentation for ComfyUI.
- ComfyUI API Documentation — Details on available API endpoints and usage.
- Axios HTTP Client — Library used for making HTTP requests in this node.