ComfyUI Node

Image Bus

Carry the image, mask, and VAE in one hand

By rhdunn·Created 2 years ago·Updated 2 years ago· 2
Image Bus
  • image
  • mask
  • vae
  • image
  • mask
  • vae

img2img and inpainting workflows have a wiring problem: your source image has to reach several places, and it usually travels with friends. Load Image hands you an image and a mask (the mask comes from the image's alpha channel). VAEEncode needs the image and a VAE. SetLatentNoiseMask needs the latent and the mask. That's three values - image, mask, vae - shuffling around a crowded part of the graph.

The Image Bus bundles all three into one node. Image in, mask in, optional VAE in; all three come out the far side as plain typed ports you can fan out to exactly where each is needed. It's a pass-through junction, not a converter - nothing is resized, re-encoded, or otherwise touched along the way. It's one of the eleven "bus" nodes in the comfyui-bus-plugin pack, the author's answer to ComfyUI's lack of generic connections: since you can't route an arbitrary bundle down one wire, you get a small node per combination of data, and this is the image+mask+VAE combination.

The inputs and outputs

  • image (IMAGE) - required. Your source image, usually straight from Load Image.
  • mask (MASK) - required. The mask for the region you want to change.
  • vae (VAE) - optional. The VAE you'll need for encoding and decoding.

The three outputs - image, mask, vae - are the same values, ready to wire into VAEEncode, SetLatentNoiseMask, or VAEDecode. If you don't need the VAE, just leave it out; the node handles an unconnected optional gracefully and returns the other two.

A typical run

Load your image, drop an Image Bus right after it, and place the bus near your inpaint setup. From there: image and vae into VAEEncode, mask on to SetLatentNoiseMask after encoding, and you're sampling a masked img2img without three long wires crossing the whole canvas. It's a small organization win, but in a busy inpaint graph it's the difference between a workflow you can read and a bowl of spaghetti.

Installing it

All the bus nodes share one pack. In ComfyUI Manager, search "comfyui-bus-plugin", Install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/rhdunn/comfyui-bus-plugin

then restart. Pure Python, zero dependencies, no models to download - the whole install is cloning and restarting.

Common issues

The one real gotcha: the mask input is required, and not every image source gives you one. Load Image provides a mask only when the image has an alpha channel; for a plain photo you'll need to build a mask first (invert a solid image, segment the subject, whatever your workflow already does). If the node errors with a missing mask, that's the cause - there's no automatic mask generation here, only routing. And as with every bus in this pack, each input still needs its own connection; the node organizes the fan-out, it doesn't invent values.

CategoryComfyBus

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
maskMASK
vaeoptVAE

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
vaeVAE