fix(ui): sets cfg_rescale_multiplier to 0 if there is no default. Also fixes issue with truthiness check causing 0 value to be missed. #8195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Sets CFG Rescale Multiplier to 0 when the Set Model Defaults icon is clicked if the Model does not have a default value for CFG Rescale Multiplier. See issue #7584 for the "why".
Also addresses a minor issue where if the default is enabled but set to 0, and the Reset Model Defaults is clicked, the value is not reset to 0.
Both issues were fixed in the default settings middleware by checking for a null value in the same way it's checked in the UseDefaultSettingsButton logic, and by adding an else block to force the value to 0 if it is null.
Related Issues / Discussions
Closes #7584
QA Instructions
Disabled a models default CFG Rescale Multiplier and changed settings in the Canvas view including CFG Rescale Multiplier, then clicked on the Reset Defaults icon (PiSparkleFil) to verify the initially reported issue is fixed.
Enabled a models default CFG Rescale Multipler, but left the value as 0. Changed other model settings in Canvas view including the CFG Rescale Multipler, then clicked on the Reset Defaults icon to verify the CFG Rescale Multiplier is set back to 0.
Merge Plan
Checklist
What's New
copy (if doing a release after this PR)