Nodes/ComfyUI-JNodes/Get Parameter From List
ComfyUI Node

Get Parameter From List

Drive any node from tags inside your prompt

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Get Parameter From List
  • parameter_default
  • *
parameter_list<params:my_string_variable:string> <params:my_number_variable: 0.5>
parsing_keyparams
parameter_name
return_type
add_to_png_infotrue

This is the heart of JNodes' cleverest idea: put settings inside your prompt text and pull them back out as real values. Instead of reaching over to the latent node to change your height, you write <params:image_size_y:512> in your prompt, and this node reads that tag and outputs 512 as an actual integer you can wire into the latent. Change the number in your prompt, and the whole graph follows. It turns a block of text into a little control panel.

Why bother? Because it lets each prompt carry its own settings. You normally generate at 512×768, but for one XL test you want 1024×1024 - add <params:image_size_x:1024> <params:image_size_y:1024> to that prompt and leave everything else alone. Model names, CFG, seeds, booleans, all of it can live in the text. If you keep a library of prompts, each one remembers how it wants to be run. That's the payoff, and it's a genuinely different way to work than the usual pile of primitive nodes.

How it works

You add a <params:name:value> tag somewhere in a text field, then drop a Get Parameter From List node and tell it which name to look for. It scans the text, finds the tag, and returns the value converted to its natural type - a number comes out as a number, true comes out as a boolean. The output pin is a wildcard type, so it'll connect to almost anything. The catch is the value has to actually be valid for where it's going: feed a number pin the word "omega" and you get a graph error, so keep the value parseable.

One setup detail from the README worth knowing up front: the parameter_list field starts as a widget with hint text. Right-click the node and convert parameter_list to an input, then plug your prompt into it. That's the pin that receives the text to scan.

The inputs and outputs that matter

  • parameter_list - the text to search (convert it to an input and feed your prompt in).
  • parameter_name - the name you're pulling, e.g. image_size_y.
  • parsing_key - the tag prefix to match; defaults to params (so it looks for <params:...>). Leave it unless you deliberately use a different key.
  • return_type - auto converts to the natural type; switch to string when a downstream node wants text and you don't want 5.0 turning into a number.
  • add_to_png_info - on by default, stamps the name/value into your image metadata. Turn it off if you don't want parameters cluttering your PNG info.

The optional parameter_default (any type) is the fallback used when the tag isn't found - wire a random-seed source here and a prompt without a seed tag gets a random one. The output is a single wildcard pin carrying the resolved value.

One gotcha the README flags: this doesn't strip the tags out of your prompt. Run your text through the pack's RemoveParseableDataForInference node before encoding, or the literal <params:...> text ends up in your conditioning.

How to install it

ComfyUI Manager, search JNodes, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/JaredTherriault/ComfyUI-JNodes
pip install -r ComfyUI-JNodes/requirements.txt

No models to download for this one.

Common issues & troubleshooting

Graph error on run. The value in your tag doesn't match the pin it's going into - a non-numeric string headed for a number input. Fix the value, or set return_type to string if that's really what the target wants.

The <params:...> text shows up in your image. You forgot to strip it before encoding. Route the prompt through RemoveParseableDataForInference first.

It always uses the default. The parameter_name or parsing_key doesn't match what's in the text - they're case- and spelling-sensitive. Copy the name straight from your tag.

Lots of parameters feeling slow? Each Get Parameter From List node re-scans the whole text. If you're pulling many values, the pack's table-based approach (build a table once, read from it) is meaningfully faster - see Get Parameter From Table.

Categoryparameter_list

Inputs (6)

NameTypeDefaultDescription
parameter_listSTRING<params:my_string_variable:string> <params:my_number_variable: 0.5>
parsing_keySTRINGparams
parameter_nameSTRING
return_typeCOMBO2 options: auto, string
add_to_png_infoBOOLEANtrue
parameter_defaultopt*

Outputs (1)

NameTypeDescription
**