Nodes/LLM Wildcard Manager/🎲 LLM Wildcard Template Builder
ComfyUI Node

🎲 LLM Wildcard Template Builder

Hand-author the shape of your prompt, let the LLM write the words

By pclshmΒ·Created 5 months agoΒ·Updated 4 months agoΒ· 1
🎲 LLM Wildcard Template Builder
    • structure
    β—„structure{ "blocks": [ { "kind": "sentence", "enabled": true, "role": "scene", "text": "" }, { "kind": "wildcards", "enabled": true, "role": "character", "count": 3, "force_new": false }, { "kind": "sentence", "enabled": true, "role": "action", "text": "" }, { "kind": "wildcards", "enabled": true, "role": "pose", "count": 2, "force_new": false } ] }β–Ί

    The default behavior of the LLM Wildcard Manager is to let the LLM invent your prompt's structure: it decides where the sentence goes, how many wildcards there are, what they're called. Usually that's great. Sometimes you have an opinion. LLM Wildcard Template Builder is for those times - a pure structure configurator that plugs into the Manager's optional structure input and lets you decide the shape while the Manager still supplies the idea, the negative prompt, and the prose.

    It's the difference between saying "make this cinematic" and saying "I want one scene sentence, then exactly three character wildcards, then an action sentence, then two pose wildcards." The Builder is where the second sentence lives.

    How it works

    The node holds no idea, no negative prompt, no server, no LLM of its own. It's a JSON block list with a custom editor on top, and its only job is to emit a WILDCARD_STRUCTURE payload for the Manager. You compose an ordered list of blocks:

    • Sentence block - a literal sentence with no wildcards. Type the text to use it verbatim, or leave it empty and the Manager's LLM writes one, biased toward the block's abstract role (scene, action, setting…).
    • Wildcard group - a count slider (1–12), an abstract role, and a new checkbox. A group of count N emits N uniquely-numbered placeholders (__character_1__, __character_2__, …), so the Resolver fills each with a different value. Tick new and they become __!character_1__, forcing a fresh value every run.

    Roles are structural labels only - they name the dimension a slot covers, never its content. The actual content still comes from the Manager's example_prompt. When a structure is wired in, the Manager drafts each sentence block and emits the exact wildcard counts you defined, resolved deterministically in Python so the LLM can't miscount your "3 character / 2 pose" structure. min_categories and max_categories on the Manager stop applying - the counts come from your sliders.

    Inputs and output

    • structure - a hidden JSON widget holding the block list. You don't normally type here; the block editor on the node writes it. It's the source of truth for headless/API runs, so it's worth knowing it exists.
    • structure (output) - a WILDCARD_STRUCTURE payload. Wire into the Manager's optional structure input.

    The node body gives you a live skeleton preview - something like Sentence(scene) Β· __character__ Γ—3 Β· … - with one row per block, + Sentence / + Wildcard group buttons, and ↑/↓/βœ• to reorder or remove. Everything is edited live; the node performs no LLM work itself.

    When to reach for it

    Honestly? Start without it. The Manager's free-form structure is fine for most runs, and hand-authoring a shape is a control you add once you notice a problem: the LLM keeps inventing the same slot layout, or you want a specific rhythm (hero sentence, character burst, action, pose) that you're tired of re-steering through direction. It's also the node to grab when you're building a repeatable template for a series and want the skeleton frozen while the content keeps re-rolling.

    Installing

    Same pack, same install: ComfyUI Manager β†’ LLM Wildcard Manager, or git clone https://github.com/pclshm/comfyui-llm-wildcard-manager into ComfyUI/custom_nodes and restart. No extra dependencies - the whole pack is stdlib urllib plus a running LLM backend.

    The one thing that trips people up: the Builder is a shaper, not a writer. If you wire it up and get bland sentence blocks, the fix isn't here - it's the Manager's example_prompt, direction, and mood doing their jobs. The Builder just guarantees the skeleton is yours.

    Categoryprompt/wildcards

    Inputs (1)

    NameTypeDefaultDescription
    structureSTRING{ "blocks": [ { "kind": "sentence", "enabled": true, "role": "scene", "text": "" }, { "kind": "wildcards", "enabled": true, "role": "character", "count": 3, "force_new": false }, { "kind": "sentence", "enabled": true, "role": "action", "text": "" }, { "kind": "wildcards", "enabled": true, "role": "pose", "count": 2, "force_new": false } ] }β€”

    Outputs (1)

    NameTypeDescription
    structureWILDCARD_STRUCTUREβ€”