Skip to content

webui: stop overriding engine defaults on every request - #411

Closed
CryptVenture wants to merge 1 commit into
0xShug0:mainfrom
CryptVenture:pr/webui-request-wiring
Closed

webui: stop overriding engine defaults on every request#411
CryptVenture wants to merge 1 commit into
0xShug0:mainfrom
CryptVenture:pr/webui-request-wiring

Conversation

@CryptVenture

Copy link
Copy Markdown
Contributor

Split out of #373 as requested. This PR is the request wiring only; the package resolver, the catalog entries, the transcript display and the UI text fixes are separate PRs.

The problem

Three request fields were filled in by the UI regardless of what the model asked for.

max_tokens — every request carried a fixed 1024. Engine defaults across the shipped specs range from 500 (dots_tts, magpie_tts) through 1520 (confucius4_tts) to 2000 (muscriptor), and several families default to 0, meaning no cap at all. The UI's number was neither the model's default nor the user's choice.

seed — the UI defaulted to 1234 in a field whose own label describes a random seed. Families whose engine default is a fresh random seed therefore returned identical audio on every run.

Controls the model rejects — lyrics and duration were offered for models that throw on them; voice design and forced alignment did not require the inputs their engines demand; the conversion and analysis tasks declare a seed and were never sent one, so their runs could not be reproduced at all.

The change

  • max_tokens is blank by default and sent only when the user types a value.
  • seed defaults to -1, resolved client-side to a random uint32 before sending, so the engine never sees a negative value (it parses seeds as unsigned — -1 on the wire is a 500).
  • Tasks that declare a seed in their spec now receive the resolved seed.
  • Lyrics and duration are hidden for models that reject them; voice design requires a voice description; forced alignment requires a transcript and a language. The engine throws for each of these — a form message is a better place to learn it than a raw engine error.
  • Built-in voices from the spec and per-model voices from the server were both plumbed and never read; they are now offered together with the bundled demo clips, and the server is asked for its voices whether or not the UI is in management mode.

Validation

npx svelte-check --tsconfig ./tsconfig.json
# 153 FILES 0 ERRORS 0 WARNINGS

Live server, Metal, Apple M4 Max, request shapes matching what the UI sends before and after:

Check Old shape New shape
MOSS-TTS-Local, same text and seed max_tokens: 1024 → 24.2 s of audio no max_tokens → 29.4 s
DotTTS-SOAR, same text and seed max_tokens: 1024 → md5 8a1064a9… no max_tokens → md5 8a1064a9… (cap inert for this input)
DotTTS-SOAR, seed reproducibility seed 1234 twice → identical md5 8a1064a9… seed 2864434397 → 7d100930…

Both MOSS renderings transcribe back to the full input text through Parakeet-TDT, so on that family the cap changed the realisation rather than truncating content. The point stands either way: the UI was imposing a limit the model never asked for, and the effect is model-dependent, which is exactly why the client should not pick the number.

Scope

+page.svelte and Arena.svelte. No catalog, spec or engine change. The generated bundle is deliberately excluded — it is not byte-reproducible, so regenerating it in each PR of this split would make the PRs conflict; happy to send one bundle-regeneration PR once the series lands.

Three request fields were filled in by the UI regardless of what the model
asked for.

max_tokens
  Every request carried a fixed 1024. Engine defaults across the shipped
  specs range from 500 (dots_tts, magpie_tts) through 1520 (confucius4_tts)
  to 2000 (muscriptor), and several families default to 0, meaning no cap at
  all. The field is now blank by default and only sent when the user types a
  value, so the model's own limit applies. Measured on MOSS-TTS-Local with
  the same text and seed: 24.2 s of audio with the old fixed cap, 29.4 s
  without it.

seed
  The UI defaulted to 1234, which its own label describes as a random seed
  slot. Fourteen families whose engine default is a fresh random seed
  therefore returned identical audio on every run. The default is now -1,
  which the client resolves to a random uint32 before sending, so the engine
  never sees a negative value. Confirmed on DotTTS-SOAR: two runs at seed
  1234 are byte-identical, a run at another seed is not.

  The conversion and analysis tasks declare a seed and were never sent one, so
  their runs could not be reproduced at all. They now send the resolved seed
  when their spec declares the option.

Controls that do not apply
  Lyrics and duration are hidden for models that reject them, voice design
  requires a voice description, and forced alignment requires both a
  transcript and a language -- the engine throws for each of these, and a form
  message is a better place to learn it than a raw engine error.

Voices
  Built-in voices from the spec and per-model voices from the server were both
  plumbed and never read. They are now offered together with the bundled demo
  clips, and the server is asked for its voices whether or not the UI is in
  management mode.

Validation:
  npx svelte-check --tsconfig ./tsconfig.json     # 153 files, 0 errors
  Live server on Metal (Apple M4 Max), MOSS-TTS-Local and DotTTS-SOAR, request
  shapes matching the UI before and after.
@CryptVenture
CryptVenture force-pushed the pr/webui-request-wiring branch from 4281652 to a17af25 Compare September 3, 2026 00:50
@CryptVenture

Copy link
Copy Markdown
Contributor Author

Closing for now to stay inside the 3-concurrent-PR policy (see the discussion on #422). Nothing is wrong with the change and CI is green on it; I will reopen it as review slots free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant