From 04f4da00134aef4f6ba477d9f333f71ef45be07a Mon Sep 17 00:00:00 2001 From: cool-bigdogs-tshirt <131823432+cool-bigdogs-tshirt@users.noreply.github.com> Date: Sun, 30 Apr 2023 12:27:52 -0500 Subject: [PATCH] fix unipc img2img denoising sample count was wrongly using the inverse of the intended value. smaller denoising strength should run fewer steps. --- modules/models/diffusion/uni_pc/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/models/diffusion/uni_pc/sampler.py b/modules/models/diffusion/uni_pc/sampler.py index 6dd7c7fd8..953e786db 100644 --- a/modules/models/diffusion/uni_pc/sampler.py +++ b/modules/models/diffusion/uni_pc/sampler.py @@ -47,7 +47,7 @@ class UniPCSampler(object): # actual number of steps we'll run self.steps = max( - num_inference_steps - init_timestep, + init_timestep, shared.opts.uni_pc_order+1, )