AceStepVocoderAdapter
Feeding ACE-Step Latents to Any Vocoder
- vocoder
- vae
- latent
- audio
A vocoder is what turns the compressed latent representation of audio back into an actual waveform, and a good one is the difference between "AI vocals" and something that sounds recorded. This node is the pack's attempt to let you swap in a vocoder that wasn't built for this pack. It's an adapter in the truest sense: it takes your latent, tries to figure out what shape the attached vocoder wants, converts accordingly, and calls the vocoder through whatever method it exposes (infer, synthesize, decode, or just calling it as a function).
How it works
You connect three things: vocoder (a MODEL), vae (the VAE), and latent. From there the node plays detective:
- It tries to decode the latent to a waveform through the VAE.
- It applies heuristics to guess whether the latent is already a mel spectrogram (many vocoders want mel input directly) - checking the shape's frequency dimension against
n_mels. - If it's a waveform, it converts to a log-mel via
torchaudioif available, or a torch fallback if not, resampling to the vocoder's sample rate when needed. - It calls the vocoder via
infer→synthesize→decode→ callable, in that order, and returns audio.
The optional sample_rate, n_mels, n_fft, and hop_length ints exist because the node can't always introspect the vocoder's expected settings - but note they're mostly ignored unless the vocoder object exposes matching attributes. The node prefers to read n_mels/n_fft/hop_length off the vocoder object itself.
The honest truth about this node
It's the fiddliest member of the pack, and the README doesn't even document it as a first-class workflow - the pack's official vocoder path is simpler: drop the official ACE-Step vocoder files (diffusion_pytorch_model.safetensors + config.json) into JK-AceStep-Nodes/vocoder/, and the samplers handle decoding automatically when you enable use_vocoder / connect a VAE. This adapter exists for when you want a different vocoder - a third-party HiFi-GAN, a custom model you loaded through a model-loading node - that doesn't already speak ComfyUI's AUDIO format. The README's troubleshooting even steers you toward "high-quality VAE/vocoder (HiFi-GAN, or validated VAE)" for metallic timbre, which is exactly the use case.
Install and the realistic gotcha
Install like the rest of the pack: ComfyUI Manager (search "JK AceStep Nodes") or
cd ComfyUI/custom_nodes
git clone https://github.com/jeankassio/JK-AceStep-Nodes.git
then restart. It needs torchaudio for the clean mel path - note that's not in the pack's requirements.txt, so if the node silently falls back to the crude linear-bin mel approximation, that's why. Install torchaudio into your ComfyUI environment if you want the good path.
Realistically, expect to debug this one: the vocoder must be a Python object ComfyUI can hand you through a MODEL input, and it must expose one of the few call signatures the node probes. If your vocoder doesn't, you'll get a RuntimeError: Unsupported vocoder object. It's a connector for people who already have a specific vocoder in mind - if that's not you, use the pack's built-in vocoder folder instead and skip the adapter.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| vocoder | MODEL | — | |
| vae | VAE | — | |
| latent | LATENT | — | |
| sample_rateopt | INT | 44100 | — |
| n_melsopt | INT | 128 | — |
| n_fftopt | INT | 2048 | — |
| hop_lengthopt | INT | 512 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |