Add a workaround patch for DPM2 a issue
DPM2 a and DPM2 a Karras samplers are both affected by an issue described by https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/3483 and can be resolved by a workaround suggested by the k-diffusion author at https://github.com/crowsonkb/k-diffusion/issues/43#issuecomment-1305195666
This commit is contained in:
parent
685f9631b5
commit
8b0703b8fc
|
@ -494,6 +494,9 @@ class KDiffusionSampler:
|
|||
|
||||
x = x * sigmas[0]
|
||||
|
||||
if self.funcname == "sample_dpm_2_ancestral": # workaround dpm2 a issue
|
||||
sigmas = torch.cat([sigmas[:-2], sigmas[-1:]])
|
||||
|
||||
extra_params_kwargs = self.initialize(p)
|
||||
if 'sigma_min' in inspect.signature(self.func).parameters:
|
||||
extra_params_kwargs['sigma_min'] = self.model_wrap.sigmas[0].item()
|
||||
|
|
Loading…
Reference in New Issue
Block a user