Nodes/S42 CutFlow/🔴 S42 CutFlow Channel Ops
ComfyUI Node

🔴 S42 CutFlow Channel Ops

Fix channel order, isolate colors, or go full negative

By GeekyGhost·Created 6 months ago·Updated 4 months ago· 3
🔴 S42 CutFlow Channel Ops
  • clip
  • clip
  • frame_count
  • info
operationto_grayscale
threshold_value0.50
multiply_factor1.0

Somewhere in your pipeline, the channels will betray you. A clip from one pack comes out with red and blue swapped, or you need a specific channel as a grayscale mask, or you want the negative of a frame for a stylized look. S42CF Channel Ops is the single node that covers all of it - thirteen channel operations in a dropdown, plus two parameters, sitting in the Utilities category.

The operation dropdown is the node:

  • Extract - extract_red, extract_green, extract_blue, extract_luminance, extract_alpha. Each pulls that channel out as a grayscale result. This is the genuinely useful diagnostic family: extract the green channel to see what a model is really doing there, or to build a mask from a color. extract_luminance gives you the brightness-only view, handy as a luma mask source.
  • Swap - swap_rb, swap_rg, swap_gb. Red/blue swap is the fix for that RGB/BGR channel-order mismatch that happens when footage passes through a pack that assumed a different convention. The other two are for creative confusion.
  • Transform - to_grayscale, invert, sepia-style tone... actually no, the list here is to_grayscale, invert, threshold, channel_multiply, channel_add. to_grayscale is your desaturation; invert makes a negative (the same trick people use to debug masks - a mask is just a single channel, and inverting it flips keep/kill); threshold turns everything above threshold_value (0–1, default 0.5) to white and the rest to black; channel_multiply scales all channels by multiply_factor (0–5) - a cheap, lossy "brightness" that can clip; channel_add adds the factor instead.

Wait - let me be precise about the full list, because the tooltip in the UI only shows a sample: extract_red/green/blue, extract_luminance, extract_alpha, swap_rb/rg/gb, to_grayscale, invert, threshold, channel_multiply, channel_add. That's the thirteen. The two extra widgets (threshold_value, multiply_factor) only matter for their named operations, so you can ignore them most of the time.

Outputs: clip (modified IMAGE batch), frame_count, info. Same shape as every S42-CutFlow utility, so it drops into the same graph positions.

Where this earns its keep: debugging a pipeline - extract a channel to see what's actually in the data - and fixing the occasional RGB/BGR mismatch without re-encoding anything. The creative ops (invert, threshold, swaps) are fine, but if you're honest, this is mostly a "something looks wrong, let's look at the channels" node, and it's very good at that.

Installing it

S42-CutFlow install: ComfyUI Manager → search "S42 CutFlow" → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/S42-CutFlow.git
pip install -r S42-CutFlow/requirements.txt

One-line requirements (opencv-python-headless); the ops are pure torch tensor slicing. "[S42 CutFlow] Loaded ..." on restart confirms registration.

The takeaway

Reach for it the moment a clip's colors look wrong or you need a single channel as a mask. The swaps and extracts are the practical 80%; the transforms are for when you feel creative.

CategoryS42 CutFlow/Utilities

Inputs (4)

NameTypeDefaultDescription
clipIMAGEVideo clip for channel operations.
operationCOMBOto_grayscaleChannel operation to perform.
threshold_valueFLOAT0.500–1Threshold level for 'threshold' operation.
multiply_factorFLOAT1.00–5Multiplier for channel_multiply operation.

Outputs (3)

NameTypeDescription
clipIMAGE
frame_countINT
infoSTRING