Skip to content

Allow s_noise override to actually be used#12354

Merged
AUTOMATIC1111 merged 3 commits into
AUTOMATIC1111:devfrom
catboxanon:fix/s-noise
Aug 6, 2023
Merged

Allow s_noise override to actually be used#12354
AUTOMATIC1111 merged 3 commits into
AUTOMATIC1111:devfrom
catboxanon:fix/s-noise

Conversation

@catboxanon

@catboxanon catboxanon commented Aug 6, 2023

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
Collaborator Author

Done.

@AUTOMATIC1111 AUTOMATIC1111 merged commit 92b99f3 into AUTOMATIC1111:dev Aug 6, 2023
@AUTOMATIC1111

Copy link
Copy Markdown
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