Nodes/MBM's Music Visualizer/Image Concatenator
ComfyUI Node

Image Concatenator

Batching your charts so you only save once

By Sorcerio·Created 2 years ago·Updated 2 years ago· 32
Image Concatenator
  • image_1
  • image_2
  • IMAGES

The name oversells this one. "Concatenator" sounds like it should stitch images side by side into one big picture, and it doesn't - which is the first thing to get straight. What the Image Concatenator does is take one required image tensor (image_1) and one optional one (image_2) and torch.cat() them along the batch dimension. The images stay fully distinct; you get a single tensor holding both, exactly the way ComfyUI's own batching works under the hood. The README is explicit about this: images are not visually combined.

Why you'd want that in this pack. Every meaningful node in MBM's Music Visualizer emits CHARTS - the Audio Feature Calculator produces tempo/spectrogram/chroma charts, the Interpolator produces prompt-distribution charts, the Renderer produces a latent-means chart. If you want all of those in one place so a single SaveImage writes them out, you chain Image Concatenators. That's precisely what the pack's example workflow does: it runs two of them to gather the calculator's and interpolator's charts into one tensor before saving. It's the "collect the debug panels" node, and it does that one job cleanly.

The only gotcha worth remembering is the same one that bites every torch.cat in ComfyUI: the tensors have to match in shape except along the batch axis. Feed it a 20×4-pixel aspect chart and a square image and it will throw a runtime error, not politely crop. Within this pack you're concatenating charts that are all the same dimensions, so it mostly just works - but if you ever reuse it on arbitrary images, keep the shape rule in mind.

Inputs and outputs are minimal: image_1 (required), image_2 (optional - leave it empty and the node just passes image_1 through), and a single IMAGES output. That's the whole surface area. There are no settings, no modes, nothing to tune. If image_2 is missing, it's a pass-through; if it's present, you get a batch of two. Want to batch three or four? Chain two or three of these - they're cheap and the graph stays legible.

It lives in the MBMnodes/Images submenu, installs with the rest of the pack (cd ComfyUI/custom_nodes && git clone https://github.com/Sorcerio/MBM-Music-Visualizer.git MBM_MusicVisualizer, then pip install -r requirements.txt in your ComfyUI venv - see the pack's README for the full walkthrough). This is a genuinely thin utility node, and that's fine: not every node in a pack needs to be clever. When you want your charts collected into one savable tensor, it's exactly the tool, and once you've used it once you never have to think about it again.

CategoryMBMnodes/Images

Inputs (2)

NameTypeDefaultDescription
image_1IMAGE
image_2optIMAGE

Outputs (1)

NameTypeDescription
IMAGESIMAGE