Name | comfyui-tooling-nodes JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-02-03 19:27:07 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
comfyui
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
```
{
"checkpoint_file.safetensors": {
"base_model": "sd15"|"sd20"|"sd21"|"sdxl"|"ssd1b"|"svd",
"is_inpaint": true|false,
"is_refiner": true|false
},
...
}
```
The entry is `{"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.
Raw data
{
"_id": null,
"home_page": null,
"name": "comfyui-tooling-nodes",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "comfyui",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/10/99/2405f198abd4890491b9bb2adec440915fb28f551c94116acdd4ba6a3a69/comfyui_tooling_nodes-0.1.0.tar.gz",
"platform": null,
"description": "# ComfyUI Nodes for External Tooling\n\nProvides nodes and API geared towards using ComfyUI as a backend for external tools.\n\n## Nodes for sending and receiving images\n\nComfyUI exchanges images via the filesystem. This requires a\nmulti-step process (upload images, prompt, download images), is rather\ninefficient, and invites a whole class of potential issues. It's also unclear\nat which point those images will get cleaned up if ComfyUI is used\nvia external tools.\n\n### Load Image (Base64)\n\nLoads an image from a PNG embedded into the prompt as base64 string.\n* Inputs: base64 encoded binary data of a PNG image\n* Outputs: image (RGB) and mask (alpha) if present\n\n### Load Mask (Base64)\n\nLoads a mask (single channel) from a PNG embedded into the prompt as base64 string.\n* Inputs: base64 encoded binary data of a PNG image\n* Outputs: the first channel of the image as mask\n\n### Send Image (WebSocket)\n\nSends an output image over the client WebSocket connection as PNG binary data.\n* Inputs: the image (RGB or RGBA)\n\nThis will first send one binary message for each image in the batch via WebSocket:\n```\n12<PNG-data>\n```\nThat 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:\n```\n{'type': 'executed', 'data': {'node': '<node ID>', 'output': {'images': [{'source': 'websocket', 'content-type': 'image/png', 'type': 'output'}, ...]}, 'prompt_id': '<prompt ID>}}\n```\n\n## Nodes for working on regions\n\nWhen integrating ComfyUI into tools which use layers and compose them on the fly, it is useful to only receive relevant masked regions.\n\n### Apply Mask to Image\n\nCopies a mask into the alpha channel of an image.\n* Inputs: image and mask\n* Outputs: RGBA image with mask used as transparency\n\n## API for model inspection\n\nThere 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.\n\n### /etn/model_info\n\nLists available models with additional classification info.\n* Paramters: _none_\n* Output: list of model files\n ```\n {\n \"checkpoint_file.safetensors\": {\n \"base_model\": \"sd15\"|\"sd20\"|\"sd21\"|\"sdxl\"|\"ssd1b\"|\"svd\",\n \"is_inpaint\": true|false,\n \"is_refiner\": true|false\n },\n ...\n }\n ```\n The entry is `{\"base_model\": \"unknown\"}` for models which are not in safetensors format or do not match any of the known base models.\n\n_Note: currently only supports checkpoints. May add other models in the future._\n\n## Installation\n\nDownload the repository and unpack into the `custom_nodes` folder in the ComfyUI installation directory.\n\nOr clone via GIT, starting from ComfyUI installation directory:\n```\ncd custom_nodes\ngit clone https://github.com/Acly/comfyui-tooling-nodes.git\n```\n\nRestart ComfyUI and the nodes are functional.\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/Acly/comfyui-tooling-nodes",
"comfyui-legacy": "https://github.com/Chaoses-Ib/comfyui-legacy"
},
"split_keywords": [
"comfyui"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "07a0cf19cccb764fd2f62ad57a3035c2c899d280ee9f21687fc29f918c7a5995",
"md5": "fcee0b9737ef0ce0f290dad725a9aae0",
"sha256": "a67723c739a75f167c1c6ec02e6179f70a023afab4ec96b1165018bc011a4e7a"
},
"downloads": -1,
"filename": "comfyui_tooling_nodes-0.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "fcee0b9737ef0ce0f290dad725a9aae0",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 31326,
"upload_time": "2024-02-03T19:27:05",
"upload_time_iso_8601": "2024-02-03T19:27:05.280189Z",
"url": "https://files.pythonhosted.org/packages/07/a0/cf19cccb764fd2f62ad57a3035c2c899d280ee9f21687fc29f918c7a5995/comfyui_tooling_nodes-0.1.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "10992405f198abd4890491b9bb2adec440915fb28f551c94116acdd4ba6a3a69",
"md5": "fef11abb5adf92c5c4fa8fe84feb482b",
"sha256": "16007ae5b6da1a0292a82c25bab167aa9b2b7b8b532b29670e31a43c7d39779d"
},
"downloads": -1,
"filename": "comfyui_tooling_nodes-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "fef11abb5adf92c5c4fa8fe84feb482b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 30112,
"upload_time": "2024-02-03T19:27:07",
"upload_time_iso_8601": "2024-02-03T19:27:07.335080Z",
"url": "https://files.pythonhosted.org/packages/10/99/2405f198abd4890491b9bb2adec440915fb28f551c94116acdd4ba6a3a69/comfyui_tooling_nodes-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-03 19:27:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Acly",
"github_project": "comfyui-tooling-nodes",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "comfyui-tooling-nodes"
}