Skip to content

Support SD.Next's separate sampler for HiRes-fix. - #58

Merged
mcmonkey4eva merged 1 commit into
mcmonkeyprojects:masterfrom
0xb8:master
Aug 3, 2023
Merged

mcmonkey4eva merged 1 commit into
mcmonkeyprojects:masterfrom
0xb8:master

Conversation

@0xb8

@0xb8 0xb8 commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

Recently SD.Next started to use params.latent_sampler for hires-fix pass, which can differ from main sampler. This change incidentally completely broke Dynamic Thresholding when doing hires-fix pass.

I did not test this PR with the original AUTOMATIC1111's webui version, but it should (probably) work just fine.

if orig_sampler_name in ["DDIM", "PLMS"]:
raise RuntimeError(f"Cannot use sampler {orig_sampler_name} with Dynamic Thresholding")
if orig_sampler_name == 'UniPC' and p.enable_hr:
if orig_latent_sampler_name in ["DDIM", "PLMS"]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This... just ignores the original sampler?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can you please rephrase that? I'm not sure I understand what is the issue here.

The check at lines 94-95 is supposed to disallow DDIM and PLMS for hires-fix sampler, just like it does for original sampler.

The check for UniPC is at line 96.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh, wait, my bad, I misread, sorry.

@mcmonkey4eva
mcmonkey4eva merged commit 5349f00 into mcmonkeyprojects:master Aug 3, 2023
@mcmonkey4eva

Copy link
Copy Markdown
Member

Seems to work fine indeed on auto

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