{"id":19888000,"url":"https://github.com/acly/comfyui-tooling-nodes","last_synced_at":"2025-05-15T01:06:42.170Z","repository":{"id":191161116,"uuid":"684049556","full_name":"Acly/comfyui-tooling-nodes","owner":"Acly","description":"Nodes for using ComfyUI as a backend for external tools. Send and receive images directly without filesystem upload/download.","archived":false,"fork":false,"pushed_at":"2025-04-28T08:11:46.000Z","size":1225,"stargazers_count":484,"open_issues_count":7,"forks_count":55,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-08T17:06:22.296Z","etag":null,"topics":["comfyui","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Acly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-28T10:54:14.000Z","updated_at":"2025-05-08T06:44:12.000Z","dependencies_parsed_at":"2024-03-04T09:55:26.312Z","dependency_job_id":"f73adfef-edaf-48db-bb53-d39905c8ee8e","html_url":"https://github.com/Acly/comfyui-tooling-nodes","commit_stats":null,"previous_names":["acly/comfyui-tooling-nodes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fcomfyui-tooling-nodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fcomfyui-tooling-nodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fcomfyui-tooling-nodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Acly%2Fcomfyui-tooling-nodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Acly","download_url":"https://codeload.github.com/Acly/comfyui-tooling-nodes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","stable-diffusion"],"created_at":"2024-11-12T18:06:03.551Z","updated_at":"2025-05-15T01:06:37.155Z","avatar_url":"https://github.com/Acly.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ComfyUI Nodes for External Tooling\n\nProvides nodes and API geared towards using ComfyUI as a backend for external tools.\n\n* \u003ca href=\"#images\"\u003eSending and receiving images\u003c/a\u003e\n* \u003ca href=\"#regions\"\u003eRegions (Attention Masking)\n* \u003ca href=\"#tiles\"\u003eTiled image processing\n* \u003ca href=\"#misc\"\u003eMiscellanious nodes\n* \u003ca href=\"#api\"\u003eHttp API extensions (Model inspection)\n* \u003ca href=\"#installation\"\u003e⭳ Installation\u003c/a\u003e\n\n\n## \u003ca id=\"images\" href=\"#toc\"\u003eSending and receiving images\u003c/a\u003e\n\nComfyUI exchanges images via the filesystem. This requires a\nmulti-step process (upload images, prompt, download images), which\ninvites a whole class of potential issues you might not want to deal with.\nIt's also unclear at 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\u003cPNG-data\u003e\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': '\u003cnode ID\u003e', 'output': {'images': [{'source': 'websocket', 'content-type': 'image/png', 'type': 'output'}, ...]}, 'prompt_id': '\u003cprompt ID\u003e}}\n```\n\n## \u003ca id=\"regions\" href=\"#toc\"\u003eRegions\u003c/a\u003e\n\nThese nodes implement attention masking for arbitrary number of image regions. Text prompts only apply to the masked area.\nIn contrast to condition masking, this method is less \"forceful\", but leads to more natural image compositions.\n\n![Regions Attention Mask](workflows/region_attention_mask.png)\n[Workflow: region_attention_mask.json](workflows/region_attention_mask.json)\n\n### Background Region\n\nThis node starts a list of regions. It takes a prompt, but no mask. The prompt is assigned to all image areas which are _not_\ncovered by another region mask in the list.\n\n### Define Region\n\nAppends a new region to a region list (or starts a new list). Takes a prompt, and mask which defines the area in the image\nthe prompt will apply to. Masks must be the same size as the image _or_ the latent (which is factor 8 smaller).\n\n### List Region Masks\n\nThis node takes a list of regions and outputs all their masks. It can be useful for inspection, debugging or to reuse the\ncomputed background mask.\n\n### Regions Attention Mask\n\nPatches the model to use the provided list of regions. This replaces the positive text conditioning which is provided\nto the sampler. It's still possible to pass ControlNet and other conditioning to the sampler.\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\n## \u003ca id=\"tiles\" href=\"#toc\"\u003eTiles\u003c/a\u003e\n\nSplitting an image into tiles to be processed individually is a useful method to speed up\ndiffusion and save VRAM. There are various nodes out there which provide a fixed pipeline.\nIn contrast, the following nodes only provide a way to split an image into tiles and merge\nit back together. With tools and scripts it is feasible to generate individual workflows\nfor each tile. This allows maximum flexibility (different prompts, regions, control, etc.).\n\n![Image tiles](workflows/image_tiles.png)\n[Workflow: image_tiles.json](workflows/image_tiles.json)\n\n### Create Tile Layout\n\nThis node defines the tiling parameters:\n* **min_tile_size**: Minimum resolution of each tile in pixels. Tiles may be larger to fit the image size evenly.\n* **padding**: Padding around each tile in pixels. Overlaps with neighbour tiles. There is no padding at the image borders.\n* **blending**: The part of the padding area which is used for smooth blending to avoid seams. Affects masks which are generated from this layout.\n\nThe number of tiles is: `image_size // (min_tile_size + 2 * padding)`\n\n### Extract Image Tile\n\nSplits out part of an image. Tile indices range from 0 to number of tiles and are column-major\n(tile 1 is usually below tile 0).\n\n### Extract Mask Tile\n\nSame as \"Extract Image Tile\" but for masks.\n\n### Merge Image Tile\n\nMerges a tile into a full image, usually after sampling. Uses a smooth transition overlap\nbetween neighbouring tiles depending on padding and blending values.\n\n### Generate Tile Mask\n\nCreates a coverage mask for a certain tile. The size of the mask matches the image tile size.\nThe image area will be white (1) and the padding area black (0), with a smooth transition\ndepending on the chosen blend size. \n\nThis mask is used internally by \"Merge Image Tile\", but it can also be useful as input for \"Set Latent Noise Mask\" in upscale workflows.\n\n\n## \u003ca id=\"misc\" href=\"#toc\"\u003eMiscellaneous Nodes\u003c/a\u003e\n\n\u003ca id=\"node-translate\"\u003e\u003c/a\u003e\n### Translate Text\n\nNode which translates a string into English. The language to translate from is indicated with a\n_language directive_ of the form `lang:xx` where xx is a 2-letter language code. Multiple\ndirectives are allowed and change language for any text that comes after, until the next\ndirective. `lang:en` (the default) passes through text fragments untouched. Useful\nfor keywords, tags and such.\n\nExamples:\n| Input | Output |\n|:-|:-|\n| lang:de eine modische handtasche aus grünem kunstleder | a fashionable handbag made of green suede |\n| origami paperwork, lang:zh 狐狸和鹤, lang:en mountain view | origami paperwork, Fox and crane, mountain view |\n\nTranslation happens entirely local, powered by [argosopentech/argos-translate](https://github.com/argosopentech/argos-translate):\n* Install with `pip install argostranslate` or `pip install -r requirements.txt`\n* Models are automatically downloaded on first use.\n\nThere is also a [translation API](#api-translation) for immediate feedback in tool UI.\n\n### NSFW Filter\n\nChecks images for NSFW content using [Safety-Checker](https://huggingface.co/CompVis/stable-diffusion-safety-checker). Images which don't pass the check are blurred to\nobfuscate contents. Model is downloaded on first use.\n\nInputs: image and sensitivity (0.5 for explicit content only, 0.7+ to include partial nudity).\n\n**Important:** the filter isn't perfect. Some explicit content may slip through.\n\n\n## \u003ca id=\"api\" href=\"#toc\"\u003eAPI extensions\u003c/a\u003e\n\n### GET /api/etn/model_info/{folder_name}\n\nThere are various types of models that can be loaded as checkpoint, LoRA, ControlNet, etc. which cannot be used interchangeably. This endpoint helps to categorize and filter them.\n\n#### Paramters\n* `folder_name`: sub-directory in ComfyUI's models folder.\n  Supported model types: `checkpoints`, `diffusion_models`\n\n#### Output\nLists available models with additional classification info:\n```json\n{\n    \"checkpoint_file.safetensors\": {\n        \"base_model\": \"sd15\",\n        \"is_inpaint\": false,\n        \"type\": \"eps\"\n    },\n    ...\n}\n```\nPossible values for base model: `sd15, sd20, sd21, sd3, sdxl, sdxl-refiner, ssd1b, svd, cascade-b, cascade-c, aura-flow, hunyuan-dit, flux, flux-schnell, lumina2`\n\nIf base model is `sdxl`, the `type` attribute is set with possible values: `eps, edm, v-prediction, v-prediction-edm`\n\nThe 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### GET /api/etn/languages\n\nReturns a list of available languages for translation.\n```json\n[\n    { \"name\": \"English\", \"code\": \"en\" },\n    { ... }\n]\n```\n\n\u003ca id=\"api-translation\"\u003e\u003c/a\u003e\n### GET /api/etn/translate/{lang}/{text}\n\nTranslates `text` into English. `lang` is a 2-letter code indicating the language to translate\nfrom. `text` may also contain _language directives_ to only translate some fragments.\nSee the [node documentation](#node-translate) for details.\n\n* Output: JSON string\n* Example: `/api/etn/translate/de/eine%20modische%20Handtasche` -\u003e `\"a fashionable handbag\"`\n\n### PUT /api/etn/upload/{folder_name}/{filename}\n\nUploads a model to ComfyUI's local model folder.\n\n#### Parameters\n* `folder_name`: the model type. Must match one of the existing folders in ComfyUI's models folder.\n* `filename`: target filename for the model. Must not contain any (absolute or relative) path. Extension must be .safetensors.\n\n#### Output\n* Code `201` and `{ \"status\": \"success\" }` after successful upload.\n* Code `200` and `{ \"status\": \"cached\" }` if the file already exists.\n* Code `400` and `{ \"error\": \"...\" }` if the parameters are invalid.\n\n\n## \u003ca id=\"installation\" href=\"#toc\"\u003eInstallation\u003c/a\u003e\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facly%2Fcomfyui-tooling-nodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facly%2Fcomfyui-tooling-nodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facly%2Fcomfyui-tooling-nodes/lists"}