Json Prompt Builder (Legacy)
The four-slot JSON aggregator that only speaks PROMPT_VAR
- variable_a
- variable_b
- variable_c
- variable_d
- json_string
The legacy twin of the Json Prompt Builder: same job - turn named variables into a JSON object for LLM-encoded models like Flux 2 Klein, Anima or the Qwen-based family - but with the fixed four-slot setup the pack shipped before its inputs became dynamic. If you're loading a workflow saved on an older version of ComfyUI Prompt Builder, this is the node that keeps it running.
How it works
You get variable_a through variable_d inputs and nothing else - no template, no configuration. Connect Text Prompt Nodes to as many slots as you need, and the node returns a single json_string (type STRING): a pretty-printed JSON object where each variable's var_name is the key and its text is the value. Output order follows the slots, so a through d come out in order.
There's one quirk that bites people coming from the newer node: the legacy JSON builder's slots are typed PROMPT_VAR, and it only understands variables that carry a name. If you connect a raw string, it's silently skipped - no key, no value, no error, it just doesn't appear in the output. The dynamic version at least falls back to using the slot name as a key; this one drops the input entirely. Feed it Text Prompt Nodes and you're fine; feed it loose strings and your JSON comes out missing fields with no obvious explanation.
Four slots, one purpose
Like its text counterpart, the fixed-slot design is the defining limitation - four variables is fine for a simple subject / style / lighting / camera setup and cramped the moment you want composition, camera details and a couple of character attributes. The dynamic Json Prompt Builder does all of this with unlimited growing inputs, and it's the same one-click install. Use this one when an old workflow needs it; use the dynamic node when you're building fresh.
Installing it
It ships inside ComfyUI Prompt Builder, so the install is shared. ComfyUI Manager: search "ComfyUI Prompt Builder", or:
cd ComfyUI/custom_nodes
git clone https://github.com/aimoviestudio/comfyui-promptbuilder
Restart ComfyUI and it's ready. No dependencies, no model downloads - the pack is a few hundred lines of Python plus one JS file, so there's nothing to configure or fetch. Just remember the PROMPT_VAR-only rule on this node and you'll get the JSON you expected.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| variable_aopt | PROMPT_VAR | — | |
| variable_bopt | PROMPT_VAR | — | |
| variable_copt | PROMPT_VAR | — | |
| variable_dopt | PROMPT_VAR | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| json_string | STRING | — |