mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-31 02:32:57 +08:00
fix dpm2 in img2img as well
This commit is contained in:
parent
180fdf7809
commit
7ba9bc2fdb
@ -454,6 +454,9 @@ class KDiffusionSampler:
|
|||||||
else:
|
else:
|
||||||
sigmas = self.model_wrap.get_sigmas(steps)
|
sigmas = self.model_wrap.get_sigmas(steps)
|
||||||
|
|
||||||
|
if self.funcname in ['sample_dpm_2_ancestral', 'sample_dpm_2']:
|
||||||
|
sigmas = torch.cat([sigmas[:-2], sigmas[-1:]])
|
||||||
|
|
||||||
sigma_sched = sigmas[steps - t_enc - 1:]
|
sigma_sched = sigmas[steps - t_enc - 1:]
|
||||||
xi = x + noise * sigma_sched[0]
|
xi = x + noise * sigma_sched[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user