Nodes/Comfyui-JSON-Manager/Project Loader (Dynamic)
ComfyUI Node

Project Loader (Dynamic)

One JSON File, 32 Outputs, Zero Re-edits

By ethanfel·Created 8 months ago·Updated 5 months ago· 3
Project Loader (Dynamic)
    • total_sequences
    • output_0
    • output_1
    • output_2
    • output_3
    • output_4
    • output_5
    • output_6
    • output_7
    • output_8
    • output_9
    • output_10
    • output_11
    • output_12
    • output_13
    • output_14
    • output_15
    • output_16
    • output_17
    • output_18
    • output_19
    • output_20
    • output_21
    • output_22
    • output_23
    • output_24
    • output_25
    • output_26
    • output_27
    • output_28
    • output_29
    • output_30
    • output_31
    manager_urlhttp://localhost:8080
    project_name
    file_name
    sequence_number1
    refresh
    output_keys
    output_types

    Project Loader (Dynamic) is the headline node of Comfyui-JSON-Manager and the reason most people install the pack. Point it at a sequence in your project's JSON file and it turns every key in that record into its own output - prompt, negative, seed, camera, whatever you stored - without you ever adding a widget or editing the node's Python. It's the node that makes "the JSON is the workflow config" actually practical.

    Why you'd reach for it

    ComfyUI workflows are already JSON under the hood, but your content - the prompts and settings for a batch of shots - usually isn't. This pack's answer is: keep the content as JSON in the author's manager, and let this node bridge the two. If you're running I2V or VACE batches where every shot has its own prompt, seed, and settings, Project Loader (Dynamic) is the least-effort way in. Change the JSON, hit refresh, run. The graph doesn't change when your data structure changes - that's the whole pitch, and it mostly holds.

    How it works

    The clever part is a frontend/backend split. When you click refresh (or change the project/file/sequence), the browser-side extension calls a proxy endpoint on the ComfyUI server (/json_manager/get_project_keys), which asks the manager for the sequence's keys and their types. The extension then rewrites the node's outputs on the fly - reusing existing slots so already-connected wires stay put, and disconnecting only the keys that disappeared. It stores the discovered key list as JSON strings in two hidden widgets, output_keys and output_types. On execution, the Python side fetches the actual values from the manager's .../data?seq= endpoint, matches them to those key names, and coerces types as declared.

    You get 32 * outputs (output_0 through output_31), each connectable to anything, plus one special output: total_sequences (INT), which tells you how many sequences the file holds - wire that to a loop and you've got a batch runner.

    Inputs that matter

    • manager_url, project_name, file_name, sequence_number - where to read from. The frontend turns project/file into dropdowns.
    • refresh (off/on) - triggers the key re-discovery. There's also a debounced auto-refresh when you change the project, file, or sequence.
    • output_keys, output_types - hidden, but they're the real config: the JSON arrays of discovered keys and their declared types. You can set them by hand if you know what you want, but normally the frontend fills them.

    How to install

    Same as the rest of the pack:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/ethanfel/Comfyui-JSON-Manager ComfyUI-JSON-Manager
    

    Restart ComfyUI, or install "ComfyUI JSON Manager" from ComfyUI Manager. No models, no requirements.txt on the node side - pure standard library plus aiohttp from ComfyUI. The one real dependency is external: the NiceGUI manager (itself needing nicegui, graphviz, requests) must be running and reachable, because the proxy fetches keys from it. Worth knowing that the README's node table still describes an older generation of loader nodes that no longer ship - the current code exposes the five project nodes, and this is the dynamic one.

    Common issues

    The most common failure is an empty node: outputs that only ever produce empty strings. That happens when output_keys never got populated - usually because the refresh failed. The extension needs the manager URL reachable from the ComfyUI server (the proxy lives there, so localhost on the ComfyUI side must actually resolve to the manager). If the manager is down you'll get a RuntimeError - "Failed to fetch project keys" - rather than a silent empty, which at least points you at the right problem.

    Second: remember the data and keys come from one specific sequence. Change sequence_number and the outputs should refresh to that record's keys - but re-run the refresh if the shape differs. And if you add a key to the JSON, it won't appear until you refresh; delete one and its wires get pulled. It's a safe reconnection model, but it assumes you clicked refresh.

    For anything more than a single value, this beats stacking ProjectKey nodes. For one value, ProjectKey is lighter. Pick accordingly.

    CategoryJSON Manager/project

    Inputs (7)

    NameTypeDefaultDescription
    manager_urlSTRINGhttp://localhost:8080
    project_nameSTRING
    file_nameSTRING
    sequence_numberINT11–9999
    refreshCOMBO2 options: off, on
    output_keysoptSTRING
    output_typesoptSTRING

    Outputs (33)

    NameTypeDescription
    total_sequencesINT
    output_0*
    output_1*
    output_2*
    output_3*
    output_4*
    output_5*
    output_6*
    output_7*
    output_8*
    output_9*
    output_10*
    output_11*
    output_12*
    output_13*
    output_14*
    output_15*
    output_16*
    output_17*
    output_18*
    output_19*
    output_20*
    output_21*
    output_22*
    output_23*
    output_24*
    output_25*
    output_26*
    output_27*
    output_28*
    output_29*
    output_30*
    output_31*