Nodes/ComfyUI-Sub-Nodes/VIV_Subgraph_Inputs
ComfyUI Node

VIV_Subgraph_Inputs

The input door of a ComfyUI subgraph

By vivax3794·Created 2 years ago·Updated 2 years ago· 161
VIV_Subgraph_Inputs

      If VIV_Subgraph is the front door of a reusable workflow, VIV_Subgraph_Inputs is the mailbox. This is the node you drop inside a sub-workflow to declare what the outside world is allowed to plug in. The whole pack - vivax3794's ComfyUI-Sub-Nodes - is built around this idea of packaging a workflow into a callable component, and this marker node is how you define its public API.

      How it works

      Everything about this node is dynamic, which is why the info_schema lists nothing at all - no required inputs, no declared outputs. The magic lives in the frontend extension. When you place it in a subgraph, it starts with a single * output. Drag that output into another node's input slot and the node "learns" the type, relabels itself, and grows another * output so you can keep adding inputs. Drag from a checkpoint loader's input, for instance, and the caller's VIV_Subgraph node will show a matching input of that same type.

      Two design details worth knowing. First, in newer versions of the pack, supported inputs also get widgets on the input node where you set the default value - so the checkpoint dropdown on your caller node inherits the defaults of whatever the input is wired to inside the subgraph. Combos (like checkpoint pickers) work this way, but only when the input node connects directly to a node that has the dropdown. Second, inputs can carry arbitrary objects: images, latents, models, strings - "ANY object can be passed between subgraphs," as the README puts it.

      What you actually set

      • Name/label: every input gets an auto-generated name like MODEL.CheckpointLoaderSimple.7. You can rename nodes and set labels in the editor, which is what the person calling your subgraph will actually see.
      • Default widget: for supported types, set the fallback value right on the input node.

      There's no VIV_Subgraph_Inputs output in the traditional sense - the "output" is the slot you create by wiring it, and at queue time the subgraph runner replaces that slot with the value passed in by the caller.

      Installing it

      It ships with ComfyUI-Sub-Nodes. Through ComfyUI Manager, search for ComfyUI-Sub-Nodes and install, then restart. Or clone it:

      cd ComfyUI/custom_nodes
      git clone https://github.com/vivax3794/ComfyUI-Sub-Nodes
      

      The only dependency is rich; no models, no downloads. Remember to save the sub-workflow with the normal Save button into the subnodes/ folder the pack creates in your ComfyUI root.

      Common issues

      Only one input node per subgraph. Try to add a second and the extension removes it and pops a dialog - if you want to reset, delete the original and start again. That's enforced on purpose, but it's a genuine workflow trap when you're reorganizing.

      The other recurring complaint from users is that after you load a saved subgraph, widgets sometimes need to be converted back to inputs again. It's a known quirk of this pack (which is now archived and unmaintained), and it's the main reason you'd prefer ComfyUI's native subgraph feature for new projects. But if you're reading an existing workflow that uses this, now you know what the node is for: it's the plug, and the caller is the socket.

      Categorysub_graph

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs