Nodes/RyanOnTheInside/Audio Latent Stretch βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Audio Latent Stretch βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Change an ACE-Step clip's length without re-rendering it

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Audio Latent Stretch βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • audio_latents
  • LATENT
β—„scale_by1.50β–Ί

If you've made an ACE-Step song and it's almost the right length - just a few seconds too short for the video you're cutting it to, or a hair too long - you don't need to regenerate it with a different duration and hope the vibe survives. This node stretches the audio latent directly, before it ever hits a VAE decode, so you get a longer or shorter clip out of the same generation.

How it works

ACE-Step (the pack has native support for both the 1.0 and 1.5 versions of it) represents audio the same way image models represent images: as a compressed latent tensor rather than a raw waveform. This node resamples that latent along its time axis by a scale factor. Push the scale above 1 and the latent - and therefore the decoded audio - gets longer and slower; push it below 1 and it gets shorter and faster. It's conceptually the same move as time-stretching a waveform, just done a layer earlier, on the compressed representation instead of the audio itself.

The inputs and outputs that matter

Only two fields, both required:

  • audio_latents (LATENT) - the ACE-Step latent coming out of your sampler, before VAE decode.
  • scale_by (default 1.5, range 0.01–8) - the stretch factor. 1.0 is a no-op, 2.0 doubles the length, 0.5 halves it. The default of 1.5 gives you a 50% longer clip.

Output is a single LATENT, which goes back into whatever decodes ACE-Step latents into playable audio.

How to install it

Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart ComfyUI. No separate model download for this node itself - but if this is the first ACE-Step node you're running in a session, the pack's README notes that ACE-Step's silence latent gets pulled from HuggingFace automatically on first use, so expect a brief pause (and make sure you have HF access) the very first time you run any ACE-Step chain.

Common issues & troubleshooting

The output sounds smeared or mushy at extreme scale values. This is stretching a latent, not a waveform - there's no phase-vocoder magic happening to preserve fine detail across a big stretch. Small adjustments (say, 0.8–1.3) hold up much better than pushing toward the 0.01 or 8 extremes.

Downstream node errors on shape. Unlike the pack's AudioRegionMask/AudioTemporalMask nodes, this one doesn't ship separate "ACE 1.0" and "ACE 1.5" variants - it works on the raw latent tensor. If you're on ACE-Step 1.5 and something downstream chokes after stretching, that shape mismatch is the first thing to check, not the stretch node itself.

Nothing happens at all. Double-check scale_by isn't sitting at 1.0 - easy to leave it there after dragging the node in and wondering why the clip length didn't change.

Categorylatent/audio

Inputs (2)

NameTypeDefaultDescription
audio_latentsLATENTβ€”
scale_byFLOAT1.500.01–8β€”

Outputs (1)

NameTypeDescription
LATENTLATENTβ€”