Nodes/Network Bending for ComfyUI/Audio Latent Manipulator
ComfyUI Node

Audio Latent Manipulator

An effects rack for audio latents, not audio files

By DavidPiazza·Created about a year ago·Updated 9 months ago· 0
Audio Latent Manipulator
  • latent
  • features
  • latent
manipulation_typefrequency_shift
strength0.50
frequency440.00
time_factor1.00

Every DAW has a plugin chain, and this is the latent-space version. Audio Latent Manipulator is a one-stop effects rack that works on audio latents - the compressed representation before it's decoded back into sound. Where a normal EQ or flanger edits the waveform after the fact, this edits the thing the VAE thinks the sound is, which gives you results that survive the round-trip through the decoder without the usual artifacts.

How it works

You feed it a LATENT and pick one of seven manipulation_type operations, most of them done with FFT math straight in latent space:

  • frequency_shift - rolls the spectrum in the frequency domain, like a pitch-bent formant smear.
  • temporal_stretch - squeezes or stretches the time dimension (use time_factor, 0.25–4×) and pads/crops back to size.
  • harmonic_emphasis - finds spectral peaks and boosts them, for a more "present" or harmonic-locked sound.
  • noise_injection - adds controlled noise; if you also plug in features, the noise is modulated by feature data.
  • dynamic_range - soft compression below strength 1, expansion above it.
  • spatial_transform - warps the latent grid on 1D latents or rotates channel pairs on 2D ones.
  • resonance_filter - resonant filtering around a target frequency.

The frequency input (20–20000 Hz, default 440) matters for the frequency-based ops - it's your center pitch. strength (0–2) is the wet/dry-ish amount; keep it modest on first pass, because a strength of 2 on frequency_shift is closer to "alien transmission" than "subtle color."

The inputs that matter

  • latent - the input audio latent, typically from AudioVAEEncode or a generation sampler.
  • manipulation_type - the seven-mode dropdown above.
  • strength - 0 to 2, the amount of the effect.
  • frequency, time_factor - the tuning knobs for frequency-based ops and stretch.

Output is the manipulated latent, which goes to AudioVAEDecode (or into another manipulation node - chaining these is half the fun, and the pack doesn't stop you).

Installing it

It's part of DavidPiazza/network_bending, installable from ComfyUI Manager ("Network Bending") or:

cd ComfyUI/custom_nodes
git clone https://github.com/DavidPiazza/network_bending.git

Restart, and make sure torchaudio + librosa are installed (the pack's requirements-audio.txt). Missing audio deps mean the audio nodes silently don't load - the pack degrades gracefully, which is kind of it, but you'll wonder where the nodes went.

Gotchas

This is a fully implemented node, unlike a couple of cousins in the same pack. The traps are: pushing strength too high and getting noise, and trying temporal_stretch on latents that are already cropped to the minimum length. Also worth remembering that manipulation happens before decode, so what sounds reasonable in the latent can come out exaggerated - render a test at 0.25 and 0.5 before committing to 1.0.

Categoryaudio/latent

Inputs (6)

NameTypeDefaultDescription
latentLATENTAudio latent to manipulate
manipulation_typeCOMBOfrequency_shiftType of manipulation to apply
strengthFLOAT0.500–2Manipulation strength
featuresoptAUDIO_FEATURESOptional features to guide manipulation
frequencyoptFLOAT440.0020–20000Target frequency for frequency-based operations
time_factoroptFLOAT1.000.25–4Time stretch factor

Outputs (1)

NameTypeDescription
latentLATENT