Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jeremygooch
Copy link
Contributor

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

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

…o fixes issue with truthiness check causing 0 value to be missed. See invoke-ai#7584
@github-actions github-actions bot added the frontend PRs that change frontend files label Jul 3, 2025
@hipsterusername
Copy link
Member

Thanks for the contribution! We'll get this reviewed

Copy link
Collaborator

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

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

Good catch thanks

@psychedelicious psychedelicious merged commit d794aed into invoke-ai:main Jul 3, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: CFG Rescale Multiplier does not default to 0
3 participants