Latent Channel Merge
Surgical Feature Transfer Between Two Latents
- destination
- source
- mask
- latent
Latent space is a stack of feature channels, and different channels carry different things - some encode broad structure, some carry texture, some carry color. Latent Channel Merge exploits that: it takes a source latent, picks a subset of its channels, and blends those channels into a destination latent. It's feature transfer with a scalpel instead of a sledgehammer, which makes it one of the more interesting latent-editing nodes in the Skoogeer-Noise pack.
Concretely: decode two images, re-encode, and you can give image B's composition the texture channels of image A without collapsing into a generic mix - because you only moved the channels you chose. The selection logic is where the power lives. "top_variance" picks the most active channels, "top_roughness" picks the ones with the most fine detail (texture carriers), "random" and "indices" let you just grab channels, and "all" is the kitchen sink.
How it works
The node measures whatever selection metric you asked for on the source latent, picks the channels, and computes destination + blend_strength * (source - destination) on those channels - a standard blend where 0 keeps the destination, 1 takes the source outright, and values outside [0,1] extrapolate. An optional mask confines the whole operation spatially. The selection metrics are measured on the source, so "top_variance" means the channels where the thing you're importing from is most active.
The inputs that matter
destination- what you're blending into.source- where the channels come from.selection_mode-all,random,top_variance,top_roughness, orindices.blend_strength- how hard the selected channels push.0.3–0.7is the sweet spot for subtle transfer.seed- only matters inrandommode.
Output is a LATENT.
Installing it
Part of Skoogeer-Noise. Manager → search "Skoogeer-Noise", or:
cd ComfyUI/custom_nodes
git clone https://github.com/ttulttul/Skoogeer-Noise
Restart ComfyUI. Deps are the usual torch, numpy>=1.26, einops, pyyaml>=6.0.3; no downloads beyond the pack.
Common gotchas
Batch shapes must line up - the source and destination latents need compatible layouts, or the blend will error. And blend_strength outside [0,1] is genuinely useful but genuinely dangerous: extrapolating past 1 can blow channels out of their normal range and produce latents that decode to garbage until you dial it back. Start conservative, decode a preview, iterate. If you're blending latents at different resolutions, don't - decode, match sizes, re-encode first. This is a "test on stills before you commit to a batch" node.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| destination | LATENT | Latent to blend into (destination). | |
| source | LATENT | Latent providing channels to blend (source). | |
| seed | INT | 00–18446744073709550000 | Seed for deterministic channel selection when selection_mode=random. |
| selection_mode | COMBO | all | How to choose which source channels to blend. |
| selection_fraction | FLOAT | 1.000–1 | Fraction of channels to select when selection_count is 0. |
| selection_count | INT | 00–4096 | Exact number of channels to select (overrides selection_fraction when >0). |
| selection_order | COMBO | highest | Whether to pick high or low variance/roughness channels. |
| selection_indices | STRING | Comma-separated channel indices to select when selection_mode=indices. | |
| blend_strength | FLOAT | 1.00-4–4 | Blend strength for selected channels (0=none, 1=full, >1 or <0 allowed). |
| maskopt | MASK | Optional mask to limit the merge to masked areas. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |