This commit is contained in:
cyberdelia
2026-04-22 14:25:21 +02:00
parent 1db17d8582
commit 3b39c41dd6
8 changed files with 60 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
name: Publish to Comfy registry
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
publish-node:
name: Publish Custom Node to registry
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Publish Custom Node
uses: Comfy-Org/publish-node-action@main
with:
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Cyberdelia (ComfyUI port)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+18
View File
@@ -1,5 +1,19 @@
# ComfyUI-PromptFormat
Prompt cleanup for ComfyUI.
## Before / After
One click on `✨ Format` turns this:
![Before formatting — messy prompt with underscores and duplicates](examples/example01.png)
...into this:
![After formatting — underscores replaced, duplicates removed, spacing fixed](examples/example02.png)
Note how `the_legend_of_zelda:_breath_of_the_wild` becomes `the legend of zelda:breath of the wild`, duplicates like `gloves` are removed, and colon spacing is tightened — without touching your tag weights or brackets.
## What it does
- **Dedupe tags** — removes duplicates, with optional regex-based aliases (e.g. `1girl: girl, woman, lady`).
@@ -12,6 +26,8 @@
### 1. The nodes — automatic formatting on run
![The two Cyberdelia nodes: Prompt Format and Prompt Format + Encode](examples/example03.png)
- **Prompt Format (Cyberdelia)** — string → string. Drop it between any text source and your text encoder.
- **Prompt Format + Encode (Cyberdelia)** — string + CLIP → CONDITIONING. Combines formatting and CLIP encoding in one step.
@@ -28,6 +44,8 @@ A `✨ Format` and `↶ Undo` button is injected into the stock text encoder nod
Right-click for per-node-type toggles (dedupe / remove underscores / append comma), stored in localStorage. Exclusions and aliases aren't exposed on foreign nodes — if you need those, chain a `Prompt Format` node instead.
![Right-click context menu with Dedupe / Remove underscores / Append comma toggles](examples/example04.png)
Formatting is **not realtime** in either case. The button runs on click; the node runs on workflow execute.
## Installation
-1
View File
@@ -1,5 +1,4 @@
"""ComfyUI-PromptFormat — Cyberdelia
Port of sd-webui-prompt-format to ComfyUI.
"""
from .prompt_format import PromptFormatNode, PromptFormatEncodeNode
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB