Nodes/JK AceStep Nodes/AceStepVocoderAdapter
ComfyUI Node

AceStepVocoderAdapter

Feeding ACE-Step Latents to Any Vocoder

By jeankassio·Created 9 months ago·Updated 9 months ago· 32
AceStepVocoderAdapter
  • vocoder
  • vae
  • latent
  • audio
sample_rate44100
n_mels128
n_fft2048
hop_length512

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:

  1. It tries to decode the latent to a waveform through the VAE.
  2. 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.
  3. If it's a waveform, it converts to a log-mel via torchaudio if available, or a torch fallback if not, resampling to the vocoder's sample rate when needed.
  4. It calls the vocoder via infersynthesizedecode → 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.

CategoryJK AceStep Nodes/Vocoder

Inputs (7)

NameTypeDefaultDescription
vocoderMODEL
vaeVAE
latentLATENT
sample_rateoptINT44100
n_melsoptINT128
n_fftoptINT2048
hop_lengthoptINT512

Outputs (1)

NameTypeDescription
audioAUDIO