Skip to content

webui: keep parameter ranges inside what the engine accepts - #416

Closed
CryptVenture wants to merge 1 commit into
0xShug0:mainfrom
CryptVenture:pr/params-range-fixes
Closed

webui: keep parameter ranges inside what the engine accepts#416
CryptVenture wants to merge 1 commit into
0xShug0:mainfrom
CryptVenture:pr/params-range-fixes

Conversation

@CryptVenture

Copy link
Copy Markdown
Contributor

Split out of #374 as requested: ranges that let the UI produce hard errors. The dead controls, the default overrides, the missing groups and the label text are separate PRs.

The problem

Nine minimums sat below the engine's own guard, so a legal-looking slider position produced a 500 instead of a clamped value.

Group / control Was Now Guard
qwen3_tts.temperature min 0.0 0.05 src/models/qwen3_tts/session.cpp:68 — "temperature must be positive when sampling"
confucius4_tts.temperature min 0.0 0.05 src/models/confucius4_tts/request.cpp:62
confucius4_tts.top_p min 0.0 0.01 src/models/confucius4_tts/request.cpp:65 — must be in (0, 1]
personaplex.temperature, personaplex.text_temperature min 0.0 0.05 positive-value parse
vevo2.temperature min 0.0 0.05 positive-value parse
dramabox.reference_duration_sec min 0.0 0.5 src/models/dramabox/session.cpp:149
dramabox.audio_chunk_threshold_sec, audio_chunk_duration_sec min 0.0 1.0 same derivation, frame counts round to zero
controlfoley.guidance_scale min 0.0 0.1 src/models/controlfoley/pipeline.cpp:176 reads it through positive_float_option, which throws at zero
controlfoley.duration_sec min 0.1, no max 0.64 – 60.0 the range model_specs/controlfoley.json declares; below the floor the derived clip/visual/sync frame counts round to zero
midashenglm_gen.min_stop_step min 0 1 src/models/midashenglm_gen/session.cpp:175 parses it as a positive integer

echo_tts.num_inference_steps had a maximum equal to its own default, so the control could only reduce quality; the ceiling moves to 120.

Also here

Three controls lose their default as well as their range — personaplex.text_temperature (follows temperature when unset), vevo2.temperature and vevo2.top_p (read from the checkpoint's generation config). They become blank number inputs rather than sliders pinned to a literal, for the same reason as the sibling defaults PR.

Worth flagging separately: model_specs/controlfoley.json declares guidance_scale min 0.0 while the engine throws at zero. That is a spec bug, not a UI one, and belongs to the spec series rather than this PR.

Validation

python3 -m json.tool webui/configs/model_params.json   # parses
python3 tools/check_loader_catalog_sync.py
# ok: runtime loaders, model_specs, and model_manager_v2 are in sync

Every bound above was read from the guard named beside it.

Scope

One data file, 14 controls. No code change. The generated bundle is deliberately excluded — catalog.ts inlines this file at frontend build time and the bundle 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.

Nine minimums sat below the engine's own guard, so a legal-looking slider
position produced a hard 500 rather than a clamped value.

  - qwen3_tts temperature, confucius4_tts temperature and top_p, personaplex
    and vevo2 temperature: the engines require a positive value
    (qwen3_tts/session.cpp:68, confucius4_tts/request.cpp:62-66). Minimums
    move off zero.
  - dramabox reference_duration_sec, audio_chunk_threshold_sec and
    audio_chunk_duration_sec: dramabox/session.cpp:149 throws on a
    non-positive reference duration, and the chunk knobs derive frame counts
    the same way.
  - controlfoley guidance_scale: pipeline.cpp:176 reads it through
    positive_float_option, which throws at zero. controlfoley duration_sec now
    matches the 0.64 to 60 range the spec declares, instead of 0.1 with no
    ceiling; below that floor the derived clip, visual and sync frame counts
    round to zero.
  - midashenglm_gen min_stop_step: session.cpp:175 parses it as a positive
    integer, so 0 was a guaranteed error.

echo_tts num_inference_steps had a maximum equal to its own default, so the
control could only reduce quality; the ceiling moves to 120.

Three controls also lose their default here, for the same reason as the
defaults change: personaplex text_temperature follows temperature when unset,
and vevo2 temperature and top_p are read from the checkpoint's generation
config. They become blank number inputs rather than sliders pinned to a
literal.

Validation:
  python3 -m json.tool webui/configs/model_params.json
  python3 tools/check_loader_catalog_sync.py     # in sync
@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