Nodes/ComfyUI-NL_Nodes/πŸ”€ NL Shuffle
ComfyUI Node

πŸ”€ NL Shuffle

Re-route your channels like a Nuke Shuffle

By NOLABEL-VFXΒ·Created 9 months agoΒ·Updated 2 months agoΒ· 0
πŸ”€ NL Shuffle
  • B
  • B_mask
  • A
  • A_mask
  • image
  • mask
  • image_info_json
β—„redB.redβ–Ί
β—„greenB.greenβ–Ί
β—„blueB.blueβ–Ί
β—„alphaB.alphaβ–Ί
β—„A_image_info_jsonβ–Ί
β—„B_image_info_jsonβ–Ί

NL Shuffle is a channel-reordering node with a Nuke accent: it lets you rebuild an image's RGB and alpha channels from whatever sources you want, including a second image stream. It's the kind of node that looks pointless until the day it saves your entire afternoon, and that day is usually about masks.

Here's the scenario. You've got a matte that's been living in the blue channel of some image, or you extracted a mask and now you want it as the alpha of a different stream, or you need to visualize a red channel as a full-color image so you can actually see it. ComfyUI doesn't make that trivial. NL Shuffle makes it a dropdown menu.

How it works

Primary input B is required; A is an optional second stream. For each output channel - red, green, blue, and alpha - you pick where it comes from:

  • B.red / B.green / B.blue / B.alpha - channels from the primary stream.
  • A.red / A.green / A.blue / A.alpha - channels from the secondary stream (requires A connected).
  • black / white - constant channels, for zeroing or filling.

The alpha output becomes the mask output too. So "put A's green channel into the output's blue and make everything else black" is just four dropdown selections. If you ever wanted a "blue channel, visualized," this is the one-liner for it. Optional B_mask/A_mask mattes feed the alpha channels (defaulting to solid when absent), and A_image_info_json/B_image_info_json carry color metadata through.

Outputs: image, mask, and passthrough image_info_json.

Where people use it

Three recurring jobs. Extracting and re-hosting a matte from a channel. Generating inspection views (isolate a channel for debugging). And the Nuke classic: swapping channels as a poor man's color space hack when you know exactly what you're doing. The pack groups it with NL Match and NL Merge as the "assemble the comp" family - align your streams with Match, merge with Merge, and re-route channels here when a merge needs specific channel plumbing.

Install

Same pack, same dance:

cd ComfyUI/custom_nodes
git clone https://github.com/NOLABEL-VFX/ComfyUI-NL_Nodes

or ComfyUI Manager β†’ "ComfyUI-NL_Nodes", restart. Light node, no dependencies beyond the pack's base requirements. The only real gotcha: the dropdown defaults assume B is connected, so if you wire A only and wonder why nothing changes, check that your sources actually reference A.*. And remember the output alpha is whatever you routed to the alpha dropdown - if that's B.alpha but you didn't connect a B_mask, you get a solid matte, which is usually not the surprise you want.

CategoryNOLABEL/Color

Inputs (10)

NameTypeDefaultDescription
BIMAGEPrimary image stream.
redCOMBOB.redSource for the output red channel.
greenCOMBOB.greenSource for the output green channel.
blueCOMBOB.blueSource for the output blue channel.
alphaCOMBOB.alphaSource for the output mask/alpha channel.
B_maskoptMASKOptional matte for B.alpha; missing defaults to solid.
AoptIMAGEOptional secondary image stream.
A_maskoptMASKOptional matte for A.alpha; missing defaults to solid when A is connected.
A_image_info_jsonoptSTRINGOptional serialized color metadata for A.
B_image_info_jsonoptSTRINGOptional serialized color metadata for B.

Outputs (3)

NameTypeDescription
imageIMAGEβ€”
maskMASKβ€”
image_info_jsonSTRINGβ€”