Nodes/comfyui-tensorop/ChannelSelector
ComfyUI Node

ChannelSelector

The node that's really just batch indexing

By un-seen·Created 2 years ago·Updated 2 years ago· 46
ChannelSelector
  • image
  • IMAGE
channel0

The name says "channel," and if you're picturing red, green, and blue, stop right there. ChannelSelector does not split an image into color channels - it pulls one image out of a batch by index. Under the hood it's literally image[channel].unsqueeze(0) wearing a node costume. It's one of those tiny utilities you don't miss until a node hands you a stack of images and you need just one of them.

What it does

Give it an image (a batch, shaped B×H×W×C) and an integer channel - a slider from 0 to 100, default 0. It returns the single image at that position in the batch, as its own one-item batch. That's the whole thing. No model, no math to speak of, nothing to tune.

Where you'll actually use it

  • When a node returns a batch and a downstream node only wants one image. Several nodes in this pack return stacked results - FalDiffusion concatenates everything the API sends back.
  • Splitting multi-image generations so each variant can be processed separately.
  • Grabbing one specific frame out of a small batch for a quick look.

If what you wanted was to separate an RGB image into red/green/blue planes, this is not that node, and this pack has no node that does it. If you want the last item in a batch, you'll have to compute the index - there's no negative-index magic here, no "-1 means last."

The one way it breaks

If channel is greater than or equal to the batch size, you get a raw torch IndexError - no friendly message, the queue just fails. The slider caps at 100, so keep batches under that and you're fine. That's the entire failure surface, which is why it's effectively free to use.

Install

Same pack, same story. ComfyUI Manager: search comfyui-tensorops. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/un-seen/comfyui-tensorops

Restart, done. No models, no keys, nothing to download. If this is the only node you wanted, installing the whole pack is a heavy lift for a light tool - but it comes bundled with a bunch of other tensor ops, and the pack is small, so there's no real harm in grabbing it.

Categorytensorops

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
channelINT00–100

Outputs (1)

NameTypeDescription
IMAGEIMAGE