ComfyUI Node

Get Runtime String

Read back that string you stashed, in the part of the graph that needs it

By kinorax·Created 4 months ago·Updated 25 days ago· 2
Get Runtime String
  • after
  • string
key

IPT-GetRuntimeString is the reading half of the runtime-string pair from kinorax/ComfyUI-Info-Prompt-Toolkit: where IPT-SetRuntimeString stores a value by key in ComfyUI's process memory, this node pulls it back out. They're meant to work together - stash a filename, tag, or path in one corner of the workflow, and read it wherever it's actually needed, no wire stretched across the canvas.

The distinctive bit is what happens with the value once it's out. The output is a wildcard * type described as "compatible with combo-style path inputs." That's a quiet superpower: combo/dropdown inputs in ComfyUI are normally hardcoded widget lists you can't feed from the graph, but a * output can plug into them, which means a path you computed mid-run can be handed to a node that looks like it only accepts a fixed dropdown. That's the whole point of the pair in production workflows - dynamic values into normally-static inputs.

How it works

You provide a key, and the node looks it up in the same process-wide dictionary that SetRuntimeString writes to, returning the stored string. The Get node is marked non-idempotent, so it re-reads the store on every execution instead of being cached by the engine - important, because the stored value can change between runs. If the key was never written, it raises a "runtime string not found" error rather than silently returning empty, which is a deliberate "you wired this wrong" signal.

The clever input is after. It accepts any value, ignores it completely, and exists purely for execution ordering: you wire the Set node's output into after so the engine knows the Get must run after the Set has stored the value. Without that connection, you're betting on execution order and you'll eventually lose.

The inputs that matter

  • key - the storage key to load. Required, exact-match with whatever the Set side used.
  • after - optional, any type, value ignored. Wire this from IPT-SetRuntimeString's output to guarantee ordering.

One output: string, the stored value.

Installing it

Part of the IPT pack, installed once:

cd ComfyUI/custom_nodes
git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
cd comfyui-info-prompt-toolkit
pip install -r requirements.txt

Restart ComfyUI (or use ComfyUI Manager, "ComfyUI-Info-Prompt-Toolkit"). No models, no extra deps.

Where people get burned

The failure modes are the mirror of the Set side. The store is memory-only, so a restart empties it - if the Get runs before anything has written its key, it errors loudly. Keys are exact and case-sensitive, so a space or a typo in one side and the other side can't find it. And the after ordering input is not optional in spirit: skip it and you'll get intermittent "not found" errors that look like flakiness but are just race conditions. Treat the pair as one unit, wire Set → after → Get, and it's rock solid.

CategoryInfo-Prompt-Toolkit/Utility

Inputs (2)

NameTypeDefaultDescription
keySTRINGProcess-wide storage key to load
afteropt*Optional upstream dependency; its value is ignored

Outputs (1)

NameTypeDescription
string*Stored string; compatible with combo-style path inputs