Nodes/Orion4D_MetaPrompt/🧠 MetaPrompt
ComfyUI Node

🧠 MetaPrompt

The prompt-picking engine that eats your spaghetti

By orion4d·Created 2 months ago·Updated 2 months ago· 12
🧠 MetaPrompt
    • concatenated
    • lines_json
    • total_count
    metaprompt_state_json{}

    You've opened someone's workflow and it's forty text primitives, six random pickers, and a knot of wires that would make a certified IT guy cry. MetaPrompt is the anti-spaghetti: one node that picks lines from as many .txt/.csv lists as you want, slots in manual text blocks, and joins them with per-block separators - then hands you a finished prompt. The graph stays clean because the actual editing happens in a full-screen web app that pops out when you click Open APP on the node.

    It's the base node in the Orion4D MetaPrompt pack, and it's worth reaching for any time you build prompts by assembling fragments - subject, style, camera, location, lighting - from reusable lists. Instead of a dozen nodes, you get one that resolves everything on each queue. It's a "prompt-picking engine," not an LLM: no API calls, no model download, nothing to pull. The name makes it sound cleverer than it is; the thing it actually kills is workflow sprawl.

    How it works

    The node's only required input is metaprompt_state_json, a hidden widget that stores compact block metadata: file paths, per-block seeds, selected indexes, and manual text. The important design choice is that list file contents are never embedded in the workflow JSON - just pointers to them - so your saved workflows stay small and stay valid when the lists change.

    Inside the app you build blocks. Each one reads a list file or holds text you typed, gets its own separator (say , or a line break), and one of four seed modes: Select stays locked to the line you picked, Randomize grabs a new line each queue using an independent seed, and Increment/Decrement cycle through the list step by step. On queue the node resolves every active block, concatenates them with their separators, and that's your prompt.

    Path safety is handled with tokens rather than raw absolute paths: {COMFY} points at your ComfyUI root and {CUSTOM} at an extra mapped directory, both checked by a containment guard so a workflow can't reach outside its sandbox. That matters when you share workflows across machines - the paths mean something on both ends.

    The inputs and outputs that matter

    Honestly, you barely touch the inputs. metaprompt_state_json is managed by the app; hand-editing it is how you break the node. What you actually wire up is the output side:

    • concatenated (STRING) - the assembled prompt. Feed it into your CLIPTextEncode positive input, or into the pack's MetaPrompt Ollama node if you want an LLM to enrich it first.
    • lines_json (STRING) - the per-block selected lines as JSON. Useful for debugging which block produced what.
    • total_count (INT) - how many active blocks resolved this run.

    Installing it

    ComfyUI Manager is the easy route: search for Orion4D MetaPrompt and install, then restart. Manual install is the same as always:

    cd /path/to/ComfyUI/custom_nodes/
    git clone https://github.com/orion4d/Orion4D_MetaPrompt.git
    

    Restart ComfyUI. The pack's requirements.txt lists aiohttp, numpy, Pillow, and the ollama client - but this base node needs none of it to function. They're there for the sibling nodes. No model files to download here.

    Where people get burned

    Because the controls live in the modal app, the node looks almost empty on the graph - expect that, don't go hunting for the hidden menu. Increment/Decrement modes need a sensible starting seed or they'll feel random. And a note worth carrying: this is an LLM/VLM-adjacent pack from a fresh author (Orion4D, reddit handle boulettoxx, who also makes the FXMax color-grading suite). It's a young project with a thin community footprint, and LLM-type nodes are exactly the category that has been weaponized before. It's MIT-licensed and small - skim the source before you make it a permanent part of your setup.

    CategoryOrion4D_MetaPrompt/

    Inputs (1)

    NameTypeDefaultDescription
    metaprompt_state_jsonSTRING{}

    Outputs (3)

    NameTypeDescription
    concatenatedSTRING
    lines_jsonSTRING
    total_countINT