MD: ACE-Step XL Latent Processor ποΈ
The one node that fixes quiet, distorted ACE-Step audio
- samples
- samples
- stats
Here's the ACE-Step XL quirk that drives people up a wall: you sample, you decode, and the audio comes out thin, quiet, or faintly distorted - not because the model failed, but because ACE-Step's latent space is offset. Its "silence" latent isn't centered at zero the way image latents are, so the decoded audio carries a DC bias. This node sits between the KSampler and the VAE decode and shifts that latent back to center.
The author's description is precise about placement: post-sampling, between KSampler and VAE Decode. You feed it the samples LATENT straight from the sampler, it applies three operations in order, and you feed the corrected latent to the VAE.
The operations
mean_normalize- subtracts each channel's mean before anything else. The stronger fix, off by default.latent_shift- the main knob, an additive offset applied to every channel. Default -0.15, with per-variant recommendations baked into the tooltip: xl-turbo -0.12, xl-sft -0.17, xl-base -0.15. That's the order to reach for: pick your variant's default, tune Β±0.05 by ear. Too negative β thin and quiet; too positive β distortion.scale- a multiplicative output level, applied last. Leave it at 1.0 and don't use it to fix loudness - adjustlatent_shiftfirst; scale only amplifies problems.
passthrough (optional) bypasses everything for A/B comparison - flip it on to hear the broken baseline, flip it off to hear the fix, without rewiring.
Outputs
samples (the corrected LATENT, straight into VAE Decode) and stats - a STRING report with the mean/std/min/max before and after, plus a warning if more than 0.1% of values exceed |4.0| (the clipping signal that means "reduce scale or shift"). Pipe stats into a text display node and you can watch the DC bias collapse in real numbers.
Installing it
Part of MD Nodes (MDMAchine/ComfyUI_MD_Nodes). ComfyUI Manager β search MD_Nodes β Install, restart, or:
cd path/to/ComfyUI/custom_nodes
git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
cd ComfyUI_MD_Nodes
pip install -r requirements.txt
It's a pure-latent processor - no model download, no extra dependency beyond the pack. The ACE-Step XL model itself loads through this pack's ACE-Step XL Loader.
Common issues
The trap is over-correcting. The tooltip's warning is worth taking literally: too negative a shift and the output goes thin and quiet; too positive and you get distortion. Tune in Β±0.05 steps from your variant's default rather than chasing a perfect number in one jump. And note the order matters - mean_normalize runs before latent_shift, so if you enable both, the shift lands on top of an already-centered signal and you may need to shrink it. If audio still sounds off after tuning, check the stats output for the clipping warning before touching scale.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | Connect to KSampler LATENT output. | |
| latent_shift | FLOAT | -0.15-2β2 | Additive DC offset applied to all latent channels. Re-centers ACE-Step's non-zero silence_latent. 0.0 = passthrough (disabled) < 0.0 = shift toward center (typical β reduces DC bias) > 0.0 = shift away from center Per-variant recommendations: xl-turbo : -0.12 xl-sft : -0.17 xl-base : -0.15 Tune Β±0.05 by ear from the variant default. Too negative = thin/quiet. Too positive = distortion. |
| scale | FLOAT | 1.000.1β3 | Multiplicative output level. Applied after shift. 1.0 = no change (start here). >1.0 = amplify (clipping risk at high values). <1.0 = attenuate (safe headroom). Use sparingly β adjust latent_shift first. |
| mean_normalize | BOOLEAN | false | Subtract per-channel mean before applying latent_shift. More aggressive DC correction than shift alone. Enable if latent_shift doesn't fully resolve DC artifacts. Runs before latent_shift. |
| passthroughopt | BOOLEAN | false | True = bypass all ops. Use for A/B comparison. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | β |
| stats | STRING | β |