Audio Latent Encoder (S42)
Stuff an audio waveform into a latent so you can mangle it before it's sound
- audio
- vae_model
- LATENT
AudioLatentEncoder is the front door to the pack's audio-latent experiments: it takes a normal AUDIO waveform plus a vae_model, and hands you back a LATENT you can then distort, pulse, mix, or decode elsewhere. The idea is the audio cousin of the image workflow you already know - compress to a latent, edit in that space, decode - and this node is the compression step.
How it works is two lines of code, and the second line is the one you need to hear about. It calls vae_model.encode(waveform) on your audio and returns the result as a latent. That's the happy path. But if the VAE you connected doesn't have a usable .encode() method - and a stock ComfyUI image VAE does not - it doesn't raise an error. It fabricates a silent latent: a tensor of zeros shaped (batch, 128, samples ÷ 320). Your graph keeps running, nothing crashes, and you've just encoded silence.
That 128 channels shape isn't arbitrary, by the way. It matches what the pack's other audio-latent nodes expect - S42_AudioLatentWobble, the decoder, and the S42_AceStepAudioGenerator stub all agree on a 128-channel, ~86-steps-per-second audio latent format (the 86 comes from the generator's latent length of duration * 86). So the pack is internally consistent about what an "audio latent" looks like; it's just that the actual encoder/decoder machinery has to come from a real audio VAE, and the pack doesn't ship one. ACE-Step and LTX audio VAEs are the intended sources - the tooltips literally say "e.g., LTX/AceStep VAE."
Inputs are minimal, because there's genuinely not much to configure:
audio- the waveform to compress. Standard ComfyUI AUDIO from any loader.vae_model- the audio VAE. This is the entire ballgame. Wrong VAE, silent result.
The one output is the LATENT, ready to feed S42_AceStepLatentModifier, S42_NeuralLatentMixer (if you're mixing two songs in latent space), or straight to S42_AudioLatentDecoder to verify the round-trip.
Honest framing: this is the pack's most "you must bring your own model" node. If you already have an ACE-Step pipeline and its VAE wired up, it's a clean way to get audio into latent form for the experimental nodes. If you don't, every downstream experiment will run on pure silence and you'll spend an afternoon convinced the graph is broken. Test the round-trip with the decoder and listen before building anything on top.
Installing it
Same pack install as everything here: ComfyUI Manager → search "S42 CutFlow" → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GeekyGhost/S42-CutFlow.git
pip install -r S42-CutFlow/requirements.txt
One-line requirements (opencv-python-headless); torch/torchaudio handle the audio math and already ship with ComfyUI.
The trap in one line
An image VAE connected here won't error - it will silently encode your audio as zeros. Wire in a real audio VAE, or you're building a workflow that produces nothing but silence with a straight face.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Standard audio waveform to compress. | |
| vae_model | VAE | The Audio VAE model (e.g., LTX/AceStep VAE). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |