Skip to content

Fix: apply aux optimizer defaults when current_state is empty - #1444

Merged
dxqb merged 1 commit into
Nerogar:mergefrom
dxqb:fix/muon-aux-adam-defaults
May 10, 2026
Merged

Fix: apply aux optimizer defaults when current_state is empty#1444
dxqb merged 1 commit into
Nerogar:mergefrom
dxqb:fix/muon-aux-adam-defaults

Conversation

@dxqb

@dxqb dxqb commented May 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • OptimizerParamsWindow checked current_state is None before populating defaults, but current_state can also be an empty dict {} when no config has been saved yet
  • Changed to not current_state so defaults are applied for both None and empty state
  • Fixes MuonWithAuxAdam aux optimizer window showing blank fields instead of defaults on first open

Test plan

  • Select MuonWithAuxAdam, open the aux optimizer params window with no prior config — confirm beta1/beta2/eps/weight_decay show their default values

`current_state is None` missed the case where state is an empty dict,
causing MuonWithAuxAdam to show blank fields instead of defaults on
first open. Changed to `not current_state` to cover both cases.
@dxqb

dxqb commented May 10, 2026

Copy link
Copy Markdown
Collaborator Author

@Koratahiu could you review

@Koratahiu Koratahiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dxqb
dxqb changed the base branch from master to merge May 10, 2026 16:23
@dxqb
dxqb merged commit 3374137 into Nerogar:merge May 10, 2026
1 check passed
@dxqb
dxqb deleted the fix/muon-aux-adam-defaults branch May 10, 2026 16:24
dxqb pushed a commit that referenced this pull request May 29, 2026
Brings in upstream changes (remove COFT #1447, remove cautious_mask #1451,
fix aux optimizer defaults #1444). Conflicts resolved by keeping the
ctk_abstraction refactored versions (self.components, controller delegation).
COFT removal applied manually to BaseLoraTabView.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BitcrushedHeart pushed a commit to BitcrushedHeart/OneTrainer that referenced this pull request Jun 20, 2026
dxqb added a commit to dxqb/OneTrainer that referenced this pull request Jun 27, 2026
…tk view split

The ctk view split copied OptimizerParamsWindow into a controller from a base
that predated Nerogar#1444, reverting `if not current_state:` back to
`if current_state is None:`. Since muon_adam_config defaults to {} (not None),
the empty initial state fell through to from_dict({}), so the Muon/aux-Adam
window opened with bare default_values() instead of MUON_AUX_ADAM_DEFAULTS /
ADAMW_ADV. Restore the upstream one-line guard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

2 participants