RB Command Input Bundle
Wiring the RB Command Input Bundle
- input_0
- bundle
RB Command gives you 20 input slots. Twenty is a lot, right up until you want to hand one ffmpeg call a folder of frames, or hand one script three reference images. Then you're drawing twenty noodles into one node, and the graph is unreadable. The RB Command Input Bundle packs a pile of inputs into one wire, and inside the command each item is still individually addressable.
What it is
It's a plumbing node - the layer of ComfyUI that touches no pixels but decides whether your workflow is usable. One optional input slot, one output of type RB_COMMAND_INPUT_BUNDLE. Wire that output into any single input slot of RB Command, and that one slot now stands for everything you bundled.
Be clear about its narrowness, though. This is not a general container you sprinkle around the graph. The type is private to this pack - nothing else produces or consumes it. If you were hoping this is the same idea as rgthree's Context or an Efficiency-Nodes pipe, it isn't: those carry a bundle of connections between many nodes, this carries a bundle of values into one node's argument list. Different job, and the usual lock-in caveat applies. Adopt a pack-private type and that corner of your workflow is married to the pack.
How it works
The node declares exactly one input, input_0, of type * - the wildcard that ComfyUI lets accept anything. Connecting it triggers input_1, and so on; the frontend grows slots as you plug things in, capped at 20. That's the whole UI.
Under the hood it's simpler than it looks. The node collects every kwarg matching input_<n>, sorts them by slot number, skips the ones you left unconnected, and returns them as a plain Python list. That list is the bundle. Which explains the one error you'll actually see: if an item is itself a list - i.e. you wired another bundle in - it refuses with Bundle nodes cannot receive another bundle's output. Connect each bundle to its own RB Command slot instead.
On the RB Command side, each bundled item gets classified and converted before your command ever runs: an IMAGE tensor becomes a temp PNG, an audio dict a temp WAV, a video a temp MP4, and strings/ints/floats are just stringified.
The syntax you'll actually use
A bundle sitting in slot 0 gives you four ways to reference it:
{input0}- all items, space-joined (auto-quoted, so it drops straight into a bash array){input0_0},{input0_1}, … - one item by index, in slot order{input0_count}- how many items are in it$INPUT_0_COUNT/$INPUT_0_1etc. - the same values as environment variables
for i in $(seq 0 $((INPUT_0_COUNT - 1))); do
eval "src=\$INPUT_0_$i"
convert "$src" -resize 512x512 "${src%.*}_thumb.png"
done
That's the pattern worth internalising: bundle a bunch of images, loop once, get thumbnails out of a single node instead of a dozen. It's also the honest case for the pack - reach for ImageMagick or ffmpeg rather than building a deterministic, millisecond operation out of a diffusion pass.
Installing it
It's one pack, so this is the same for all three nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/itribs/comfyui-rb-command
pip install -r requirements.txt
Restart ComfyUI afterwards. Or search "RB Command" in ComfyUI Manager and let it do both. The requirements are only numpy, Pillow and scipy - you already have the first two, so scipy (used for audio) is the only thing that might genuinely install. No model downloads, no torch pin, so this one can't eat your environment the way the heavier packs do.
One platform note: the command node's default shell is /bin/bash. On Windows you'll need to point executable at something that exists there, like cmd.exe or a Git Bash bash.exe.
Where people get burned
Don't bundle things that aren't media or scalars. Masks, latents, models and conditioning don't resolve to a path - you'll get contains unresolvable item, or, for a 2D mask, Unsupported tensor dimensions: 2 (expected 3D HWC). Images in, paths out.
A batch is not a bundle. If you wire an IMAGE that's a four-image batch, only the first frame is written out. Bundle four separate image outputs instead.
The temp files are deleted after the run. Your images are written to temp PNGs, handed to the command, then cleaned up in a finally. A command that writes the path into some file for later is writing a path to nothing.
Order comes from slot index, not from when you connected them. Renumbering means re-checking your _0/_1 references.
The * slots hide type errors. ComfyUI won't stop you connecting a bundle into a plain input; that's the same trade-off the "please stop using Anything Anywhere" backlash was about - cheap convenience, harder debugging.
Last thing, and it's not a bug: this pack runs shell commands with your user's permissions. Every custom node technically can - one popular hardening guide calls an unhardened ComfyUI "one giant backdoor we voluntarily install and run" - but this one makes it the explicit feature. Fine on your own machine. Before you queue a workflow from a stranger, know its nodes can now run anything your account can.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input_0opt | * | Dynamic input slot, connect any type. Connecting triggers more slots up to 20 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bundle | RB_COMMAND_INPUT_BUNDLE | — |