From 81baaff9b36bef62f9a083243dc038e8ca769566 Mon Sep 17 00:00:00 2001 From: C43H66N12O12S2 <36072735+C43H66N12O12S2@users.noreply.github.com> Date: Thu, 15 Sep 2022 10:52:11 +0300 Subject: [PATCH] Respect quantization setting --- modules/sd_samplers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_samplers.py b/modules/sd_samplers.py index ffb8c2cf..e1c913b3 100644 --- a/modules/sd_samplers.py +++ b/modules/sd_samplers.py @@ -173,7 +173,7 @@ def extended_trange(count, *args, **kwargs): class KDiffusionSampler: def __init__(self, funcname, sd_model): - self.model_wrap = k_diffusion.external.CompVisDenoiser(sd_model, quantize=True) + self.model_wrap = k_diffusion.external.CompVisDenoiser(sd_model, quantize=True if shared.opts.enable_quantization else False) self.funcname = funcname self.func = getattr(k_diffusion.sampling, self.funcname) self.model_wrap_cfg = CFGDenoiser(self.model_wrap)