Neural Latent Mixer (S42)
Mixing audio in latent space before it becomes sound
- latent_a
- latent_b
- LATENT
S42_NeuralLatentMixer wants to be the node that mashes two songs together in the semantic latent space - before anything gets decoded into audible sound. The idea is great: with LTX-2/2.3's audio VAE, a "melody" and a "drum track" become latent tensors, and if you mix the tensors instead of the waveforms, you can theoretically blend concepts rather than just sounds. The name says "Neural," but read on, because the implementation is plain tensor arithmetic wearing a costume.
It's marked Experimental, and that's the right label. It's a fun tool to have in the box, and it will occasionally do something genuinely surprising. It's just not doing what the marketing implies.
How it works
Both latents are just tensors - shape [batch, channels, ...length]. The node trims both to the shorter length, then applies one of three operations controlled by mix_mode:
- Acoustic Interpolation (Lerp) - element-wise weighted average:
A*(1-blend) + B*blend. The classic crossfade-in-latent. - Feature Swap (Dimension Splice) - takes the first
blend_ratiofraction of A's channels and the rest from B's channels, concatenating them. The assumption here is that channels carry distinct semantic meaning (this is the "feature swap" idea). - Cross-Modulation (Multiply) - multiplies the latents together (mixed with a straight lerp so it doesn't explode). Multiplicative interaction, i.e. "modulation" flavor.
Nothing about this is learned, adaptive, or semantic-aware. It operates on whatever dimensions you hand it, and it has no idea what a melody or a snare drum is. The quality of the result depends entirely on whether the channel layout of your audio VAE happens to line up with the "dimension splice" assumption - sometimes it does, sometimes it's mush.
Inputs
latent_a- primary concept (e.g., a melody latent).latent_b- secondary concept (e.g., rhythm/drums).mix_mode- the three above.blend_ratio- 0–1, default 0.5. Meaning depends on mode (lerp weight, splice point, or multiply intensity).
Output
A single LATENT, ready to feed the pack's S42 Audio Latent Decoder or your VAE's audio decoder to hear the result.
Installing it
Part of S42 CutFlow: ComfyUI Manager (search "S42 CutFlow") or git clone https://github.com/GeekyGhost/S42-CutFlow into ComfyUI/custom_nodes/, install requirements, restart. Pure torch - no models, no downloads.
Gotchas
The honest version: this node does exactly what it says on the tin (tensor blending) and absolutely nothing more. If your audio latents come from a VAE whose channels don't map cleanly to separable concepts, "Feature Swap" will just produce hash. Keep blend_ratio modest, always listen through a decoder rather than trusting it, and treat the "Experimental" tag as a warning label. And remember the channel count must be compatible - the node doesn't check; mismatches just produce nonsense silently.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_a | LATENT | Primary semantic concept (e.g., Melody). | |
| latent_b | LATENT | Secondary semantic concept (e.g., Rhythm/Drums). | |
| mix_mode | COMBO | Feature Swap (Dimension Splice) | 3 options: Acoustic Interpolation (Lerp), Feature Swap (Dimension Splice), Cross-Modulation (Multiply) |
| blend_ratio | FLOAT | 0.500–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |