Prompt Card Grid
Flip your prompt fragments on and off instead of retyping them
- config
- prompt
Prompt Card Grid is a box of prompt fragments with on/off switches sitting on your canvas. Each card holds one chunk - a quality baseline, an artist tag, a LoRA trigger word, a lighting phrase - and a toggle. Whatever's switched on gets joined in card order and comes out as the node's single prompt output, ready for CLIPTextEncode.text.
No API, no model download, no key. It's a prompt-snippet organiser dressed up as a node.
Why you'd actually want one
The job it solves is comparison: A/B-ing two artist tags, swapping a daylight block for a moody one, pasting a LoRA's trigger words in and out. The alternatives are worse - five CLIP Text Encode nodes into a switch, or retyping the prompt every run and losing the version you liked.
It also changes output, not just canvas hygiene. On every CLIP-lineage encoder earlier tokens land harder, and the grid's card order is the output order - drag a card up and you've genuinely reweighted your prompt, which is why the column count never touches combining order. On Illustrious, NoobAI, WAI or Pony that's leverage. On a 2026 LLM-encoder model, a couple of coherent blocks still beats a wall of commas.
Fair warning: nobody on Reddit is talking about this pack - an exact-phrase search returned zero hits. You're early, and there's no tutorial thread to fall back on.
How it works
There's one required input, config, a custom type the grid UI writes for you: a version-1 JSON string holding the column count and, per card, an id, title, enabled flag and prompt. Python reads the flag and the text and ignores the rest - titles and colours are for your eyes.
Combining is deliberately dumb. Per enabled card: trim whitespace, strip leading and trailing ASCII commas, skip if empty, join the survivors with , . Commas, line breaks and full-width , inside a card are left alone.
The optional prefix_prompt changes the rules slightly. Its tooltip is the honest description: "Optional text prepended to enabled prompt cards; duplicates are removed." When it has usable content, the whole result gets re-split at top-level separators - commas, full-width commas, line breaks - respecting brackets, quotes and escapes, then deduplicated case-insensitively keeping the first spelling. So masterpiece, best quality in your prefix plus masterpiece on a card gives you one copy, not two. With nothing connected you get the legacy grid-only output, exactly.
The inputs that matter
prefix_prompt- optional STRING, and it's aforceInput, so there's a socket with no text box on the node. Wire a primitive string node into it for your LoRA trigger words or a fixed style opener; they get prepended and deduped against the cards.config- required, but the grid owns it. You only touch this from the API, and there it must be a JSON-encoded string, not a nested object. Pass an object and the node refuses to run.
The output is one prompt STRING into CLIPTextEncode.text, or any other string socket. All cards off or empty gives you an empty string rather than an error.
Installing it
No dependencies to install - the README's claim holds up, there's no requirements.txt, and the imports are the stdlib plus aiohttp, which ComfyUI already ships. Manager route: search Prompt Weaver. Manual:
cd ComfyUI/custom_nodes
git clone --branch master https://github.com/qjxmgs/ComfyUI-Prompt-Weaver.git
Restart, then hard-refresh with Ctrl+F5. That step isn't optional: the entire grid is custom frontend JavaScript, and a cached bundle is the usual reason it looks broken.
cd ComfyUI/custom_nodes/ComfyUI-Prompt-Weaver
git pull --ff-only origin master
The Danbooru dictionary for autocomplete is not bundled. The first query shows a download prompt for a ~1.5 MB CSV pinned by SHA-256, stored in your ComfyUI user directory, and your typing is never sent to Danbooru or any remote search endpoint. An optional tag.sqlite drop-in adds Chinese coverage; English works without it.
Where people get burned
The node is missing after install. Usually an incomplete pack folder. If the desktop Prompt Weaver app installed it, note it only installs when the target directory doesn't exist - it never overwrites an older copy. Upgrade manually, then check nodes.py, __init__.py, locales/en, locales/zh and web/prompt_toggle_grid.js are all present.
Archive, favourite and tag changes return HTTP 403. By design, and it bites people. Server-side writes are allowed only when ComfyUI listens on loopback (127.0.0.1, ::1, localhost). Start it with --listen 0.0.0.0 and reads still work but saving returns 403 - proxy and forwarding headers are deliberately not trusted, so a reverse proxy won't save you. Restart loopback-only if you need writes.
"Reset to Default" on a corrupt config. A non-empty config with invalid JSON, a bad root, or a wrong type for version/items/enabled/prompt blocks Python execution outright. The bad value is preserved, not wiped - so if you hand-edited that JSON, that's your culprit.
The grid renders oddly. The README pins a validated baseline of ComfyUI 0.31.1 with frontend 1.48.7, and canvas-widget packs are what the Nodes 2.0 rewrite broke. If cards draw stacked or won't redraw until you resize the node, try the legacy canvas after a Ctrl+F5.
If you want randomised variation, wildcards (__style__, {a|b|c}) from Impact Pack are the better tool and already in most installs. The grid is for the other job: seeing what's on and clicking it. A lot of UI for a list of strings - but if that list is what you keep fiddling with, it earns its place.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| config | PROMPT_WEAVER_PROMPT_GRID | {"version":1,"columns":2,"items":[{"id":"prompt-1","title":"Card 01","prompt":"","enabled":true},{"id":"prompt-2","title":"Card 02","prompt":"","enabled":true},{"id":"prompt-3","title":"Card 03","prompt":"","enabled":true},{"id":"prompt-4","title":"Card 04","prompt":"","enabled":true}]} | — |
| prefix_promptopt | STRING | Optional text prepended to enabled prompt cards; duplicates are removed. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |