π NL Shuffle
Re-route your channels like a Nuke Shuffle
- B
- B_mask
- A
- A_mask
- image
- mask
- 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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| B | IMAGE | Primary image stream. | |
| red | COMBO | B.red | Source for the output red channel. |
| green | COMBO | B.green | Source for the output green channel. |
| blue | COMBO | B.blue | Source for the output blue channel. |
| alpha | COMBO | B.alpha | Source for the output mask/alpha channel. |
| B_maskopt | MASK | Optional matte for B.alpha; missing defaults to solid. | |
| Aopt | IMAGE | Optional secondary image stream. | |
| A_maskopt | MASK | Optional matte for A.alpha; missing defaults to solid when A is connected. | |
| A_image_info_jsonopt | STRING | Optional serialized color metadata for A. | |
| B_image_info_jsonopt | STRING | Optional serialized color metadata for B. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| mask | MASK | β |
| image_info_json | STRING | β |