Repository navigation
AuK: a working port, and evidence for NOT adopting it (draft, closes #503?) - #612
christopherthompson81 wants to merge 3 commits into
Conversation
AuK's BigVGANFlowVAE is causal (`causal: true` in its config) and the framework's
BigVGAN is not, so it cannot decode one. Both defaults are unchanged: `causal`
and `causal_input_conv` are false, and every existing caller builds the same
graph it built before.
⚠ THE SYMMETRIC FORM IS ONLY EXACT WHEN kernel - stride IS EVEN. It is
`floor((kernel - stride) / 2)`, which is right for the usual k = 2r with even r
and wrong otherwise. AuK's rates are [5, 4, 3, 2, 2, 2]: stages 1 and 3 have odd
k - r, and the error compounds through every later stage --
stage r/k target framework drift
1 5/10 500 501 +1
2 4/8 2000 2004 +4
3 3/6 6000 6013 +13
4 2/4 12000 12026 +26
5 2/4 24000 24052 +52
6 2/4 48000 48104 +104
-- which is a decoder that runs, emits audio, and is wrong. The causal rule is
padding 0 then dropping the trailing `stride`, which lands on frames*stride for
odd rates too.
Three pieces, each matching the reference's own definition:
- Conv1d pads symmetrically by dilation*(kernel-1) and keeps the LEADING frames.
That is identical to a left-only pad -- those outputs are exactly the windows
it produces -- and needs no new ggml op.
- ConvTranspose1d uses padding 0 and drops the trailing `stride`, on both the
module path and the zero-interleave path.
- The alias-free activation's DOWNsample pads (kernel-1, 0) instead of
(kernel/2-1, kernel/2). Only the downsample: AuK passes `causal` to
DownSample1d and leaves UpSample1d at its default, so the upsample is
untouched.
⚠ `causal_input_conv` is a SEPARATE flag because AuK builds conv_pre with
causal=False hardcoded while every other convolution in the same decoder follows
the config (bigvgan_flow_vae.py:312 against :326, :352). "The decoder is causal"
and "conv_pre is causal" are genuinely different facts.
⚠ The new fields go LAST in BigVganGraphOptions. dramabox/vocoder.cpp:367
brace-initializes it positionally, so a field inserted anywhere else silently
reassigns every one after it; it failed to compile here only because the fourth
value's type stopped matching.
Verified against AuK's published VAE, diffed with PyTorch:
causal, clean latent 48000 samples cosine=1.00000000 max 0.0000040
causal, clipping latent 48000 samples cosine=1.00000000 max 0.0000864
non-causal regression 48104 samples cosine=1.00000000 max 0.00000009
The third is the one that matters for existing callers: with `causal` off the
output is bit-identical to a PyTorch run built the same way, so this adds a mode
rather than changing one.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01QCCx4pMMex72qrNomPh5yL
AuK (Tencent-Hunyuan/AuK, requested in 0xShug0#503) is a stack of three models, not one: Qwen2.5-Omni's Thinker as a frozen conditioner, a Flux2Edit MMDiT, and a causal BigVGAN flow VAE. Each is diffed against a PyTorch dump of the same computation before the next is built on it, because a 30-block backbone that is wrong somewhere gives you one number and no idea where. VAE decode (causal) cosine=1.00000000 max_abs_diff 0.0000040 VAE encode cosine=1.00000000 max_abs_diff 0.0000162 conditioner (36 layers) cosine=1.00000000 max_abs_diff 0.0104 (f32) audio tower (32 layers) cosine=1.00000000 max_abs_diff 0.00072 (f32) MMDiT (10 double + 20 single) time_embed 1.00000000 txt_norm 1.00000000 audio_embed 1.00000000 double0 0.99999999 single0 0.99999998 v_pred 0.99999925 CFM sampler (4 steps) cosine=0.99998447 end to end waveform cosine=0.994248 against the reference's own audio The waveform figure is lower than any stage because Euler integration feeds each step back in: a 1e-6 difference in the velocity field compounds over 16 steps. The per-stage taps are what let that be stated rather than hoped. ⚠ FIVE FAILURE MODES HERE ARE SILENT -- correct shapes, plausible audio, no error. Each cost real time and each is commented where it lives: - The conditioning is an ELMo fusion over ALL 36 layers, not the last hidden state. The learned weights put 67.6% of the mass on layer 1 and 0.0057% on layer 36, so `last_hidden_state` -- what every "LLM as encoder" example reaches for -- uses almost none of the signal. - "gelu" is not a specification. transformers' ACT2FN["gelu"] is exact erf; ggml_gelu is the tanh approximation. Twice per layer over 32 layers it reads as a uniform 0.3% error with nothing to localize (0.9974 -> 1.00000000). - The audio tower is chunked: convolutions, positions AND attention all run inside n_window*2 frames, and positions restart at 0 per chunk. - Two LeakyReLU slopes: 0.2 in the encoder body, PyTorch's default 0.01 inside ResStack. - BackendWeightStore BATCHES. Without store->upload() the graph is correct, the input is correct, every weight is unbacked, and the output is uniformly zero. Rope is GPT-J (adjacent pairs), not NeoX; f5_tts reached the same conclusion independently. The two concatenations run in opposite orders -- [audio, text] inside a double block, [text, audio] for the single-stream phase. The flow in the VAE checkpoint is training-only: 112 of 1137 tensors never run at inference. Reuse rather than reimplementation, throughout: f5_tts already had the grouped conv and the adaLN chunk order, sopro_tts had Mish, dots_tts had the alias-free activation loader, qwen3_asr had windowed attention and sinusoidal positions. The framework needed exactly one addition -- causal BigVGAN, committed separately. Tests are parity probes driven by hand, like dots_tts_vocoder_parity: they need a GGUF and a PyTorch dump, so they are not registered with add_test. ⚠ Duration is the CALLER'S input. AuK cannot estimate its own output length (0xShug0#503 records this); pe.py guesses it with a second LLM and is out of scope. tools/ and scripts/ carry the fixtures and the task runner. task.cpp is generated from AuK's own pe.config.yaml, so the 16 task types can be addressed directly -- `--task pitch_edit --variant increase --param semitones=4` renders the trained phrasing without a classifier in the loop. ⚠ 5 of the 16 have no English template; those render in Chinese and say so. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QCCx4pMMex72qrNomPh5yL
Two corrections found while reviewing the results this harness produced. ⚠ ANCHOR WORDS MUST BE AUDIBLE, NOT MERELY TRANSCRIBED. The delete_after cases anchored on "forwarded", which Parakeet reports confidently in context and which the speaker does not clearly say -- cut out and transcribed alone, that word comes back as "Voted". The model found nothing to anchor to and did nothing, which read as a broken capability until a listener checked the audio. ASR regularizes a mumbled word into whatever fits the sentence, so it verifies OUTPUTS well and chooses PARAMETERS badly. Anchors are now words confirmed by ear, and the targets occur exactly once. Durations are now per case, because the caller owns that contract: delete gets 10% less than the source, insert 20% more. At exactly the source length the model pads a deletion with invented syllables and declines an insertion outright, in this port and in the reference alike. The change check added to auk_pipeline says what it cannot do. It compares the output with the source and reports UNCHANGED above a threshold, which is useful for paralinguistic edits (measured 0.70-0.99 when they act) and MEANINGLESS for content edits: AuK regenerates rather than splices, so those come back near zero correlation even when the words are nearly identical. The model itself cannot report failure -- it is a flow-matching generator with no refusal channel -- so this is the only signal available, and overstating it would be worse than not having it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01QCCx4pMMex72qrNomPh5yL
|
@christopherthompson81 I've finished AuK. All that's left is quant testing. I may merge the code tomorrow. |
|
@christopherthompson81 Good catch. I actually only checked parity and missed the quality checks. Yeah, some of them indeed aren't working. I'll upload the outputs from both Python and C++ and add a disclaimer. I'm not surprised that this type of feature-rich model has such issues (not to mention it's from Tencent 😅). I think we only need to ensure the logic matches during integration, but can't really help with the model quality. HF repo is up! |
|
I actually lost momentum to spend more time on this model. |
|
@0xShug0 My thoughts were that it would be a support nightmare. People would file bugs saying something is broken, The reply would be "Upstream never worked either" and they'd likely be annoyed that we're not fixing the bug they're reporting. |
Exactly...It's a hard call. I decided to keep it for the novelty. I think it'll soon become a retro model, and it'll be fun to see how the model evolves I'm going to move the model to the community models section for now and list the known issues in the FAQ. |
Draft, and deliberately so: I am recommending against merging this, and opening it
mainly so the evidence behind that recommendation is reviewable rather than asserted.
#503 asked for AuK. It is ported and verified here. Then I ran its own advertised
capabilities, using its own instruction templates, against audio built so each task had
something to act on. Of the sixteen capabilities on the model card, four work, five
work partly, five fail, one is inconclusive and one I could not test — measured on
AuK's own PyTorch implementation, not on this port.
What the port is
AuK is three models, not one: Qwen2.5-Omni's Thinker as a frozen conditioner, a
Flux2Edit MMDiT, and a causal BigVGAN flow VAE. Each stage was diffed against a PyTorch
dump of the same computation before the next was built on it.
Runs on CPU and CUDA; ~29x faster on a 3090 (measured idle, three runs each). Framework
impact is one addition: causal BigVGAN, in its own commit, defaults unchanged.
The capability results
Instructions are AuK's own, rendered from its
pe.config.yamlrather than invented.Fixtures are built per task — noise added at 5 dB SNR for denoising, a 3 kHz band
removed for bandwidth extension (the task is audio super-resolution: reconstruct a lost
top end, as with telephone-band or low-bitrate material), two overlapping speakers for
separation — so each task has something real to do, and for the synthesized degradations
the correct answer is known exactly because we removed it ourselves. Judged by listening, with ASR and signal measurements as
supporting evidence.
⚠ Where both implementations were run — de-accent, target speaker, separation, speed,
the content edits — they agree, including on the failures. These are properties of
the model, not of the port.
Two things worth keeping regardless of the decision
Duration is an unstated caller contract, and getting it wrong is silent. The caller
sets output length and the model cannot infer it (#503's known flaw). At exactly the
source length, a deletion gets padded with invented syllables ("a provisionable
provision") and an insertion is declined outright. Give the deletion 10% less and the
insertion 20% more and both act. The reference behaves identically. Two capabilities I
had first scored as broken were my own budgeting errors.
5 of the 16 task types have no English template, only Chinese:
enhance_speech,separate_speech,improve_quality,whisper_edit,accent_edit. Two of the fivebehave near-identically in English anyway; three diverge sharply.
Recommendation
Do not adopt. The cost is 3,900 lines plus a ~14 GB three-model stack; what is reliably
delivered is content editing (minus insertion), denoise/dereverb, separation-by-order,
whisper conversion and TTS — and most of that is already covered by models in this tree.
The causal BigVGAN change is independent of that judgement and useful for any causal
decoder; it is a separate commit and could be taken alone.
Scope of the claim
One fixture set, one English speaker, one seed, 32 steps, CFG 2.0, and no prompt
enhancer (
pe.pynormalizes phrasing into these same templates, so its absence shouldnot change which capability functions — but that is untested). Nonverbal
editing could not be tested, because the fixture I built for it contains no audible
breaths — the instruction had nothing to act on, which is a harness defect rather than a
model result. Happy to re-check any specific case: the harness makes a
single task about five seconds on GPU, and the fixtures and task runner are included.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QCCx4pMMex72qrNomPh5yL