ComfyUI Node

Subworkflow Output

Where your reusable workflow hands results back

By eniewold·Created 4 months ago·Updated 13 days ago· 13
Subworkflow Output
  • value
  • value
slot_nameoutput

Subworkflow Output (class SWF_SubworkflowOutput) is the exit sign on a reusable workflow. Drop one at the end of an inner workflow and it becomes an output slot on the outer Subworkflow node - the handle your outer graph uses to grab the result. It's the counterpart to Subworkflow Input, and like that node it's a boundary marker, not a processor: it passes whatever value it receives straight through, its type inferred from whatever connects to its input.

You'll typically place one after the final decode (the image out) and optionally others for anything downstream might want - the prompt used, the seed, an intermediate latent if you're chaining. Each one becomes a named output on the Subworkflow node, so a well-labeled pair of inputs and outputs turns an entire pipeline into a small, legible component.

What you set

  • value - the required input. Whatever this is (image, model, conditioning, latent), that's the type the outer slot will carry. It's mandatory - there's no optional-input version of an output.
  • slot_name - the label on the outer node, default output. Name it image, model, seed and the outer node becomes self-documenting.

Output: a single value output, wired onward if the workflow continues past it.

The passthrough quirk to know about

Subworkflow Output behaves as a passthrough when other nodes inside the same inner workflow consume its output - but only in standalone execution. When the workflow runs as an inner workflow, the value leaves through the outer Subworkflow node instead, and the output's own passthrough is suppressed. In plain terms: don't expect a wire continuing past the Subworkflow Output inside the inner workflow to reach you on the outside when it's called as a subworkflow - route whatever the outer node gives you instead. It's a documented behavior, but it reads like a bug the first time you hit it.

Also worth knowing: the inner workflow is loaded "as is," including seed values, and the node never saves anything back to the file. If your inner workflow randomizes a seed, that propagates through its outputs when you run with at execution set to keep loaded. And mismatched types get handled silently - if an outer link into a slot goes grey after selecting a workflow, the types didn't match and the link was severed.

Install is the same as the whole pack: ComfyUI Manager (search "Subworkflow (reuseable workflows)") or git clone https://github.com/eniewold/ComfyUI-Subworkflow.git into ComfyUI/custom_nodes, restart, hard-refresh. No extra dependencies, needs ComfyUI 0.18.x for the V3 node API. It's beta with a known-issues list (progress bars overshooting 100%, undetermined slot order), so give the graph a sanity check after your first load.

CategorySubworkflow

Inputs (2)

NameTypeDefaultDescription
valueCOMFY_MATCHTYPE_V3
slot_nameSTRINGoutput

Outputs (1)

NameTypeDescription
valueCOMFY_MATCHTYPE_V3