Skip to content
ExplanationUnreviewed

ACE Studio local synthesis pipeline

Recorded 2026-10-05. Static inspection of the macOS ACE Studio 2.1.8 (build 2.1.8.25201) application bundle, CoreML graphs, and client symbols reveals a split local synthesis pipeline: compressed four-level residual FSQ tokens feed a local DCAE decoder to produce normalized Mel spectrograms and pitch, followed by an explicit-excitation RefineGAN2 vocoder.

Recovered data flow and evidence strength

Client metadata and local model interfaces support a division between cloud token generation and local resynthesis:

  1. Upstream cloud acoustic generator (internals unconfirmed): Lyrics, phonemes, language, note pitch and timing, singer or VoiceMix selection, and singing controls enter a network synthesis flow named SingingMamba in client RTTI and logs.
  2. Compressed acoustic tokens (strong inference): The local Token2CodesTool decodes uint16 indices across four residual FSQ codebooks into codes with shape [1, 6, 64, 8].
  3. DCAE decoder (direct evidence): dcae_decoder_v4lite_1024_fp16.mlmodelc maps codes to normalized Mel frames ([1, 1, 1024, 128]) and normalized pitch ([1, 1, 1024, 1]).
  4. Client post-processing and RefineGAN2 (direct evidence for interface, unconfirmed pulse algorithm): Client code denormalizes Mel and pitch, constructs pulse and noise inputs outside the CoreML graph, and runs refinegan2_sota_grouped.mlmodelc to output folded audio ([1, 16, 15360]), which is unfolded and crossfaded across chunks.
  5. Auxiliary models (direct evidence for graphs, runtime trigger path unconfirmed): mel2pitch converts 128-band Mel to pitch ([1, 128, 1024] -> [1, 1, 1024]), and mel2dur predicts alignment logits from 94-band Mel and framewise uniform phoneme IDs ([1, T, 1024]).

Client symbols also expose SingingMambaParams fields (mambaEnergy, mambaTension, mambaBreathiness, and mambaFalsetto), confirming explicit performance controls at the application data layer, though their cloud injection mechanism and exact mapping to UI sliders remain unverified.

The table below summarizes each architectural finding, its confidence level, and its supporting evidence.

Judgment Confidence Basis and limits
Four local models and inference ABI Direct evidence Verified via metadata.json, plaintext model.mil, Swift ABI, and CoreML execution.
4-level residual FSQ with 64,000 combinations per level Direct evidence Verified via codebooks.npy, scales.npy, Token2CodesTool strings, and Mel correlation checks.
SingingMamba naming in client pipeline Direct evidence Observed in RTTI, Qt meta-objects, task types, source paths, and log strings.
Cloud emits tokens while local runtime resynthesizes audio Strong inference Supported by network tasks, token2codes, and Turbo mode docs without network payload captures.
Cloud generator uses a Mamba-family network Moderate inference Based on SingingMamba* naming. Exact layer mix (pure SSM, hybrid Transformer, AR, or non-AR) is unknown.
Cloud generator uses DiT or flow matching Unconfirmed Local DCAE decoding does not reveal generator architecture, and ACE-Step uses different codecs.
Local decoder and vocoder are shared across singers Strong inference CoreML graphs expose no singer, language, or speaker embedding inputs, though runtime swapping is not ruled out.
Singer adaptation strategy (LoRA, embedding, or adapter) Unknown Local bundles cannot distinguish cloud training strategies, parameter counts, or data scale.

ACE Studio’s documentation for Local Rendering describes Turbo mode as offloading resynthesis to local CPU or GPU with chunked re-rendering for small edits, matching client dirty-tracking and crossfade logic.

Quantized token representation

Under Contents/Resources/mlaudio/, the bundle ships codebooks.npy ([4, 64000, 6], float32, four identical copies), scales.npy ([4, 6], float32), zero_codes.npy ([1, 6, 64, 8], a non-zero padding representation required instead of mathematical zeros for silence checks), and pipeline validation tokens ([754, 32], uint16, observed values 38 through 63935).

Each 6-dimensional FSQ codebook forms a Cartesian grid with [8, 8, 8, 5, 5, 5] discrete levels (product 64,000). The first three axes take values in [-1, -0.75, -0.5, -0.25, 0, 0.25, 0.5, 0.75] and the trailing three axes take [-1, -0.5, 0, 0.5, 1]. Because the grid is deterministic mixed-radix arithmetic, storing four identical float32 lookup tables (5.86 MiB) is an implementation choice rather than learned parameters.

The four residual level scales follow inverse products of step denominators:

Level 0: [1,     1,     1,     1,    1,    1]
Level 1: [1/7,   1/7,   1/7,   1/4,  1/4,  1/4]
Level 2: [1/49,  1/49,  1/49,  1/16, 1/16, 1/16]
Level 3: [1/343, 1/343, 1/343, 1/64, 1/64, 1/64]

Controlled decoding across the first 64 validation time steps and comparison against denormalized reference Mel frames (1024 frames) establish the tensor ordering as time, residual level, and frequency slot ([T, 4, 8] summed across levels):

indices = tokens.reshape(T, 4, 8)
codes = sum(codebooks[r, indices[:, r]] * scales[r] for r in range(4))
codes = codes.transpose(2, 0, 1)[None]  # [1, 6, T, 8]

Comparing both candidate tensor layouts against the reference Mel frames confirms the outer-level ordering.

Token layout Mel correlation Mel RMSE
Four residual levels outer, 8 frequency slots inner 0.998427 0.130892
Interleaved 4 levels per frequency slot 0.222513 5.689517

The remaining 0.13 RMSE reflects unknown reference array precision, chunk boundary context, or bundle version mismatches rather than layout ambiguity. The decoder upsamples 64 x 8 to 1024 x 128 (16x in both time and frequency), reducing float count by 42.7x relative to Mel. At 44.1 kHz and hop 256, raw uint16 token bandwidth is approximately 5.51 kbit/s (92.9 ms per step), excluding framing or compression overhead.

Although general Finite Scalar Quantization supports scalar grid quantization, this four-level residual configuration is specific to the local bundle.

DCAE decoder and denormalization

The CoreML model dcae_decoder_v4lite_1024_fp16.mlmodelc accepts float32 codes ([1, 6, 64, 8]), executes internally in float16, and outputs pred_mel ([1, 1, 1024, 128]) and pred_f0 ([1, 1, 1024, 1]), exported via PyTorch 2.7.0, TorchScript, and coremltools 8.3.0. Its structure aligns with DCAE / EfficientViT blocks:

  1. fsq_project_out maps 6 channels to 16, followed by a 2D convolution into 1024 channels.
  2. Low-resolution 1024-channel blocks combine multiscale linear QKV attention (V K^T multiplied by Q, normalized without softmax) and gated depthwise convolutions (expansion = 8).
  3. Four nearest-neighbor 2D upsampling stages with convolution and PixelShuffle residuals reduce channels from 1024 through 512, 256, and 128 down to 64. Attention appears at 1024 and 512 channels, while lower stages remain convolutional.
  4. The Mel branch applies ReLU and a 3 x 3 convolution (64 to 1).
  5. The pitch branch runs a [32, 64, 1, 128] convolution spanning the full frequency axis with frequency stride 128, followed by temporal convolutions (32 to 16 to 1) with SiLU.

Client post-processing functions located at 0x100dd6a14 and 0x100dd66f0 transform normalized outputs before passing them to the vocoder:

mel = (x + 1) * 0.5 * 15 - 12 = 7.5 * x - 4.5
pitch = 30 * x + 30
if pitch <= 30.5: pitch = 0

Observed value ranges indicate a MIDI-like semitone pitch scale rather than Hz, requiring frequency conversion, interpolation, and phase accumulation when building external vocoder excitation.

RefineGAN2 vocoder

The vocoder graph refinegan2_sota_grouped.mlmodelc maps mel ([1, 128, 960]), pulse_folded ([1, 16, 15360]), and noise ([1, 16, 15360]) to audio_folded ([1, 16, 15360]). Unfolding 16 x 15360 yields 245,760 samples over 960 Mel frames, confirming a hop size of 256 (matching an 8-bit left shift in client buffer sizing). The 16 channel axis represents folded time samples rather than multi-channel audio.

Internal operators include gen_downs, gen_down_resblocks, gen_ups, gen_resblocks, skip concatenations, and tanh output, consistent with pulse-guided RefineGAN architectures linked to Timedomain. Upsampling channels proceed through 768, 384, 192, 96, 48, and 24 with strides [4, 4, 4, 2, 2] (product = 256) and multiscale residual kernels [3, 7, 11, 17]. Across 163 convolutions, 5 transposed convolutions, 201 LeakyReLU layers, and heavy slice, reshape, and scatter ops, the grouped folded layout optimizes memory layout for CoreML rather than indicating low-parameter group convolutions or causal streaming. Note that a legacy error string (refinegan2_streaming.mlmodelc) remains in the binary even though the loaded graph is refinegan2_sota_grouped.mlmodelc.

Auxiliary models

  • mel2pitch ([1, 128, 1024] -> [1, 1, 1024]): Executes in FP32 across four ConvNeXt-style 1D stages (192, 256, 384, 512 channels, three blocks per stage with dwconv, pwconv1/2, gamma, GELU, and LayerNorm). Without lyrics or score input, it serves pitch extraction rather than full score-to-pitch prediction.
  • mel2dur ([1, 94, T] + uniform phonemes [1, T] -> [1, T, 1024]): Supports 4 <= T <= 1024 via a 6-layer Transformer encoder (hidden = 256, 8 heads, FFN = 1024, ReLU, 8192 x 256 positional cache, n_phn = 1024 covering zh, ja, en, es, ko, fr, it, and pt). Coupled with Mel2DurSpanBuilderAdapter and 94-band Mel (distinct from the 128-band synthesis Mel), it aligns Mel frames to candidate phoneme sequences rather than predicting durations purely from notes.

Model size and Apple M5 Max profiling

BLOB constant totals from MIL reflect deployed model sizes (including fixed caches such as 2.097 M positional constants in mel2dur):

Module BLOB elements weight.bin size Primary precision
DCAE decoder 32.464 M 61.923 MiB FP16
RefineGAN2 106.884 M 203.889 MiB FP16
mel2pitch 12.877 M 49.128 MiB FP32
mel2dur 7.517 M 14.342 MiB FP16

The four local weight.bin files total 329.28 MiB, dominated by RefineGAN2. Running standalone CoreML prediction directly on an Apple M5 Max (48 GB RAM, macOS 27.0.1, .cpuAndGPU, allowLowPrecisionAccumulationOnGPU = false, median of runs 2 to 4, excluding host tensor setup) gives per-chunk execution times for dummy or reference inputs:

Module and input length First inference Median steady inference
DCAE (1024 frames) 232 ms 223 ms
mel2pitch (1024 frames) 68 ms 61 ms
RefineGAN2 (960 frames) 1,354 ms 1,191 ms
mel2dur (94 frames) 19 ms 3.05 ms

Running the decoder with actual validation tokens yielded roughly 221 ms, and normalized Mel inputs on mel2pitch ran in 59.8 ms. In an isolated vocoder process, peak RSS reached 2.54 GiB (2,728,640,512 bytes via macOS getrusage, steady inference 1.15 s), including CoreML runtime and activation buffers. At 44.1 kHz with hop 256, 1024 decoder frames span 5.94 s (RTF 0.038) and 960 vocoder frames span 5.57 s (RTF 0.214). These figures measure isolated single-chunk cost rather than end-to-end streaming RTF or UI playback latency.

Host runtime clues

Client binaries show a Qt and C++ host application embedding JUCE and Tracktion audio components, bridged to a Swift CoreMLInferenceProvider. That provider exposes dedicated entry points for loading models and running inference across the DCAE decoder, mel2pitch, the vocoder, and mel2dur.

An out-of-process service (MLAudioInferenceOutOfProcessBackend and Helpers/MLServiceProvider) links CoreML, ONNX Runtime 1.24.4, Metal, Qt, and libsoxr. It dispatches protobuf tasks for all four neural modules and controls vocoder precision through CONFIG_VOCODER_PRECISION. Device policy selectors (GpuOnlyModelConfig and AllDeviceModelConfig) indicate multi-backend GPU routing rather than unconditional Neural Engine execution.

Chunked rendering (splitVocoderInputByFrame) combines frame padding, crossfading, and dirty tracking. It pairs 1024-frame decoder chunks with 960-frame vocoder windows, and the 64-frame difference likely reserves boundary margins around each chunk.

Design implications and open questions

  1. Test compressed codec upper bounds independently before attributing lost consonant transients or breath texture to upstream acoustic generators. Run blind listening comparisons between codec-reconstructed Mel inputs and direct Mel-to-vocoder resynthesis on unseen singers and languages.
  2. Budget vocoder cost separately from acoustic generation. In ACE’s local stack, the 106.9 M vocoder accounts for 84% of combined fixed-chunk decoder and vocoder latency, so track model size, compute time, memory, and TTFA separately across the frontend, acoustic backbone, and vocoder.
  3. Evaluate discrete residual tokens against continuous latents for the target deployment setup. Four levels by eight frequency slots (32 tokens per step) favor low-bandwidth cloud delivery, while local desktop synthesis faces no cloud payload constraint and must weigh quantization artifacts against continuous latents.
  4. Isolate pulse-guided harmonic excitation from spectral modeling when comparing vocoders across high pitches, glides, vibrato, falsetto, and cross-lingual consonants.
  5. Use compact tokens or static frame features to support phrase caching, incremental re-rendering, and background cache reuse across single-note edits.

Unlike ACE-Step (which uses continuous Music-DCAE and ADaMoS/HiFiGAN), ACE Studio’s local bundle uses discrete residual FSQ, 16x 2D decoding, and RefineGAN2. Cloud generator depth, hidden width, objective, encoder topology, exact noise/pulse synthesis formulas, fold permutation, Mel FFT configuration, and cross-chunk phase overlap remain unrecoverable from local binaries alone.

Type to search…

↑↓ navigate↵ selectEsc close