Skip to content

Fix Options UI saving runtime keys instead of persisted default config keys#70

Merged
daniandtheweb merged 1 commit into
daniandtheweb:masterfrom
bontebok:optionsfix
Jun 6, 2026
Merged

Fix Options UI saving runtime keys instead of persisted default config keys#70
daniandtheweb merged 1 commit into
daniandtheweb:masterfrom
bontebok:optionsfix

Conversation

@bontebok
Copy link
Copy Markdown
Contributor

@bontebok bontebok commented Jun 5, 2026

This PR fixes several Options UI settings that were being saved under their runtime/UI key names instead of the persisted default config keys used when the application starts.

Some shared UI builders return components keyed by runtime names such as in_offload_to_cpu, in_preview_mode, or environment-specific names such as env_GGML_VK_VISIBLE_DEVICES. These names are useful for generation/runtime parameter collection, but the Options page was registering some of them directly as config keys.

As a result, changing some settings from the Options page could appear to work during the current session, but after restarting the application the UI would reload from the corresponding def_* config key and ignore the saved value.

Changes

  1. Added an explicit OPTION_KEY_MAP to map UI/runtime keys to their persisted config keys.
  2. Updated Options registration to resolve UI keys before registering components with the settings registry.
  3. Mapped affected in_* settings to their corresponding def_* config keys.
  4. Mapped environment UI keys such as env_GGML_VK_VISIBLE_DEVICES to their def_env_* config keys.
  5. Updated refresh target lookups to use resolved config keys, matching the keys stored in the registry.
  6. Removed duplicate registration for Advanced Settings/Prediction as this already exists under Extras.

Options changed through the UI are now saved to the same config keys that are read when the application starts, so settings persist correctly after restart.

@daniandtheweb
Copy link
Copy Markdown
Owner

Looks good to me. I've been wanting to fix the settings for a while but lately I'm not having much time, this is really appreaciated.

@daniandtheweb daniandtheweb merged commit 3b0b052 into daniandtheweb:master Jun 6, 2026
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.

2 participants