Skip to content
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

Allow s_noise override to actually be used #12354

Merged
merged 3 commits into from
Aug 6, 2023

Conversation

catboxanon
Copy link
Collaborator

@catboxanon catboxanon commented Aug 6, 2023

Description

Closes #8501

This fixes a regression introduced all the way back in October by #3040 where s_noise was set to 1 in the function definition, so the option in settings was no longer read. Because the value could be anything inclusive between 0 and 1 it should just read from the options directly.

Checklist:

@AUTOMATIC1111
Copy link
Owner

The intention was that Processing's args override options, so the way to fix the bug while preserving the original intent would be to self.s_noise = s_noise if s_noise is not None else opts.data.get('s_noise', 1.0), and to set default value for s_noise in constructor to None.

@catboxanon
Copy link
Collaborator Author

Done.

@AUTOMATIC1111 AUTOMATIC1111 merged commit 92b99f3 into AUTOMATIC1111:dev Aug 6, 2023
2 of 3 checks passed
@AUTOMATIC1111
Copy link
Owner

Also opts.data.get('s_noise', 1.0) should be just opts.s_noise.

@w-e-w w-e-w mentioned this pull request Aug 24, 2023
@catboxanon catboxanon deleted the fix/s-noise branch March 4, 2024 23:28
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