ComfyUI Nodes for External Tooling
Provides nodes and API geared towards using ComfyUI as a backend for external tools.
Nodes for sending and receiving images
ComfyUI exchanges images via the filesystem. This requires a multi-step process (upload images, prompt, download images), is rather inefficient, and invites a whole class of potential issues. It's also unclear at which point those images will get cleaned up if ComfyUI is used via external tools.
Load Image (Base64)
Loads an image from a PNG embedded into the prompt as base64 string.
- Inputs: base64 encoded binary data of a PNG image
- Outputs: image (RGB) and mask (alpha) if present
Load Mask (Base64)
Loads a mask (single channel) from a PNG embedded into the prompt as base64 string.
- Inputs: base64 encoded binary data of a PNG image
- Outputs: the first channel of the image as mask
Send Image (WebSocket)
Sends an output image over the client WebSocket connection as PNG binary data.
- Inputs: the image (RGB or RGBA)
This will first send one binary message for each image in the batch via WebSocket:
12<PNG-data>
That is two 32-bit integers (big endian) with values 1 and 2 followed by the PNG binary data. There is also a JSON message afterwards:
{'type': 'executed', 'data': {'node': '<node ID>', 'output': {'images': [{'source': 'websocket', 'content-type': 'image/png', 'type': 'output'}, ...]}, 'prompt_id': '<prompt ID>}}
Nodes for working on regions
When integrating ComfyUI into tools which use layers and compose them on the fly, it is useful to only receive relevant masked regions.
Apply Mask to Image
Copies a mask into the alpha channel of an image.
- Inputs: image and mask
- Outputs: RGBA image with mask used as transparency
API for model inspection
There are various types of models that can be loaded as checkpoint, LoRA, ControlNet, etc. which cannot be used interchangeably. The following API helps to categorize and filter them.
/etn/model_info
Lists available models with additional classification info.
- Paramters: none
- Output: list of model files
The entry is{ "checkpoint_file.safetensors": { "base_model": "sd15"|"sd20"|"sd21"|"sdxl"|"ssd1b"|"svd", "is_inpaint": true|false, "is_refiner": true|false }, ... }{"base_model": "unknown"}for models which are not in safetensors format or do not match any of the known base models.
Note: currently only supports checkpoints. May add other models in the future.
Installation
Download the repository and unpack into the custom_nodes folder in the ComfyUI installation directory.
Or clone via GIT, starting from ComfyUI installation directory:
cd custom_nodes
git clone https://github.com/Acly/comfyui-tooling-nodes.git
Restart ComfyUI and the nodes are functional.
Metadata
Release files for comfyui-tooling-nodes 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| comfyui_tooling_nodes-0.1.0.tar.gz | 30.1 kB | Without provenance | Details for comfyui_tooling_nodes-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| comfyui_tooling_nodes-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for comfyui_tooling_nodes-0.1.0-py2.py3-none-any.whl |
Total release size: 61.4 kB
Release files / comfyui_tooling_nodes-0.1.0.tar.gz
| Download URL | comfyui_tooling_nodes-0.1.0.tar.gz |
|---|---|
| Size | 30.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16007ae5b6da1a0292a82c25bab167aa9b2b7b8b532b29670e31a43c7d39779d
|
|
BLAKE2b-256 checksum How to use checksums |
10992405f198abd4890491b9bb2adec440915fb28f551c94116acdd4ba6a3a69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.0
|
Release files / comfyui_tooling_nodes-0.1.0-py2.py3-none-any.whl
| Download URL | comfyui_tooling_nodes-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a67723c739a75f167c1c6ec02e6179f70a023afab4ec96b1165018bc011a4e7a
|
|
BLAKE2b-256 checksum How to use checksums |
07a0cf19cccb764fd2f62ad57a3035c2c899d280ee9f21687fc29f918c7a5995
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.0
|
Security for comfyui-tooling-nodes 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.