RunPod Variables Builder
The little node that builds the vars JSON for you
- STRING
Every pack has a node that exists to make another node in the pack pleasant, and this is it. RunPodVariablesBuilderNode is a utility that produces the JSON string you feed into the vars input of RunPodImageNodeComfy - the workflow runner. Instead of hand-writing JSON, you fill in a few optional fields and it hands you a valid object.
The workflow runner substitutes $name placeholders in your exported workflow using a JSON variables dict. This node builds that dict. That's the whole job, and it does it without complaint.
How it works
It's pure local JSON assembly - no API calls, no polling, no key required. Every optional input you connect gets folded into a dict; the node serializes it and returns the JSON string. One wrinkle: the other field is a JSON snippet that gets merged in, so power users can add arbitrary keys beyond the fixed ones while still using the fields for the common cases.
The inputs that matter
- seed - an INT you want the remote workflow to use.
- width / height - INTs for the remote resolution.
- prompt - a STRING for the remote prompt.
- other - a JSON object (default
{}) merged into the result. This is the escape hatch: anything the fixed fields don't cover goes here.
Only connected inputs make it into the output, so a node with just seed and prompt wired returns {"seed": 42, "prompt": "..."}. That's the design - wire what you need, ignore the rest.
What comes out
One output (STRING) - the JSON object string. Wire it straight into RunPodImageNodeComfy's vars input.
Installing it
It ships with the rest of tcarwash/ComfyUI_RunpodNodes. ComfyUI Manager: search ComfyUI_RunpodNodes, or
cd ComfyUI/custom_nodes
git clone https://github.com/tcarwash/ComfyUI_RunpodNodes
then restart. No extra dependencies, no API key needed for this node - it never touches the network.
Gotchas
othermust be valid JSON - a typo throwsInvalid JSON in 'other' fieldrather than silently producing a broken dict. That's a feature.- The output is a string, not a dict - it's built for the runner's
varstext input, so don't wire it where a real dict is expected. - It only sends what's connected - if a variable isn't connected, it isn't in the JSON, and the remote workflow's
$placeholderfor it passes through unchanged. Connect the fields your workflow actually references.
The honest review: it's a convenience wrapper around json.dumps, and you could skip it and write the JSON by hand. But once you're pasting workflows into the runner, this node saves you the "did I escape that quote right" loop - and it makes the runner's $var mechanism something you can actually drive from the canvas.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| seedopt | INT | — | |
| widthopt | INT | — | |
| heightopt | INT | — | |
| promptopt | STRING | — | |
| otheropt | STRING | {} | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |