Skip to content

Model K: the launcher's per-game model choice K and the front end's K build state, off by default - #211

Merged
phantoslayer21 merged 3 commits into
mainfrom
k/frontend-launcher
Nov 14, 2026
Merged

phantoslayer21 merged 3 commits into
mainfrom
k/frontend-launcher

Conversation

@phantoslayer21

@phantoslayer21 phantoslayer21 commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Refs #15

Step 10 of the Model K port: the build switches and the launcher's per-game choice. Model K stays off by default for players: the release and CI commands keep K out, and nothing here changes what a player's build contains. K is exact only: no approximation mode is exposed, defaulted or documented (the runtime's network and k_fast options are not touched and nothing in the launcher or front end sets them).

What changes

Launcher (clean/installer)

  • New CMake option WRONGGPU_MODEL_K (default OFF; configuring it ON without WRONGGPU_PRESET_K=ON stops with an error, because Model K's converter map and model folder come with Preset K). It makes the existing model setting accept k (m|k, m|k|l together with WRONGGPU_MODEL_L), done like the Model L choice (Launcher: the Model L choice (set <game> model=L), off by default #138):
    • set <game> model=K is accepted only while Model K's data on this PC (model\K\model.wgcm) passes its check against Model K's converter data; otherwise exit 5 with Model K's words and model convert --preset=K, nothing changed.
    • It writes wronggpu.ini's model=K (every model item out, K last) and OptiScaler.ini's UpscalerIndex = 1 ([WrongGPU] slot, else [FSR]). The record's hashes follow both writes, as for every settings write.
    • set <game> model=M (the profile says M) puts Model K's item back to model=M and an index naming K's entry back to 0. profile.ini has a model line only for K and L. A game saved on K whose K data is gone is not refused: its files say Model M, with a warning.
    • Model L's entry index is 2 whenever Model K is built in (it follows K's), so the L choice stays right in a K build.
  • With WRONGGPU_MODEL_K=OFF (every release and CI build) the code compiles to what it was: model=K is not a value.
  • Behaviour to know about: in a K-choice build the profile is the truth. An install that starts on Preset K (/PRESET=K) writes no profile, so the profile is imported from the files (model=K becomes k). A profile.ini saved by a build without the K choice has no model line and says M, so the next settings apply there puts a Model K item back to M. This only exists in development builds with the choice on.
  • The window has no model control for L either (README); the choice is set, as for L.

Front end (clean/fsr/CMakeLists.txt)

  • WG_MODEL_K already existed (default ON, releases and CI say OFF); its default is unchanged. Its state is now a property of wg_fsr_core (like Model L's), so a build with K OFF (releases, CI) also tests a front end with Model K (fsr_frontend_model_k_unit, fsr30_hook_model_k_unit) and a build with K ON also tests one without. Standalone ASI targets get the build's value explicitly. I checked every compile unit's -DWRONGGPU_MODEL_K in an ON and an OFF build (ninja command dump): all product and test units carry the build's value, the variants carry the other.

Docs and CI: BUILDING.md section 8 (a build with Model K), the launcher README section. CI keeps -DWG_MODEL_K=OFF and -DWRONGGPU_PRESET_K=OFF; the launcher job also builds and runs the two new K test executables.

Coordination with the ASI fix

Nothing in clean/fsr/asi/* or the front end's precedence code is touched. What the ASI/precedence work needs from this entry: K is model=K last in runtime_options plus UpscalerIndex 1 ([WrongGPU] slot, else [FSR]), the same shape as L (2). The plugin's wronggpu-asi.ini selection is not written by the launcher's choice (as for L). profile.cpp: my edits are the K branches beside the existing L branches in kSettings, EffectiveSettings, RenderWronggpuIni, RenderOptiIni; I rebase on the ASI PR if it lands first.

Tested

  • Front end, K OFF (the CI shape) and K ON, Ninja Release: full build, CPU tests (unit|hosted|diagnostic|support, minus overlay/split/d3d12): 18/18 each (one skip: the OptiScaler-binary scan, no binary given), including the other-state variants.
  • Launcher, CI shape (WRONGGPU_PRESET_K=OFF): wg-core, launcher-core, coexist-core, convert-ignore, model-choice (the L control, 22 checks, unchanged), model-choice-k (36 checks: K with L, an L and an M control, byte-for-byte M), model-choice-k-only (32 checks), source-size, wording: 9/9.
  • Launcher with PRESET_K=ON MODEL_K=ON MODEL_L=ON: the same ctest group plus wizard-policy: 10/10.
  • End to end, clean/installer/tests/run_model_k_tests.py against that build (generated fixtures, test maps, no game, no GPU): 20/20 — refusal without K data (exit 5, nothing changed), conversion, model=K (ini + index 1 + record hashes + profile), again (no change), back to M byte for byte, the L control (index 2, K to L to M byte for byte), repair without the K data, uninstall (the game folder as before the install, except the plugin's own wronggpu-asi.ini that a Preset K build seeds and an uninstall deliberately leaves).
  • public_gates.py: must-pass gates pass; LOOK 42 / 29 / 115 (baseline 42 / 29 / 111: the four extra are step and section cross-references in BUILDING.md section 8, not measurements).

Not tested

  • No game run, no GPU run (K3 of the release lead covers the game test).
  • The runtime and D3D12 parts of K (steps 1-9) are not exercised here; this PR does not change them. The runtime build with K was not rebuilt (BUILDING.md section 8 names its existing switch).
  • The launcher window (no model control exists for L either); the silent /PRESET=K installer path (unchanged code, covered by the existing installer suite, not re-run).
  • The known unrelated failure "uninstall.exe is the small restorer" (Launcher: coexist with other OptiScaler setups #47) was not part of the groups run.

State

Head 0875b34 (main merged in, no conflict, no overlap with this change). CI: both required checks and all 9 jobs green. Main has since gained only an unrelated workflow file (discord-feed.yml); the PR is mergeable (CLEAN). The four extra LOOK lines of the numbers gate are the step and section cross-references in BUILDING.md section 8 ("3.3", "4.1", "5.2", "section 6"), not measurements.

… build state, off by default

Launcher: CMake WRONGGPU_MODEL_K (default OFF, needs WRONGGPU_PRESET_K) makes `model` accept k like the Model L choice
(set <game> model=K writes wronggpu.ini's model=K last and OptiScaler's UpscalerIndex 1; the data check, the refusal, the
repair fallback and the way back to Model M are Model L's). Model L's entry is 2 whenever Model K is built in.

Front end: Model K's state is a property of wg_fsr_core like Model L's, so a build with WG_MODEL_K=OFF (releases, CI) also
tests a front end with Model K and a build with it ON also tests one without. The default of WG_MODEL_K is unchanged.

Tests: model-choice-k (with and without the Model L choice) in CI, tests/run_model_k_tests.py end to end, an L and an M
control. BUILDING.md section 8 and the launcher README describe the K build. CI and releases keep Model K off. No other
mode of Model K is offered, written or documented.

Refs #15

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 14, 2026 22:50
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
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