From b5b703c516373c39c368c08a04b2b4e7181ac9fe Mon Sep 17 00:00:00 2001 From: lugo Date: Mon, 28 Nov 2022 12:43:33 +0100 Subject: [PATCH] guidance scale fix --- latent_blending.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/latent_blending.py b/latent_blending.py index 275c624..19e4ee3 100644 --- a/latent_blending.py +++ b/latent_blending.py @@ -69,7 +69,6 @@ class LatentBlending(): """ self.sdh = sdh self.device = self.sdh.device - self.guidance_scale = guidance_scale self.width = self.sdh.width self.height = self.sdh.height self.seed = 420 #use self.set_seed or fixed_seeds argument in run_transition @@ -90,7 +89,7 @@ class LatentBlending(): self.num_inference_steps = -1 self.list_injection_idx = None self.list_nmb_branches = None - + self.set_guidance_scale(guidance_scale) self.init_mode() @@ -106,6 +105,12 @@ class LatentBlending(): else: self.mode = 'standard' + def set_guidance_scale(self, guidance_scale): + r""" + sets the guidance scale. + """ + self.guidance_scale = guidance_scale + self.sdh.guidance_scale = guidance_scale def set_prompt1(self, prompt: str): r"""