Pyobjects/Global Var Load
Pull a value back out of the JSON file Global Var Save wrote
- *
The other half of GlobalVarSaveNode. That node writes a value out to a JSON file so it survives a ComfyUI restart; this one reads it back in. Between the two, you get a genuinely persistent key-value store - the kind of thing that lets a value (a running counter, a cached expensive result, a config you set once) outlive not just the current run but the current ComfyUI session entirely.
The obvious use case is anything that needs to remember state across restarts, which the rest of the GlobalVar* family explicitly can't do - GlobalVarGetNode only ever sees what's in the current process's memory. If you're building something like a batch job that needs to resume where it left off, or a counter that should keep climbing every time you launch ComfyUI over the course of a week, this is the node that makes that possible.
How it works
You give it key and filepath, it opens that JSON file and pulls out the value stored under that key, returning it on the wildcard * output. allow_missing decides what happens if the file or the key inside it doesn't exist yet - set it true and you can safely call this on a first run before anything's ever been saved, without the workflow erroring out; leave it false if you'd rather know loudly that the expected data isn't there.
Inputs and outputs
- key (default
my_key) - which value to pull out of the file. Must match whatGlobalVarSaveNodeused when it wrote it. - filepath (default
my_global_var.json) - the JSON file to read. Needs to match the pathGlobalVarSaveNodeactually wrote to - relative paths resolve from wherever the ComfyUI process runs, so an absolute path is the safer bet if you're not sure. - allow_missing (default
false) -truetolerates a missing file or key instead of erroring; useful for a "first run ever" case.
Output is the loaded value on the wildcard * slot.
Installing ComfyUI-LogicUtils
ComfyUI Manager: Install Custom Nodes → search "ComfyUI-LogicUtils" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI. No dependencies.
Worth knowing
If this comes back empty or errors, the most common cause is a filepath mismatch against whatever GlobalVarSaveNode actually wrote to - relative paths are resolved from the ComfyUI process's working directory, which isn't always where you'd guess. Set allow_missing to true while you're first wiring this up, so a not-yet-created file doesn't kill your test runs. This is part of aria1th's (AngelBottomless's) LogicUtils pack, which by its own README's admission has essentially no documentation, and public commits stopped in January 2026 - so this behavior is inferred from the node's inputs rather than confirmed against a written spec; verify the round-trip with JsonDumpAnyStructureNode once before relying on it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | my_key | — |
| filepath | STRING | my_global_var.json | — |
| allow_missingopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |