VIV_Subgraph
The node that turns a whole saved workflow into one reusable block
You know the problem: your workflow works, but it's a wall of nodes and nobody (including you, in a month) can read it. rgthree gives you reroutes and context bundles to tame the graph; this node goes further. It's the centerpiece of vivax3794's ComfyUI-Sub-Nodes pack, and it takes an entire workflow you saved as a subgraph and collapses it into a single callable node with its own inputs and outputs. Wire it like any other node, and the whole thing - checkpoint loader, samplers, whatever - runs inside it.
How it works
The author posted this to r/comfyui in mid-2024 ("Was bored so made some nodes") and it landed before ComfyUI had its own subgraph support, which is why the internals feel like a magic trick. When you queue, VIV_Subgraph loads the sub-workflow's JSON, validates it, and then does node expansion: it splices every node inside the sub-workflow into your main graph at execution time, replacing the VIV_Subgraph_Inputs node's outputs with the values you plugged in. ComfyUI's newer frontends have their own subgraph feature now, but this was the community pathfinder.
That mechanism matters for one thing people constantly ask: no, it does not save VRAM. Because the sub-workflow is expanded into the same graph, every model still loads into the same execution and the same VRAM - a community thread asking exactly that got the blunt "Viv is great but it will not help with vram." If you want sequential, compartmentalized memory, this isn't the tool.
The node also caches smartly: it hashes the subgraph file (and any subgraphs inside it, recursively), so it only re-executes when the saved file actually changes, not on every queue.
The inputs and outputs that matter
The info_schema shows just one input, workflow - a dropdown listing every .json file in your subnodes/ folder (there's a Refresh button if a new one doesn't show up). Everything else is dynamic: pick a subgraph and the node fetches its declared inputs and outputs from the backend and rebuilds its own slots and widgets to match, snapping to a decent size. The outputs correspond one-to-one with whatever is connected to the VIV_Subgraph_Outputs node inside the sub-workflow, and any type of object can flow through - images, latents, models, you name it.
Progress bars from inside the subgraph render on the node, which is a nice touch. One honest downside: image previews from inside it do not show - you only get the final outputs.
Installing it
Through ComfyUI Manager, search for ComfyUI-Sub-Nodes and install, then restart. Or, from the CLI:
cd ComfyUI/custom_nodes
git clone https://github.com/vivax3794/ComfyUI-Sub-Nodes
Restart ComfyUI. The only dependency is rich (for colored console output), so there's nothing heavy and no model files to download. You do need a subnodes/ folder in your ComfyUI root (next to custom_nodes), which the pack creates for you on first launch.
Common issues
The big one is self-inflicted: save subgraphs with the normal Save button, not the API-format export. The pack injects an api_prompt key into the saved JSON to make execution work; without it you'll get "full workflow export without injected api_prompt key" and the node refuses to load it. Re-export the workflow and it's fine.
Also keep expectations in check: this pack is archived - the author moved on from ComfyUI, the README says the JS side is a pile of hacks to work around ComfyUI quirks, and it invites someone to take over. On modern versions you may hit the old "node loads with a ton of star outputs" flash or widgets that need re-converting to inputs. It still runs for plenty of people, but treat it as a pathfinder, not a foundation - if you're starting fresh, ComfyUI's native subgraph support is the safer bet.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| workflow | COMBO | 0 options: |
Outputs (0)
No outputs