🔴 S42 CutFlow Channel Ops
Fix channel order, isolate colors, or go full negative
- clip
- clip
- frame_count
- info
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_luminancegives 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 isto_grayscale,invert,threshold,channel_multiply,channel_add.to_grayscaleis your desaturation;invertmakes a negative (the same trick people use to debug masks - a mask is just a single channel, and inverting it flips keep/kill);thresholdturns everything abovethreshold_value(0–1, default 0.5) to white and the rest to black;channel_multiplyscales all channels bymultiply_factor(0–5) - a cheap, lossy "brightness" that can clip;channel_addadds 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.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | IMAGE | Video clip for channel operations. | |
| operation | COMBO | to_grayscale | Channel operation to perform. |
| threshold_value | FLOAT | 0.500–1 | Threshold level for 'threshold' operation. |
| multiply_factor | FLOAT | 1.00–5 | Multiplier for channel_multiply operation. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| clip | IMAGE | — |
| frame_count | INT | — |
| info | STRING | — |