Project Key
Pull Exactly One Value Out of Your JSON Project
- value
ProjectKey is the single-value relay of the Comfyui-JSON-Manager pack. Where its bigger sibling ProjectLoaderDynamic dumps a whole file of keys into your graph, this node grabs one key from one sequence and hands it over. Prompt, seed, LoRA path, a flag - you point it at a key name and you get the value, typed correctly.
Why you'd reach for it
Say you're running an I2V or VACE batch where every sequence in your JSON file carries its own prompt, negative prompt, seed, and file paths. You don't want to hand-wire each one from a giant loader when you only need a couple. ProjectKey keeps the graph readable: one node per value you actually use, each wired straight to where it goes. It's also the node to pick when you want live values - the author made it re-fetch the manager on every execution, so edits made in the dashboard show up on the next run without you touching the graph.
How it works
Mechanically it's a small REST client. It hits the manager's GET /api/projects/{project}/files/{file}/data?seq={sequence} endpoint, reads the value at key_name, and coerces it according to key_type - INT, FLOAT, or STRING. It's deliberately forgiving: if the manager is unreachable or the key is missing, it returns a safe default (0, 0.0, or "") instead of crashing your workflow. A * output type means the value can plug into anything.
The source_label input is the wiring trick. When you connect a ProjectKey to a ProjectSource node, the frontend recognizes the link, syncs the manager URL / project / file / sequence settings over from the source, and refreshes the key dropdown from the actual JSON. So you set the connection once on ProjectSource and this node just tracks it.
Inputs and outputs
The three required inputs are what you actually touch:
source_label- identifies which ProjectSource this node is synced to.key_name- the JSON key to read (the frontend gives you a dropdown of real keys after a refresh).key_type-STRING,INT, orFLOAT. Set it to what the value is and what you're feeding downstream.
Output is a single value of type * - plug it into prompt slots, seed inputs, whatever.
How to install
It's part of Comfyui-JSON-Manager:
cd ComfyUI/custom_nodes/
git clone https://github.com/ethanfel/Comfyui-JSON-Manager ComfyUI-JSON-Manager
Restart ComfyUI (or install via ComfyUI Manager by searching "ComfyUI JSON Manager"). No models to download, no extra Python deps for the node itself. Remember the rest of the deal: this node is only useful if the companion NiceGUI manager is actually running at manager_url - the project nodes are the ComfyUI half of a two-part system.
Common issues
Two gotchas worth knowing. First, the forgiving defaults cut both ways: if the manager is down, this node quietly returns 0/0.0/"" rather than erroring, so a workflow can "succeed" with an empty prompt. If outputs look wrong, suspect the connection before the wiring. Second, key_type matters - if the JSON stores a number but you declare STRING, you'll get the string form, and downstream nodes that want an INT may complain or behave oddly.
Also keep the sequence number in mind. Every sequence in the file is a separate record, and this node reads one at a time - the sequence index is part of what it fetches. For batch runs you'll want to drive sequence_number from a loop, or lean on the dynamic loader instead when you're grabbing a whole row.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| source_label | STRING | — | |
| key_name | STRING | — | |
| key_type | STRING | STRING | — |
| manager_urlopt | STRING | http://localhost:8080 | — |
| project_nameopt | STRING | — | |
| file_nameopt | STRING | — | |
| sequence_numberopt | INT | 11–9999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |