ComfyUI Node

Smart Bus In

A data bus for ComfyUI that only updates the slots you actually wire

By slvslvslv·Created 2 years ago·Updated 8 days ago· 3
Smart Bus In
  • bus
  • param_1
  • param_2
  • param_3
  • param_4
  • param_5
  • param_6
  • param_7
  • param_8
  • param_9
  • param_10
  • bus

Big workflows are a tangle of wires, and the standard fix is a "bus" - bundle a dozen values into one connection so you don't have to drag ten cables across the canvas. That's the pattern rgthree's Context made famous. Smart Bus In is this pack's take, and it adds a genuinely smart twist: it only overwrites the slots you've wired, and leaves everything else untouched.

That's a bigger deal than it sounds. A normal bus merge node takes a bus plus values and clobbers all its slots every time. Smart Bus In inspects the actual workflow to see which of its ten param_* inputs have a wire attached. Wired slot → that value replaces the incoming bus value. Unwired slot → the incoming bus value sails through untouched. You get a surgical update: change one parameter deep in a pipeline without re-declaring the other nine.

How it works

Under the hood a SMART_BUS is just a dict with values and labels arrays (ten slots here; there's a 5-slot sibling for lighter buses). The node needs the workflow JSON at execution time - it reads PROMPT and EXTRA_PNGINFO to check whether each param_i is genuinely linked - which is why it behaves this way in ComfyUI's own UI. It also carries labels: name the slots in the node's properties and those labels travel with the bus, so a Smart Bus Out downstream shows you what each value is instead of "any 1".

The one input worth knowing besides the ten param_* slots is bus - the incoming bus to merge into. Feed the same bus into several In nodes and each one patches its own slice of it.

Using it

The intended flow is In → Bus Out (or In → In → Out, since a bus chains). Typical pattern:

  • One Smart Bus Out fans values out to where they're consumed (seeds, widths, CFG, a filename).
  • A Smart Bus In sits in the middle of that chain, wired to whichever value you want to override for a particular run.

So instead of swapping wires to test a different CFG, you wire a KSampler's CFG into a bus slot and change one number. Keep the rest unconnected and they ride along unchanged.

Installing it

It's part of SmartHelperNodes; the whole pack installs at once:

cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartHelperNodes

Restart ComfyUI (or use ComfyUI Manager and search "SmartHelperNodes"). No pip dependencies, no downloads.

Where it can bite you

The wired-vs-unwired logic depends on the workflow data being present when the node runs. Execute it via the API without the workflow payload and the "keep the incoming slot" behavior can fall back to overwriting unwired slots with None - the node loses its reference point. In the normal UI you won't hit this, but if you're driving ComfyUI from an external script, keep the full workflow JSON in your queue requests. And remember the slot labels are cosmetic until you give them names - unlabeled buses are how you end up with a mystery value in position seven.

CategorySmartHelperNodes/Bus

Inputs (11)

NameTypeDefaultDescription
busoptSMART_BUS
param_1opt*
param_2opt*
param_3opt*
param_4opt*
param_5opt*
param_6opt*
param_7opt*
param_8opt*
param_9opt*
param_10opt*

Outputs (1)

NameTypeDescription
busSMART_BUS